Gdb: gdb: out-of-bounds write in stabs parser read_member_functions() via crafted elf
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: total
Summary
A flaw was found in GDB's STABS debug format parser. The read_member_functions() function in gdb/stabsread.c contains a linked list removal bug in the code that separates destructor and non-destructor member functions of C++ classes. The bug causes the destructor entries to remain in the main function list while the list length counter is decremented, resulting in an out-of-bounds write when the function list is copied to its final allocated array. An attacker can craft an ELF binary with malicious .stab and .stabstr sections that triggers this out-of-bounds write when a user opens the file in GDB and performs any symbol-inspection operation such as setting a breakpoint. The inferior process does not need to be executed. Under controlled conditions, this was demonstrated to achieve execution of arbitrary commands within the GDB process.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
- Record last updated
Affected versions
- gdb
Version range not reported
- gdb
Version range not reported
- gdb
Version range not reported
- costmanagement/costmanagement-ui-rhel10
Version range not reported
- gdb-main
Version range not reported
- rhui5/cds-kubernetes-rhel9
Version range not reported
- rhui5/cds-rhel9
Version range not reported
- rhui5/haproxy-rhel9
Version range not reported
- rhui5/installer-rhel9
Version range not reported
- rhui5/rhua-rhel9
Version range not reported
- gdb
Version range not reported
- gdb
Version range not reported