Skip to content

GHSA-9cc5-2pq7-hfj8 xmas-elf potential out-of-bounds read with a malformed ELF file and the HashTable API.

MediumCVSS 6.9
Published
Updated
Exploit status
No public exploit known

Description

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.

Upgrade path

1 package: 1 fixed.

PackageAffectedFixed inStatus
crates.io xmas-elf(crates.io) < 0.10; >= 0.0.0-0, < 0.10.0 0.10, 0.10.0 Fixed

Affected products

ProductAffected versionsFixed in
crates.io xmas-elf(crates.io) < 0.10 0.10
crates.io xmas-elf(crates.io) >= 0.0.0-0, < 0.10.0 0.10.0

References