Security mailing lists by PureSourceCode

RUSTSEC-2023-0075

MEDIUM

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

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.

Published
20 Dec 2023
Last modified
10 Sep 2026
Also known as
GHSA-r24f-hg58-vfrw
Sources
OSV GHSA-r24f-hg58-vfrwJSONOSVJSON

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV crates.io unsafe-libyaml < 0.2.10 0.2.10
OSV crates.io unsafe-libyaml >= 0.0.0-0, < 0.2.10 0.2.10

References

History

  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 20 Dec 2023)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 21 Dec 2023)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.