GHSA-5m39-wx2q-mxg3: Invalid use of `mem :uninitialized` Causes `use-of-uninitialized-value` Vulnerability
MODERATEGHSA-5m39-wx2q-mxg3 is a MODERATE :uninitialized` causes `use-of-uninitialized-value` vulnerability (General Security Weakness) affecting Invalid use of `mem libraries in the crates.io ecosystem. The issue involves :uninitialized` causes `use-of-uninitialized-value`. Remediation is available by upgrading affected packages to version 0.3.2.
GHSA-5m39-wx2q-mxg3 at a Glance
How to Fix GHSA-5m39-wx2q-mxg3
To remediate this vulnerability, upgrade all affected Invalid use of `mem 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 lzf to 0.3.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for lzf
How to Check if You Are Affected
To determine whether your application is affected by GHSA-5m39-wx2q-mxg3, inspect your project dependencies for Invalid use of `mem:
inspect dependencies for lzf
Analyze the terminal output to locate any version of Invalid use of `mem in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.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 Invalid use of `mem, 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-5m39-wx2q-mxg3 Affected Invalid use of `mem Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
lzf
|
crates.io |
< 0.3.2
|
0.3.2
|
References
Frequently Asked Questions
What is GHSA-5m39-wx2q-mxg3?
Which Invalid use of `mem versions are affected?
What version fixes GHSA-5m39-wx2q-mxg3?
Is lzf affected?
What CWE is associated with GHSA-5m39-wx2q-mxg3?
How can I check crates.io dependencies for GHSA-5m39-wx2q-mxg3?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5m39-wx2q-mxg3",
"modified" : "2022-11-08T21:56:43Z",
"published" : "2022-11-08T21:42:06Z",
"aliases" : [ ],
"summary" : "Invalid use of `mem::uninitialized` causes `use-of-uninitialized-value`",
"details" : "The compression and decompression function used `mem:uninitialized` to create an array of uninitialized values, to later write values into it. This later leads to reads from uninitialized memory.\n\nThe flaw was corrected in commit b633bf265e41c60dfce3be7eac4e4dd5e18d06cf by using a heap-allocated `Vec` and removing out use of `mem::uninitialized`. The fix was released in v0.3.2 and v1.0.0\n\nSubsequently, the crate was deprecated and its use is discouraged.\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "lzf"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.3.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/badboy/lzf-rs/issues/9"
}, {
"type" : "WEB",
"url" : "https://github.com/badboy/lzf-rs/commit/b633bf265e41c60dfce3be7eac4e4dd5e18d06cf"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/badboy/lzf-rs"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2022-0067.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-11-08T21:42:06Z",
"nvd_published_at" : null
}
}