PT-2025-46132 · Crates.Io · Borrowck Sacrifices

Published

2025-10-21

·

Updated

2025-10-21

None

No severity ratings or metrics are available. When they are, we'll update the corresponding info on the page.
The safe function any as u8 slice can create byte slices that reference uninitialized memory when used with types containing padding bytes.
The 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.
Found an issue in the description? Have something to add? Feel free to write us 👾

Related Identifiers

RUSTSEC-2025-0107

Affected Products

Borrowck Sacrifices