# RUSTSEC-2026-0597: hugepage\_rs::Box::new may cause undefined behavior when initializing memory

- Database: RustSec
- Published: 2026-10-28
- Modified: 2026-11-24

## Affected versions

- hugepage-rs (crates.io): fixed in 0.1.2

## Description

`hugepage_rs::Box::new` incorrectly initialized freshly allocated memory. Earlier implementations could either drop an uninitialized `T` or create a mutable reference before the memory contained a valid `T`, causing undefined behavior even when called from safe Rust code.

The issue was fixed in version `0.1.2` by using `ptr::write(nn.as_ptr(), data)` to initialize memory directly through a raw pointer.

## References

- https://crates.io/crates/hugepage-rs
- https://rustsec.org/advisories/RUSTSEC-2026-0597.html
- https://github.com/cppcoffee/hugepage-rs/issues/9
- https://github.com/cppcoffee/hugepage-rs/pull/8
- https://github.com/cppcoffee/hugepage-rs/releases/tag/v0.1.2

Page: https://cve.now/RUSTSEC-2026-0597

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
