# GHSA-gv7f-5qqh-vxfx: xous has unsound usages of `core::slice::from_raw_parts`

- Severity: Low (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2024-12-23T12:00:00.000Z
- Modified: 2025-10-28T06:29:24.841Z
- Also known as: RUSTSEC-2024-0431

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

This was patched in by marking two functions as `unsafe`.

(As written by GitHub Advisory Database.)

## Affected

- xous (crates.io): before 0.9.51; from 0.0.0-0 before 0.9.51

## References

- <https://github.com/betrusted-io/xous-core/issues/410> (report, web)
- <https://github.com/betrusted-io/xous-core/pull/411> (web)
- <https://github.com/betrusted-io/xous-core> (package)
- <https://rustsec.org/advisories/RUSTSEC-2024-0431.html> (advisory, web)
- <https://crates.io/crates/xous> (package)

## Sources

- GitHub Advisory Database: [GHSA-gv7f-5qqh-vxfx](https://github.com/advisories/GHSA-gv7f-5qqh-vxfx), CC-BY-4.0, modified 2025-10-28
- RustSec Advisory Database: [RUSTSEC-2024-0431](https://rustsec.org/advisories/RUSTSEC-2024-0431.html), CC0-1.0, modified 2025-10-28

---

Page: https://cve.day/GHSA-gv7f-5qqh-vxfx · Whole record: https://cve.day/GHSA-gv7f-5qqh-vxfx.json · Rebuilt by cve.day 2026-11-25T22:56:43.233Z
