GHSA-xcpm-76hf-c9cc

Suggest an improvement
Source
https://github.com/advisories/GHSA-xcpm-76hf-c9cc
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/10/GHSA-xcpm-76hf-c9cc/GHSA-xcpm-76hf-c9cc.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-xcpm-76hf-c9cc
Aliases
Published
2025-10-22T16:35:08Z
Modified
2025-10-28T06:29:54.149091Z
Severity
  • 2.0 (Low) CVSS_V4 - 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 CVSS Calculator
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.

Database specific
{
    "cwe_ids": [
        "CWE-824"
    ],
    "github_reviewed": true,
    "nvd_published_at": null,
    "severity": "LOW",
    "github_reviewed_at": "2025-10-22T16:35:08Z"
}
References

Affected packages

crates.io / borrowck_sacrifices

Package

Name
borrowck_sacrifices
View open source insights on deps.dev
Purl
pkg:cargo/borrowck_sacrifices

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.2.0