# GHSA-xcpm-76hf-c9cc: Borrowck Scarifices exposes uninitialized memory in any_as_u8_slice

- Severity: Low (CVSS:4.0, scored by GitHub) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2025-10-21T12:00:00.000Z
- Modified: 2025-10-28T06:29:26.916Z
- Also known as: RUSTSEC-2025-0107
- Weaknesses: CWE-824

## Description

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.

(As written by GitHub Advisory Database.)

## Affected

- borrowck_sacrifices (crates.io): before 0.2.0; from 0.0.0-0 before 0.2.0

## References

- <https://github.com/alexpyattaev/borrowck_sacrifices/issues/1> (report, web)
- <https://github.com/alexpyattaev/borrowck_sacrifices/commit/1bdaa14da68a6e8207f9e81359116f53139800f2> (web)
- <https://github.com/alexpyattaev/borrowck_sacrifices> (package)
- <https://rustsec.org/advisories/RUSTSEC-2025-0107.html> (advisory, web)
- <https://crates.io/crates/borrowck_sacrifices> (package)

## Sources

- GitHub Advisory Database: [GHSA-xcpm-76hf-c9cc](https://github.com/advisories/GHSA-xcpm-76hf-c9cc), CC-BY-4.0, modified 2025-10-28
- RustSec Advisory Database: [RUSTSEC-2025-0107](https://rustsec.org/advisories/RUSTSEC-2025-0107.html), CC0-1.0, modified 2025-10-28

---

Page: https://cve.day/GHSA-xcpm-76hf-c9cc · Whole record: https://cve.day/GHSA-xcpm-76hf-c9cc.json · Rebuilt by cve.day 2026-11-25T22:56:43.276Z
