NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · Rust (crates.io)

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

lowCVSS 4.0 2.0

The safe function anyasu8slice can create byte slices that reference uninitialized memory when used with types containing padding bytes. The function uses slice::fromrawparts to create a &[u8] covering the entire size of a type, including padding bytes. According to Rust's documentation, fromrawparts requires all bytes to be properly initialized, but padding bytes in structs are not guaranteed to be initialized.

Published Oct 22, 2025

Affected packages

borrowck_sacrifices

Ecosystem
Rust (crates.io)
Affected
< 0.2.0
Fixed in
0.2.0
Check
cargo tree -i borrowck_sacrifices

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology