RUSTSEC-2025-0018

Source
https://rustsec.org/advisories/RUSTSEC-2025-0018
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2025-0018.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2025-0018
Published
2025-03-26T12:00:00Z
Modified
2025-03-26T17:38:20Z
Summary
Potential out-of-bounds read with a malformed ELF file and the HashTable API.
Details

Affected versions of this crate only validated the index argument of HashTable::get_bucket and HashTable::get_chain against the input-controlled bucket_count and chain_count fields, but not against the size of the ELF section. As a result, a malformed ELF file could trigger out-of-bounds reads in a consumer of the HashTable API by setting these fields to inappropriately large values that would fall outside the relevant hash table section, and by introducing correspondingly out-of-bounds hash table indexes elsewhere in the ELF file.

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

Affected packages

crates.io / xmas-elf

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.0.0-0
Fixed
0.10.0

Ecosystem specific

{
    "affected_functions": null,
    "affects": {
        "os": [],
        "functions": [
            "xmas_elf::hash::HashTable::get_bucket",
            "xmas_elf::hash::HashTable::get_chain"
        ],
        "arch": []
    }
}

Database specific

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