RUSTSEC-2023-0016

Source
https://rustsec.org/advisories/RUSTSEC-2023-0016
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2023-0016.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2023-0016
Aliases
Published
2023-02-20T12:00:00Z
Modified
2023-11-08T04:15:57.343834Z
Summary
Possible out-of-bounds read in release mode
Details

Affected versions of this crate were using a debug assertion to validate the last parameter of partial_sort(). This would allow invalid inputs to cause an out-of-bounds read instead of immediately panicking, when compiled without debug assertions.

All writes are bounds-checked, so the out-of-bounds memory access is read-only. This also means that the first attempted out-of-bounds write will panic, limiting the possible reads.

The accessible region is further limited by an initial bounds-checked read at (last / 2) - 1, i.e., it is proportional to the size of the vector.

This bug has been fixed in v0.2.0.

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

Affected packages

crates.io / partial_sort

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.0.0-0
Fixed
0.2.0

Ecosystem specific

{
    "affected_functions": null,
    "affects": {
        "os": [],
        "functions": [],
        "arch": []
    }
}

Database specific

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