{"id":"RUSTSEC-2024-0431","summary":"Unsound usages of `core::slice::from_raw_parts`","details":"We consider `as_slice` and `as_slice_mut` unsound because: the pointer with any bit patterns could be cast to the slice of arbitrary types. The pointer could be created by unsafe new and deprecated `from_parts`. We consider that `from_parts` should be removed in latest version because it will help trigger unsoundness in `as_slice`. With new declared as unsafe, `as_slice` should also declared as unsafe.  \n\nThis was patched in by marking two functions as `unsafe`.","aliases":["GHSA-gv7f-5qqh-vxfx"],"modified":"2025-10-28T06:29:24.841520Z","published":"2024-12-23T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/xous"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2024-0431.html"},{"type":"REPORT","url":"https://github.com/betrusted-io/xous-core/issues/410"},{"type":"WEB","url":"https://github.com/betrusted-io/xous-core/pull/411"}],"affected":[{"package":{"name":"xous","ecosystem":"crates.io","purl":"pkg:cargo/xous"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.9.51"}]}],"ecosystem_specific":{"affects":{"arch":[],"os":[],"functions":["xous::definitions::MemoryRange::as_slice","xous::definitions::MemoryRange::as_slice_mut"]},"affected_functions":null},"database_specific":{"cvss":null,"informational":"unsound","source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2024-0431.json","categories":[]}}],"schema_version":"1.7.3"}