GHSA-pmcv-mgcf-rvxg: Crypto2 Non-aligned U32 Read Vulnerability
HIGHGHSA-pmcv-mgcf-rvxg is a HIGH non-aligned u32 read vulnerability (General Security Weakness) affecting Crypto2 libraries in the crates.io ecosystem. The issue involves non-aligned u32 read in chacha20 encryption and decryption. Remediation is available in the latest vendor maintenance releases.
GHSA-pmcv-mgcf-rvxg at a Glance
How to Fix GHSA-pmcv-mgcf-rvxg
To remediate this vulnerability, upgrade all affected Crypto2 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 crypto2 to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for crypto2
How to Check if You Are Affected
To determine whether your application is affected by GHSA-pmcv-mgcf-rvxg, inspect your project dependencies for Crypto2:
inspect dependencies for crypto2
Analyze the terminal output to locate any version of Crypto2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), 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 Crypto2, 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-pmcv-mgcf-rvxg Affected Crypto2 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
crypto2
|
crates.io |
≤ 0.1.2
|
|
References
Frequently Asked Questions
What is GHSA-pmcv-mgcf-rvxg?
Which Crypto2 versions are affected?
What version fixes GHSA-pmcv-mgcf-rvxg?
Is crypto2 affected?
What CWE is associated with GHSA-pmcv-mgcf-rvxg?
How can I check crates.io dependencies for GHSA-pmcv-mgcf-rvxg?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pmcv-mgcf-rvxg",
"modified" : "2022-06-16T23:51:32Z",
"published" : "2022-06-16T23:51:32Z",
"aliases" : [ ],
"summary" : "Non-aligned u32 read in Chacha20 encryption and decryption",
"details" : "The implementation does not enforce alignment requirements on input slices while incorrectly assuming 4-byte alignment through an unsafe call to `std::slice::from_raw_parts_mut`, which breaks the contract and introduces undefined behavior.\n\nThis affects Chacha20 encryption and decryption in crypto2.\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "crypto2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "0.1.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/shadowsocks/crypto2/issues/27"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/shadowsocks/crypto2"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2021-0121.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-16T23:51:32Z",
"nvd_published_at" : null
}
}