RUSTSEC-2024-0431

Source
https://rustsec.org/advisories/RUSTSEC-2024-0431
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2024-0431.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2024-0431
Published
2024-12-23T12:00:00Z
Modified
2024-12-28T17:54:04Z
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.

This was patched in by marking two functions as unsafe.

Database specific
{
    "license": "CC0-1.0"
}
References

Affected packages

crates.io / xous

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.0.0-0
Fixed
0.9.51

Ecosystem specific

{
    "affected_functions": null,
    "affects": {
        "os": [],
        "functions": [
            "xous::definitions::MemoryRange::as_slice",
            "xous::definitions::MemoryRange::as_slice_mut"
        ],
        "arch": []
    }
}

Database specific

{
    "cvss": null,
    "informational": "unsound",
    "categories": []
}