GHSA-xcpm-76hf-c9cc json
Borrowck Scarifices exposes uninitialized memory in any_as_u8_slice
published last yr. modified last yr. also RUSTSEC-2025-0107
- cvss
- —
- not scored
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- —
- no score, EPSS covers CVEs only
- public exploits
- 0
- none known
Summary
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.
Patch / fix
Is GHSA-xcpm-76hf-c9cc in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerAffected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | borrowck_sacrifices | <0.2.0 >=0.0.0-0, <0.2.0 |
0.2.0 |
Classification
- Weakness
-
- CWE-824 Access of Uninitialized Pointer
References
-
github.com
/alexpyattaev/borrowck_sacrifices/commit/1bdaa14da68a6e8207f9e81359116f53139800f2
web
-
github.com
/alexpyattaev/borrowck_sacrifices/issues/1
web, report
-
github.com
/alexpyattaev/borrowck_sacrifices
package
-
rustsec.org
/advisories/RUSTSEC-2025-0107.html
web, advisory
-
crates.io
/crates/borrowck_sacrifices
package
Sources
- GitHub Advisory GHSA-xcpm-76hf-c9cc
- OSV RUSTSEC-2025-0107
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.