GHSA-r24f-hg58-vfrw

    Dashboard / Vulnerabilities / GHSA-r24f-hg58-vfrw

    GHSA-r24f-hg58-vfrw

    Published: 21 Dec 2023Last Modified: 10 Sept 2026

    Summary: unsafe-libyaml unaligned write of u64 on 32-bit and 16-bit platforms

    Details: Affected versions allocate memory using the alignment of `usize` and write data to it of type `u64`, without using `core::ptr::write_unaligned`. In platforms with sub-64bit alignment for `usize` (including wasm32 and x86) these writes are insufficiently aligned some of the time. If using an ordinary optimized standard library, the bug exhibits Undefined Behavior so may or may not behave in any sensible way, depending on optimization settings and hardware and other things. If using a Rust standard library built with debug assertions enabled, the bug manifests deterministically in a crash (non-unwinding panic) saying _"ptr::write requires that the pointer argument is aligned and non-null"_. No 64-bit platform is impacted by the bug. The flaw was corrected by allocating with adequately high alignment on all platforms.

    Affected packages

    Package

    Name: unsafe-libyaml

    Purl: pkg:cargo/unsafe-libyaml

    Affected ranges

    Type: SEMVER

    Events:

    Introduced- 0
    Fixed -0.2.10

    Affected versions

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High
    GHSA-r24f-hg58-vfrw | CVE-DB