GHSA-xcpm-76hf-c9cc
LOWBorrowck Scarifices exposes uninitialized memory in any_as_u8_slice
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.
- Published
- 21 Oct 2025
- Last modified
- 28 Oct 2025
- Weakness
- CWE-824
- Also known as
- RUSTSEC-2025-0107
- Sources
- OSVJSONOSV RUSTSEC-2025-0107JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | 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 |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | crates.io | borrowck_sacrifices | < 0.2.0 | 0.2.0 |
| OSV | crates.io | borrowck_sacrifices | >= 0.0.0-0, < 0.2.0 | 0.2.0 |
References
- https://github.com/alexpyattaev/borrowck_sacrifices/issues/1 · WEB, REPORT
- https://github.com/alexpyattaev/borrowck_sacrifices/commit/1bdaa14da68a6e8207f9e81359116f53139800f2 · WEB
- https://github.com/alexpyattaev/borrowck_sacrifices · PACKAGE
- https://rustsec.org/advisories/RUSTSEC-2025-0107.html · WEB, ADVISORY
- https://crates.io/crates/borrowck_sacrifices · PACKAGE
History
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 21 Oct 2025)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 22 Oct 2025)