Every CVE Search/ Get API key

GHSA-xcpm-76hf-c9cc

Borrowck Scarifices exposes uninitialized memory in any_as_u8_slice

2.0 LowFix available

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 LowCVSS: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 LowCVSS: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

Affected packages
PackageAffectedFixed
borrowck_sacrifices
crates.io
before 0.2.0
0.2.0
borrowck_sacrifices
crates.io
0.0.0-0 up to 0.2.0
0.2.0

History

History
RecordedChangedSources
first indexedGitHub 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

MoveEnter Open