GHSA-gw5w-5j7f-jmjj: Unsound usages of `std :slice::from_raw_parts` Vulnerability
LOWGHSA-gw5w-5j7f-jmjj is a LOW :slice::from_raw_parts` vulnerability (General Security Weakness) affecting Unsound usages of `std libraries in the crates.io ecosystem. The issue involves :slice::from_raw_parts`. Remediation is available by upgrading affected packages to version 0.14.0.
GHSA-gw5w-5j7f-jmjj at a Glance
How to Fix GHSA-gw5w-5j7f-jmjj
To remediate this vulnerability, upgrade all affected Unsound usages of `std 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 pprof to 0.14.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for pprof
How to Check if You Are Affected
To determine whether your application is affected by GHSA-gw5w-5j7f-jmjj, inspect your project dependencies for Unsound usages of `std:
inspect dependencies for pprof
Analyze the terminal output to locate any version of Unsound usages of `std in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.14.0), 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 Unsound usages of `std, 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-gw5w-5j7f-jmjj Affected Unsound usages of `std Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pprof
|
crates.io |
< 0.14.0
|
0.14.0
|
References
Frequently Asked Questions
What is GHSA-gw5w-5j7f-jmjj?
Which Unsound usages of `std versions are affected?
What version fixes GHSA-gw5w-5j7f-jmjj?
Is pprof affected?
What CWE is associated with GHSA-gw5w-5j7f-jmjj?
How can I check crates.io dependencies for GHSA-gw5w-5j7f-jmjj?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-gw5w-5j7f-jmjj",
"modified" : "2024-12-05T19:05:57Z",
"published" : "2024-12-05T19:05:57Z",
"aliases" : [ ],
"summary" : "Unsound usages of `std::slice::from_raw_parts` ",
"details" : "The library breaks the safety assumptions when using unsafe API `std::slice::from_raw_parts`. First, when using the API in iterator implementation (`TempFdArrayIterator.next`), generic type could be any type, which would create and pass a misaligned pointer to the unsafe API. Second, when validating the address, the code passed the type `c_void`, which could also be any type, leading to potential uninitialized memory exposure. \n\nTwo unsound usages here highlight the necessity for developers to perform type checks before doing type conversion with unsafe API. \n\nThe panic caused by the misalignment causes several downstream applications (e.g., `greptimedb`) to crash when using `pprof::report::ReportBuilder::build`. \n\nThis was patched in 0.14.0. \n\nThe developer also suggested moving to [pprof2](https://crates.io/crates/pprof2). \n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "pprof"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.14.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/tikv/pprof-rs/issues/232"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/tikv/pprof-rs"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2024-0408.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2024-12-05T19:05:57Z",
"nvd_published_at" : null
}
}