{"id":"GHSA-xcpm-76hf-c9cc","aliases":["RUSTSEC-2025-0107"],"status":"published","title":"Borrowck Scarifices exposes uninitialized memory in any_as_u8_slice","description":"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 `\u0026[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.","severity":{"version":"4.0","score":2,"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","level":"low","from":"ghsa"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-824"],"published":"2025-10-21T12:00:00Z","modified":"2025-10-28T06:29:26Z","fixes":[{"ecosystem":"crates.io","package":"borrowck_sacrifices","fixed_in":["0.2.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"borrowck_sacrifices","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.2.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"borrowck_sacrifices","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.2.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"borrowck_sacrifices","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.2.0"}]}]}],"references":[{"url":"https://github.com/alexpyattaev/borrowck_sacrifices/issues/1","tags":["web","report"]},{"url":"https://github.com/alexpyattaev/borrowck_sacrifices/commit/1bdaa14da68a6e8207f9e81359116f53139800f2","tags":["web"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2025-0107.html","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-xcpm-76hf-c9cc"},{"url":"https://github.com/alexpyattaev/borrowck_sacrifices","tags":["package"]},{"url":"https://crates.io/crates/borrowck_sacrifices","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-xcpm-76hf-c9cc","title":"Borrowck Scarifices exposes uninitialized memory in any_as_u8_slice","description":"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 `\u0026[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.","status":"published","published":"2025-10-22T16:35:08Z","modified":"2025-10-22T16:35:09Z","cvss":[{"version":"4.0","score":2,"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","level":"low"}],"cwes":["CWE-824"],"updated_at":"2026-11-02T14:39:02.474737Z"}],"osv":[{"id":"GHSA-xcpm-76hf-c9cc","title":"Borrowck Scarifices exposes uninitialized memory in any_as_u8_slice","description":"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 `\u0026[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.","status":"published","published":"2025-10-22T16:35:08Z","modified":"2025-10-28T06:29:26.916895Z","cvss":[{"version":"4.0","score":2,"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","level":"low"}],"cwes":["CWE-824"],"updated_at":"2026-11-02T15:46:59.835583Z"},{"id":"RUSTSEC-2025-0107","title":"Uninitialized memory exposure in any_as_u8_slice","description":"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 `\u0026[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.","status":"published","published":"2025-10-21T12:00:00Z","modified":"2025-10-28T06:29:26.916895Z","updated_at":"2026-11-02T15:53:39.971022Z"}]}}
