Advisory

GHSA-xcpm-76hf-c9cc

Also known as: RUSTSEC-2025-0107

Summary

Borrowck Scarifices exposes uninitialized memory in any_as_u8_slice

Details

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.

Severity

Low Basis: The source's own band: LOW

Dates

Published
2025-10-22 16:35 UTC
Modified
2025-10-28 06:29 UTC

Affected packages and fixes

borrowck_sacrifices

crates.io · All systems

Affected

  • introduced 0, fixed 0.2.0 (semver)

Fixed versions

0.2.0

Fix

  • Fixed version 0.2.0
    cargo update -p borrowck_sacrifices --precise 0.2.0

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences