{"id":"GHSA-gv7f-5qqh-vxfx","aliases":["RUSTSEC-2024-0431"],"status":"published","title":"xous has unsound usages of `core::slice::from_raw_parts`","description":"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`.","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"published":"2024-12-23T12:00:00Z","modified":"2025-10-28T06:29:24Z","fixes":[{"ecosystem":"crates.io","package":"xous","fixed_in":["0.9.51"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"xous","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.9.51"}]}]},{"source":"osv","ecosystem":"crates.io","package":"xous","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.9.51"}]}]},{"source":"osv","ecosystem":"crates.io","package":"xous","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.9.51"}]}]}],"references":[{"url":"https://github.com/betrusted-io/xous-core/issues/410","tags":["web","report"]},{"url":"https://github.com/betrusted-io/xous-core/pull/411","tags":["web"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2024-0431.html","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-gv7f-5qqh-vxfx"},{"url":"https://github.com/betrusted-io/xous-core","tags":["package"]},{"url":"https://crates.io/crates/xous","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-gv7f-5qqh-vxfx","title":"xous has unsound usages of `core::slice::from_raw_parts` ","description":"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`.\n","status":"published","published":"2024-12-30T16:52:46Z","modified":"2024-12-30T16:52:49Z","updated_at":"2026-11-02T14:38:26.167657Z"}],"osv":[{"id":"GHSA-gv7f-5qqh-vxfx","title":"xous has unsound usages of `core::slice::from_raw_parts` ","description":"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`.\n","status":"published","published":"2024-12-30T16:52:46Z","modified":"2025-10-28T06:29:24.84152Z","updated_at":"2026-11-02T15:46:48.191583Z"},{"id":"RUSTSEC-2024-0431","title":"Unsound usages of `core::slice::from_raw_parts`","description":"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`.","status":"published","published":"2024-12-23T12:00:00Z","modified":"2025-10-28T06:29:24.84152Z","updated_at":"2026-11-02T15:53:39.971022Z"}]}}
