{"id":"GHSA-xcpm-76hf-c9cc","aliases":["GHSA-xcpm-76hf-c9cc","RUSTSEC-2025-0107"],"related":[],"kind":"vulnerability","state":"published","title":"Borrowck Scarifices exposes uninitialized memory in any_as_u8_slice","summary":"The safe function `any_as_u8_slice` can create byte slices that reference uninitialized memory when used with types containing padding bytes.\n\nThe function uses `slice::from_raw_parts` to create a `&[u8]` covering the entire size of a type, including padding bytes. According to Rust's documentation, `from_raw_parts` requires all bytes to be properly initialized, but padding bytes in structs are not guaranteed to be initialized. This violates the safety contract and causes undefined behavior.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"The safe function `any_as_u8_slice` can create byte slices that reference uninitialized memory when used with types containing padding bytes.\n\nThe function uses `slice::from_raw_parts` to create a `&[u8]` covering the entire size of a type, including padding bytes. According to Rust's documentation, `from_raw_parts` requires all bytes to be properly initialized, but padding bytes in structs are not guaranteed to be initialized. This violates the safety contract and causes undefined behavior.","format":"markdown","source":"ghsa"}],"published":"2025-10-21T12:00:00.000Z","modified":"2025-10-28T06:29:26.916Z","severity":{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P","rating":"LOW"},"severities":[{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P","rating":"LOW"}],"cwes":["CWE-824"],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.2.0"}],"ecosystem":"crates.io","package":"borrowck_sacrifices","purl":"pkg:cargo/borrowck_sacrifices","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.2.0"}],"ecosystem":"crates.io","package":"borrowck_sacrifices","purl":"pkg:cargo/borrowck_sacrifices","source":"rustsec"}],"references":[{"url":"https://github.com/alexpyattaev/borrowck_sacrifices/issues/1","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/alexpyattaev/borrowck_sacrifices/commit/1bdaa14da68a6e8207f9e81359116f53139800f2","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/alexpyattaev/borrowck_sacrifices","tags":["package"],"sources":["ghsa"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2025-0107.html","tags":["advisory","web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/borrowck_sacrifices","tags":["package"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-xcpm-76hf-c9cc","url":"https://github.com/advisories/GHSA-xcpm-76hf-c9cc","licence":"CC-BY-4.0","modified":"2025-10-28T06:29:26.916Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2025-0107","url":"https://rustsec.org/advisories/RUSTSEC-2025-0107.html","licence":"CC0-1.0","modified":"2025-10-28T06:29:26.916Z"}],"updatedAt":"2026-11-25T22:56:43.276Z"}