Gdb: gdb: out-of-bounds write in stabs parser read_member_functions() via crafted elf
Summary
| CVE | CVE-2026-13732 |
|---|---|
| State | PUBLISHED |
| Assigner | redhat |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-08-31 20:17:02 UTC |
| Updated | 2026-11-12 12:18:23 UTC |
| 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. |
Risk And Classification
Primary CVSS: v3.1 7 HIGH from [email protected]
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS: 0.001440000 probability, percentile 0.037000000 (date 2026-11-09)
Problem Types: CWE-787 | CWE-787 Out-of-bounds Write
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Secondary | 7 | HIGH | CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H |
| 3.1 | CNA | CVSS | 7 | HIGH | CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H |
CVSS v3.1 Breakdown
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Red Hat | Red Hat Enterprise Linux 10 | unaffected 0:16.3-3.1.el10_2 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 10.0 Extended Update Support | unaffected 0:14.2-4.3.el10_0 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8 | unaffected 0:8.2-20.1.el8_10 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support | unaffected 0:8.2-15.1.el8_4 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On | unaffected 0:8.2-15.1.el8_4 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support | unaffected 0:8.2-18.1.el8_6 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-On | unaffected 0:8.2-18.1.el8_6 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8.8 Telecommunications Update Service | unaffected 0:8.2-19.1.el8_8 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8.8 Update Services For SAP Solutions | unaffected 0:8.2-19.1.el8_8 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9 | unaffected 0:16.3-3.1.el9_8 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9.2 Update Services For SAP Solutions | unaffected 0:10.2-10.2.el9_2 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9.4 Update Services For SAP Solutions | unaffected 0:10.2-13.1.el9_4 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9.6 Extended Update Support | unaffected 0:14.2-4.2.el9_6 * rpm | Not specified |
| CNA | Red Hat | Red Hat Cost Management On-Premise 1 | unaffected 1791460851 * rpm | Not specified |
| CNA | Red Hat | Red Hat Hardened Images | unaffected 17.2-6.2.hum1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Update Infrastructure 5 | unaffected 1791978534 * rpm | Not specified |
| CNA | Red Hat | Red Hat Update Infrastructure 5 | unaffected 1791978528 * rpm | Not specified |
| CNA | Red Hat | Red Hat Update Infrastructure 5 | unaffected 1791978528 * rpm | Not specified |
| CNA | Red Hat | Red Hat Update Infrastructure 5 | unaffected 1791964013 * rpm | Not specified |
| CNA | Red Hat | Red Hat Update Infrastructure 5 | unaffected 1791978693 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 6 | Not specified | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 7 | Not specified | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| access.redhat.com/errata/RHSA-2026:99597 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:96095 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:82939 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:99596 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:96098 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:96097 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:82447 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:96096 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:99594 | [email protected] | access.redhat.com | |
| access.redhat.com/security/cve/CVE-2026-13732 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:79357 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:73425 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:73427 | [email protected] | access.redhat.com | |
| bugzilla.redhat.com/show_bug.cgi | [email protected] | bugzilla.redhat.com | |
| access.redhat.com/errata/RHSA-2026:73426 | [email protected] | access.redhat.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
Vendor Comments And Credit
Discovery Credit
CNA: Red Hat would like to thank JD Marsters (Bhut Red) for reporting this issue. (en)
Additional Advisory Data
| Source | Time | Event |
|---|---|---|
| CNA | 2026-06-29T14:42:56.970Z | Reported to Red Hat. |
| CNA | 2026-08-06T00:00:00.000Z | Made public. |
Workarounds
CNA: The following practices would help for avoiding exposure and mitigate this flaw: - Do not open untrusted or unknown ELF binaries in GDB without first stripping debug sections. Use `objcopy --remove-section=.stab --remove-section=.stabstr <binary>` before debugging. - Use `readelf -S <binary> | grep stab` to check for the presence of STABS sections before opening a binary in GDB. Legitimate modern binaries use DWARF, not STABS. - Consider using LLDB or other debuggers that do not support STABS for analysis of untrusted binaries. - For automated environments (CI, test farms) that invoke GDB on potentially untrusted binaries, run GDB in a sandboxed or containerized environment with restricted filesystem access. - GDB 17+ deprecates STABS support but still parses it. GDB 18 (expected late 2026/2027) will remove STABS support entirely. - GCC removed STABS emitting in GCC 13 (2023), so legitimately compiled binaries from recent GCC versions will not contain STABS data.