Skip to main content
VulnerabilityPublished Updated

Hugepage rs: `hugepage_rs::alloc` may cause undefined behavior with zero-sized layouts from safe code

Affects hugepage-rsSource GCVE Database

0
Severity
High

Rated High by Threat Radar's AI analysis

Patch
Available – fixed in 0.1.2

Data as of 24 Nov 2026, 10:24 UTC

What to do

Upgrade hugepage-rs to 0.1.2.

Affected software

ProductAffectedFixed in
crates.iohugepage-rspkg:cargo/hugepage-rsOther threatsAffected
  • >=0.0.0-0 <0.1.2
Fixed in
  • 0.1.2

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Upgrade to hugepage-rs version 0.1.2 or later, where the alloc function is marked unsafe and requires non-zero layout sizes, preventing unsafe usage through safe code. Applying this official fix fully mitigates the issue.

Description

The hugepage-rs crate contained a safe function, hugepage_rs::alloc, that allowed zero-sized memory layout allocations, violating the safety requirements of the underlying GlobalAlloc::alloc method. This flaw exposed unsafe allocation preconditions through safe Rust code, breaking Rust's soundness guarantees. The issue was fixed in version 0.1.2 by marking the alloc function as unsafe and documenting the requirement for non-zero layout sizes.

References

Community reviews

Loading reviews…