GHSA-9q5j-jm53-v7vr: Lz4 sys Lz4-sys Vulnerable To Memory Corruption Vulnerability
CRITICALGHSA-9q5j-jm53-v7vr is a CRITICAL (CVSS 9.8) lz4-sys vulnerable to memory corruption vulnerability (CWE-190: Integer Overflow or Wraparound) affecting Lz4 sys libraries in the crates.io ecosystem. The issue involves lz4-sys vulnerable to memory corruption via issue in liblz4. Remediation is available by upgrading affected packages to version 1.9.4.
GHSA-9q5j-jm53-v7vr at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix GHSA-9q5j-jm53-v7vr
To remediate this vulnerability, upgrade all affected Lz4 sys 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 lz4-sys to 1.9.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for lz4-sys
How to Check if You Are Affected
To determine whether your application is affected by GHSA-9q5j-jm53-v7vr, inspect your project dependencies for Lz4 sys:
inspect dependencies for lz4-sys
Analyze the terminal output to locate any version of Lz4 sys in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.9.4), 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-190: Integer Overflow or Wraparound, where the product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. this occurs when an integer value is incremented to a value that is too large to store in the associated representation. when this occurs, the value may become a very small or negative number. In Lz4 sys, 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-9q5j-jm53-v7vr Affected Lz4 sys Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
lz4-sys
|
crates.io |
< 1.9.4
|
1.9.4
|
References
Frequently Asked Questions
What is GHSA-9q5j-jm53-v7vr?
Which Lz4 sys versions are affected?
What version fixes GHSA-9q5j-jm53-v7vr?
Is lz4-sys affected?
What is the CVSS score of GHSA-9q5j-jm53-v7vr?
What CWE is associated with GHSA-9q5j-jm53-v7vr?
How can I check crates.io dependencies for GHSA-9q5j-jm53-v7vr?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9q5j-jm53-v7vr",
"modified" : "2022-09-01T22:24:55Z",
"published" : "2022-09-01T22:24:55Z",
"aliases" : [ ],
"summary" : "lz4-sys vulnerable to memory corruption via issue in liblz4",
"details" : "lz4-sys up to v1.9.3 bundles a version of liblz4 that is vulnerable to\n[CVE-2021-3520](https://nvd.nist.gov/vuln/detail/CVE-2021-3520).\n\nAttackers could craft a payload that triggers an integer overflow upon\ndecompression, causing an out-of-bounds write.\n\nThe flaw has been corrected in version v1.9.4 of liblz4, which is included\nin lz4-sys 1.9.4.\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "lz4-sys"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.9.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/lz4/lz4/pull/972"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2022-0051.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-190", "CWE-787" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2022-09-01T22:24:55Z",
"nvd_published_at" : null
}
}