xmas-elf potential out-of-bounds read with a malformed ELF file and the HashTable API.
Moderate severity
GitHub Reviewed
Published
Mar 26, 2025
to the GitHub Advisory Database
•
Updated Mar 26, 2025
Description
Published to the GitHub Advisory Database
Mar 26, 2025
Reviewed
Mar 26, 2025
Last updated
Mar 26, 2025
Affected versions of this crate only validated the
index
argument ofHashTable::get_bucket
andHashTable::get_chain
against the input-controlledbucket_count
andchain_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.References