{"id":"RUSTSEC-2026-0597","summary":"`hugepage_rs::Box::new` may cause undefined behavior when initializing memory","details":"`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.\n\nThe issue was fixed in version `0.1.2` by using `ptr::write(nn.as_ptr(), data)` to initialize memory directly through a raw pointer.","modified":"2026-11-24T09:30:02.335495410Z","published":"2026-10-28T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/hugepage-rs"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2026-0597.html"},{"type":"REPORT","url":"https://github.com/cppcoffee/hugepage-rs/issues/9"},{"type":"WEB","url":"https://github.com/cppcoffee/hugepage-rs/pull/8"},{"type":"WEB","url":"https://github.com/cppcoffee/hugepage-rs/releases/tag/v0.1.2"}],"affected":[{"package":{"name":"hugepage-rs","ecosystem":"crates.io","purl":"pkg:cargo/hugepage-rs"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.1.2"}]}],"ecosystem_specific":{"affects":{"arch":[],"os":[],"functions":["hugepage_rs::Box::new"]},"affected_functions":null},"database_specific":{"categories":[],"cvss":null,"informational":"unsound","source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0597.json"}}],"schema_version":"1.9.2"}