# RUSTSEC-2026-0597: `hugepage_rs::Box::new` may cause undefined behavior when initializing memory

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-10-28T12:00:00.000Z
- Modified: 2026-11-24T09:30:02.335Z

## 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.

(As written by RustSec Advisory Database.)

## Affected

- hugepage-rs (crates.io): from 0.0.0-0 before 0.1.2

## References

- <https://crates.io/crates/hugepage-rs> (package)
- <https://rustsec.org/advisories/RUSTSEC-2026-0597.html> (advisory)
- <https://github.com/cppcoffee/hugepage-rs/issues/9> (report)
- <https://github.com/cppcoffee/hugepage-rs/pull/8> (web)
- <https://github.com/cppcoffee/hugepage-rs/releases/tag/v0.1.2> (web)

## Sources

- RustSec Advisory Database: [RUSTSEC-2026-0597](https://rustsec.org/advisories/RUSTSEC-2026-0597.html), CC0-1.0, modified 2026-11-24

---

Page: https://cve.day/RUSTSEC-2026-0597 · Whole record: https://cve.day/RUSTSEC-2026-0597.json · Rebuilt by cve.day 2026-11-25T22:56:43.525Z
