Rust advisories / xous
Unsound LowRUSTSEC-2024-0431 · xous
RUSTSEC-2024-0431: Unsound usages of `core::slice::from_raw_parts`
Short answerxous has an API that can cause undefined behaviour from safe code: Unsound usages of `core::slice::from_raw_parts`. Fixed in 0.9.51.
| Crate | xous |
|---|---|
| Type | Unsound |
| Affected versions | Before 0.9.51. |
| Fixed in | 0.9.51 |
| Severity | Low (GitHub rating) |
| Published | 2024-12-23 |
| Last changed | 2025-10-28 |
| Also known as | GHSA-gv7f-5qqh-vxfx |
| Affected functions | xous::definitions::MemoryRange::as_slice, xous::definitions::MemoryRange::as_slice_mut |
What to do
- See which version you have:
cargo tree -i xous(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p xous. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for examplexous = "0.9.51") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
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.
This was patched in by marking two functions as unsafe.
References
- Package: crates.io/crates/xous
- Advisory: rustsec.org/advisories/RUSTSEC-2024-0431.html
- Report: github.com/betrusted-io/xous-core/issues/410
- Web: github.com/betrusted-io/xous-core/pull/411
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Up next
Are you affected?Check your whole dependency treePaste Cargo.lock: every advisory, for your exact versions.Read it next →Also worth your time
Did this answer your question?