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

Not scored Published

Unsound pointer casting in xous library allows memory corruption, potentially leading to code execution or crashes.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Not stated
Victim action needed
Not needed
Fix
Available

What is GHSA-gv7f-5qqh-vxfx?

GHSA-gv7f-5qqh-vxfx is a memory corruption vulnerability in xous, published on 23 Dec 2024.

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

Which versions are affected by GHSA-gv7f-5qqh-vxfx?

3 open source packages ship an affected version, including xous.

PackageAffectedFixed in
xous crates.ioAll versions0.9.51
xous crates.ioAll versions0.9.51
xous crates.ioFrom 0.0.0-00.9.51

How do I fix GHSA-gv7f-5qqh-vxfx?

Upgrade xous to 0.9.51 or later.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is GHSA-gv7f-5qqh-vxfx being exploited?

There is no known exploitation of GHSA-gv7f-5qqh-vxfx in the wild and no public exploit code.

Sources

Also known as RUSTSEC-2024-0431.

Is GHSA-gv7f-5qqh-vxfx in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free