GHSA-r24f-hg58-vfrw: Unsafe libyaml Unsafe-libyaml Unaligned Write Of U64 Vulnerability
MODERATEGHSA-r24f-hg58-vfrw is a MODERATE unsafe-libyaml unaligned write of u64 vulnerability (General Security Weakness) affecting Unsafe libyaml libraries in the crates.io ecosystem. The issue involves unsafe-libyaml unaligned write of u64 on 32-bit and 16-bit platforms. Remediation is available by upgrading affected packages to version 0.2.10.
GHSA-r24f-hg58-vfrw at a Glance
How to Fix GHSA-r24f-hg58-vfrw
To remediate this vulnerability, upgrade all affected Unsafe libyaml dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade unsafe-libyaml to 0.2.10
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for unsafe-libyaml
How to Check if You Are Affected
To determine whether your application is affected by GHSA-r24f-hg58-vfrw, inspect your project dependencies for Unsafe libyaml:
inspect dependencies for unsafe-libyaml
Analyze the terminal output to locate any version of Unsafe libyaml in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.10), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Unsafe libyaml, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-r24f-hg58-vfrw Affected Unsafe libyaml Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
unsafe-libyaml
|
crates.io |
< 0.2.10
|
0.2.10
|
References
Frequently Asked Questions
What is GHSA-r24f-hg58-vfrw?
Which Unsafe libyaml versions are affected?
What version fixes GHSA-r24f-hg58-vfrw?
Is unsafe-libyaml affected?
What CWE is associated with GHSA-r24f-hg58-vfrw?
How can I check crates.io dependencies for GHSA-r24f-hg58-vfrw?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r24f-hg58-vfrw",
"modified" : "2023-12-21T18:14:34Z",
"published" : "2023-12-21T18:14:34Z",
"aliases" : [ ],
"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",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "unsafe-libyaml"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.2.10"
} ]
} ]
} ],
"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"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-12-21T18:14:34Z",
"nvd_published_at" : null
}
}