GHSA-xcpm-76hf-c9cc
Borrowck 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.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- Low
What each source reports
GitHub Advisories Score used
2.0
Borrowck 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.
- Record
GHSA-xcpm-76hf-c9cc- CVSS 4.0
- 2.0 Low
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 - Weakness
- CWE-824
- Updated
- 2026-11-02
OSV
2.0
Borrowck 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.
- Record
GHSA-xcpm-76hf-c9cc- CVSS 4.0
- 2.0 Low
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 - Weakness
- CWE-824
- Updated
- 2026-11-02
OSVRUSTSEC-2025-0107 No score
Uninitialized memory exposure 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.
- Record
RUSTSEC-2025-0107- Updated
- 2026-11-02
Affected packages
| Package | Affected | Fixed |
|---|---|---|
borrowck_sacrificescrates.io |
before 0.2.0 | 0.2.0 |
borrowck_sacrificescrates.io |
0.0.0-0 up to 0.2.0 | 0.2.0 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | GitHub Advisories, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
GHSA-xcpm-76hf-c9cc is a low vulnerability (CVSS 2.0) in borrowck_sacrifices, published October 21, 2025. No source lists public exploit code. Fixed in borrowck_sacrifices 0.2.0.
References
github.com/alexpyattaev/borrowck_sacrifices/issues/1
github.com/alexpyattaev/borrowck_sacrifices/commit/1bdaa14da68a6e8207f9e81359116f53139800f2
rustsec.org/advisories/RUSTSEC-2025-0107.html
github.com/advisories/GHSA-xcpm-76hf-c9cc
github.com/alexpyattaev/borrowck_sacrifices
crates.io/crates/borrowck_sacrifices