CVE-2026-13732
Public on 2026-08-31
Modified on 2026-09-03
Description
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.
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.
Severity
See what this means
CVSS v3 Base Score
See breakdown
Affected Packages
| Platform | Package | Release Date | Advisory | Status |
|---|---|---|---|---|
| Amazon Linux 2 - Core | crash | Pending Fix | ||
| Amazon Linux 2023 | crash | Pending Fix | ||
| Amazon Linux 2027 Preview | crash | Pending Fix | ||
| Amazon Linux 2023 | cuda-gdb-12-5 | Pending Fix | ||
| Amazon Linux 2023 | cuda-gdb-12-6 | Pending Fix | ||
| Amazon Linux 2023 | cuda-gdb-12-8 | Pending Fix | ||
| Amazon Linux 2023 | cuda-gdb-12-9 | Pending Fix | ||
| Amazon Linux 2023 | cuda-gdb-13-0 | Pending Fix | ||
| Amazon Linux 2023 | cuda-gdb-13-1 | Pending Fix | ||
| Amazon Linux 2023 | cuda-gdb-13-2 | Pending Fix | ||
| Amazon Linux 2023 | cuda-gdb-13-3 | Pending Fix | ||
| Amazon Linux 2 - Core | gdb | Pending Fix | ||
| Amazon Linux 2023 | gdb | Pending Fix | ||
| Amazon Linux 2027 Preview | gdb | Pending Fix |
CVSS Scores
| Score Type | Score | Vector | |
|---|---|---|---|
| Amazon Linux | CVSSv3 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |