GHSA-wfg4-322g-9vqv: Memoffset Memoffset Allows Reading Uninitialized Memory Vulnerability
MODERATEGHSA-wfg4-322g-9vqv is a MODERATE memoffset allows reading uninitialized memory vulnerability (General Security Weakness) affecting Memoffset libraries in the crates.io ecosystem. The issue involves memoffset allows reading uninitialized memory. Remediation is available by upgrading affected packages to version 0.6.2.
GHSA-wfg4-322g-9vqv at a Glance
How to Fix GHSA-wfg4-322g-9vqv
To remediate this vulnerability, upgrade all affected Memoffset 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 memoffset to 0.6.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for memoffset
How to Check if You Are Affected
To determine whether your application is affected by GHSA-wfg4-322g-9vqv, inspect your project dependencies for Memoffset:
inspect dependencies for memoffset
Analyze the terminal output to locate any version of Memoffset in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.6.2), 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 Memoffset, 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-wfg4-322g-9vqv Affected Memoffset Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
memoffset
|
crates.io |
< 0.6.2
|
0.6.2
|
References
Frequently Asked Questions
What is GHSA-wfg4-322g-9vqv?
Which Memoffset versions are affected?
What version fixes GHSA-wfg4-322g-9vqv?
Is memoffset affected?
What CWE is associated with GHSA-wfg4-322g-9vqv?
How can I check crates.io dependencies for GHSA-wfg4-322g-9vqv?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wfg4-322g-9vqv",
"modified" : "2023-06-21T22:06:29Z",
"published" : "2023-06-21T22:06:29Z",
"aliases" : [ ],
"summary" : "memoffset allows reading uninitialized memory",
"details" : "memoffset allows attempt of reading data from address `0` with arbitrary type. This behavior is an undefined behavior because address `0` to `std::mem::size_of<T>` may not have valid bit-pattern with `T`. Old implementation dereferences uninitialized memory obtained from `std::mem::align_of`. Older implementation prior to it allows using uninitialized data obtained from `std::mem::uninitialized` with arbitrary type then compute offset by taking the address of field-projection. This may also result in an undefined behavior for \"father\" that includes (directly or transitively) type that [does not allow to be uninitialized](https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html).\n\nThis flaw was corrected by using `std::ptr::addr_of` in <https://github.com/Gilnaa/memoffset/pull/50>.\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "memoffset"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.6.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Gilnaa/memoffset/issues/24"
}, {
"type" : "WEB",
"url" : "https://github.com/Gilnaa/memoffset/pull/50"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Gilnaa/memoffset"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2023-0045.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-06-21T22:06:29Z",
"nvd_published_at" : null
}
}