GHSA-x3f4-45xf-rjm7: Ruzstd `ruzstd` Uninit And Out-of-bounds Memory Vulnerability
MODERATEGHSA-x3f4-45xf-rjm7 is a MODERATE `ruzstd` uninit and out-of-bounds memory vulnerability (CWE-125: Out-of-bounds Read) affecting Ruzstd libraries in the crates.io ecosystem. The issue involves `ruzstd` uninit and out-of-bounds memory reads. Remediation is available by upgrading affected packages to version 0.7.3.
GHSA-x3f4-45xf-rjm7 at a Glance
How to Fix GHSA-x3f4-45xf-rjm7
To remediate this vulnerability, upgrade all affected Ruzstd 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 ruzstd to 0.7.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for ruzstd
How to Check if You Are Affected
To determine whether your application is affected by GHSA-x3f4-45xf-rjm7, inspect your project dependencies for Ruzstd:
inspect dependencies for ruzstd
Analyze the terminal output to locate any version of Ruzstd in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.7.3), 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 CWE-125: Out-of-bounds Read, where the product reads data past the end, or before the beginning, of the intended buffer. In Ruzstd, 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-x3f4-45xf-rjm7 Affected Ruzstd Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
ruzstd
|
crates.io |
≥ 0.7.0
< 0.7.3
|
0.7.3
|
References
Frequently Asked Questions
What is GHSA-x3f4-45xf-rjm7?
Which Ruzstd versions are affected?
What version fixes GHSA-x3f4-45xf-rjm7?
Is ruzstd affected?
What CWE is associated with GHSA-x3f4-45xf-rjm7?
How can I check crates.io dependencies for GHSA-x3f4-45xf-rjm7?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-x3f4-45xf-rjm7",
"modified" : "2024-12-02T21:34:27Z",
"published" : "2024-12-02T21:34:27Z",
"aliases" : [ ],
"summary" : "`ruzstd` uninit and out-of-bounds memory reads",
"details" : "Affected versions of `ruzstd` miscalculate the length of the allocated and init section of its internal `RingBuffer`, leading to uninitialized or out-of-bounds reads in `copy_bytes_overshooting` of up to 15 bytes.\n\nThis may result in up to 15 bytes of memory contents being written into the decoded data when decompressing a crafted archive. This may occur multiple times per archive.\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "ruzstd"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.7.0"
}, {
"fixed" : "0.7.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/KillingSpark/zstd-rs/issues/75"
}, {
"type" : "WEB",
"url" : "https://github.com/KillingSpark/zstd-rs/pull/76"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/KillingSpark/zstd-rs"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2024-0400.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-125" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-12-02T21:34:27Z",
"nvd_published_at" : null
}
}