{"id":"GHSA-r24f-hg58-vfrw","aliases":["RUSTSEC-2023-0075"],"url":"https://o3.security/vulnerability/GHSA-r24f-hg58-vfrw","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.\n\nIf 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\"_.\n\nNo 64-bit platform is impacted by the bug.\n\nThe flaw was corrected by allocating with adequately high alignment on all\nplatforms.\n","published":"2023-12-21T18:14:34Z","modified":"2026-09-10T03:50:04.594283636Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"crates.io","name":"unsafe-libyaml","fixedVersion":"0.2.10"}],"fix":{"url":"https://github.com/dtolnay/unsafe-libyaml/commit/7755559145c9cf5573639bfecc557893d4a46b0d","label":"dtolnay/unsafe-libyaml@7755559"},"references":[{"type":"WEB","url":"https://github.com/dtolnay/unsafe-libyaml/issues/21"},{"type":"WEB","url":"https://github.com/dtolnay/unsafe-libyaml/commit/7755559145c9cf5573639bfecc557893d4a46b0d"},{"type":"PACKAGE","url":"https://github.com/dtolnay/unsafe-libyaml"},{"type":"WEB","url":"https://rustsec.org/advisories/RUSTSEC-2023-0075.html"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-09-10T03:50:04.594283636Z"}}