Listen to this Post
The CVE-2024-34499 vulnerability in LIEF arises from a null pointer dereference in the ELF binary parser. Specifically, the function `Parser::parse_binary` in `src/ELF/Parser.tcc` fails to validate pointers before dereferencing them when processing ELF files. When parsing a crafted ELF binary, certain structures can be missing or malformed, leading to a null pointer being accessed. This occurs during the parsing of ELF sections or entries where the code assumes valid pointers without checks. The dereference of a null pointer causes a segmentation fault, crashing the application. Attackers can exploit this by providing a malicious ELF file locally, triggering the crash. The exploit leverages the lack of input validation in the parser, allowing denial-of-service. In some environments, this crash could be weaponized for arbitrary code execution if the application handles signals improperly or runs with elevated privileges. The vulnerability is confined to local attacks, requiring the attacker to supply the file directly. The public release of the exploit increases the risk, as proof-of-concept code is available. The patch adds null checks before pointer dereferences, ensuring robust handling of malformed inputs.
Platform: LIEF Project
Version: up to 0.17.1
Vulnerability: Null Pointer Dereference
Severity: Critical
date: 2024-05-01
Prediction: Patched 2024-05-15
What Undercode Say:
Check LIEF version
python -c “import lief; print(lief.__version__)”
Compile exploit code
gcc -o exploit exploit.c
Run LIEF on malicious ELF
python parse_elf.py exploit.elf
how Exploit:
Craft malformed ELF file with missing sections to trigger null pointer dereference in parse_binary, causing application crash or denial-of-service.
Protection from this CVE
Upgrade to LIEF 0.17.2, apply patch 81bd5d7ea0c390563f1c4c017c9019d154802978, validate ELF files before parsing.
Impact:
Denial-of-service, potential arbitrary code execution, system instability.
🎯Let’s Practice Exploiting & Learn Patching For Free:
Sources:
Reported By: github.com
Extra Source Hub:
Undercode

