{"id":"RUSTSEC-2024-0408","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).","aliases":["GHSA-gw5w-5j7f-jmjj"],"modified":"2025-10-28T06:29:24.907969Z","published":"2024-12-04T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/pprof"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2024-0408.html"},{"type":"REPORT","url":"https://github.com/tikv/pprof-rs/issues/232"},{"type":"WEB","url":"https://github.com/tikv/pprof-rs/pull/255"}],"affected":[{"package":{"name":"pprof","ecosystem":"crates.io","purl":"pkg:cargo/pprof"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.14.0"}]}],"ecosystem_specific":{"affects":{"os":[],"functions":["pprof::report::ReportBuilder::build","pprof::validate"],"arch":[]},"affected_functions":null},"database_specific":{"informational":"unsound","categories":[],"source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2024-0408.json","cvss":null}}],"schema_version":"1.7.3"}