RUSTSEC-2026-0598

Source
https://rustsec.org/advisories/RUSTSEC-2026-0598
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0598.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2026-0598
Published
2026-10-27T12:00:00Z
Modified
2026-11-24T09:30:02Z
Summary
`hugepage_rs::alloc` may cause undefined behavior with zero-sized layouts from safe code
Details

hugepage_rs::alloc was a publicly accessible safe function that forwarded a Layout to the hugepage allocator's GlobalAlloc::alloc implementation without enforcing its safety requirements. GlobalAlloc::alloc requires the layout size to be non-zero. However, the safe wrapper allowed callers to pass a zero-sized Layout, violating this precondition without using unsafe. Affected versions therefore exposed an unsafe allocation precondition through safe Rust code, violating Rust's soundness guarantees.

The upstream repository fixed this in version 0.1.2 by marking alloc as unsafe and documenting its non-zero-layout requirement.

Database specific
{
    "license":  "CC0-1.0"
}
References

Affected packages

crates.io / hugepage-rs

Package

Name
hugepage-rs
View open source insights on deps.dev
Purl
pkg:cargo/hugepage-rs

Affected ranges

Type
SEMVER
Events
Introduced
0.0.0-0
Fixed
0.1.2

Ecosystem specific

{
    "affected_functions":  null,
    "affects":  {
        "arch":  [],
        "functions":  [
            "hugepage_rs::alloc"
        ],
        "os":  []
    }
}

Database specific

categories
[]
cvss
null
informational
"unsound"
source
"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0598.json"