Unsound usages of `std::slice::from_raw_parts`
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- —
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from GitHub.
Summary
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. Two unsound usages here highlight the necessity for developers to perform type checks before doing type conversion with unsafe API. The panic caused by the misalignment causes several downstream applications (e.g., `greptimedb`) to crash when using `pprof::report::ReportBuilder::build`. This was patched in 0.14.0. The developer also suggested moving to [pprof2](https://crates.io/crates/pprof2).
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | pprof (crates.io) | before 0.14.0 | 0.14.0 | Patch available | GHSA-gw5w-5j7f-jmjj |
- pprof (crates.io) Vendor— Affected before 0.14.0 Fixed in 0.14.0 Patch available GHSA-gw5w-5j7f-jmjj
Remediation
- Fix · GHSA-gw5w-5j7f-jmjj pprof (crates.io) Fixed in 0.14.0 Advisory →
Timeline
- 2026-10-03 Threatist record created from GHSA-gw5w-5j7f-jmjj
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences