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.
Published: 2026-08-31
Score: 7.8 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

A flaw in GDB’s STABS parser allows an out‑of‑bounds write during the processing of the read_member_functions() routine. The vulnerability is triggered when a user loads an ELF binary containing malicious .stab and .stabstr sections, causing an out‑of‑bounds overwrite of adjacent memory that can be leveraged to execute arbitrary commands inside the GDB process. This defect is a classic buffer overflow (CWE‑787) and can be triggered by simple debugging actions such as setting a breakpoint, without needing to run the inferior program.

Affected Systems

The issue affects systems that ship GDB with STABS support on Red Hat Enterprise Linux 6 through 10 and Red Hat Hardened Images. All RHEL releases that include a GDB version that still parses STABS data are vulnerable; the specific GDB version is not listed, but the vulnerability persists until GDB 18, which is expected to drop STABS parsing altogether. Any system running GDB 17 or earlier that debugs untrusted ELF files containing STABS sections is therefore at risk.

Risk and Exploitability

The CVSS score of 7.8 indicates a high severity, but EPSS data is unavailable and the vulnerability is not yet listed in CISA KEV, suggesting no widespread exploitation. The attack vector is local: an attacker must cause a user or an automated system to start GDB with a crafted ELF file. Because routine debugging operations trigger the flaw, a local attacker can hijack the debugger process to run arbitrary commands, potentially escalating privileges or pivoting to other vulnerabilities. Until a vendor patch is released, mitigation requires updating GDB to a version that no longer supports STABS or avoiding debugging untrusted binaries.

Generated by OpenCVE AI on August 31, 2026 at 20:22 UTC.

Remediation

Vendor Workaround

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.


OpenCVE Recommended Actions

  • Update GDB to a patched version that removes STABS support (e.g., GDB 18 once released) or use a vendor‑provided GDB that contains the fix.
  • Strip STABS sections from any ELF binaries before loading them in GDB with objcopy --remove-section=.stab --remove-section=.stabstr.
  • Verify whether a binary contains STABS sections with readelf -S <binary> | grep stab before debugging; if present, avoid using GDB for that binary or use an alternative debugger.
  • Run GDB in a sandboxed or containerized environment with restricted filesystem access when debugging potentially untrusted binaries.

Generated by OpenCVE AI on August 31, 2026 at 20:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 31 Aug 2026 21:45:00 +0000

Type Values Removed Values Added
First Time appeared Redhat hardened Images
Vendors & Products Redhat hardened Images

Mon, 31 Aug 2026 19:30:00 +0000

Type Values Removed Values Added
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.
Title Gdb: gdb: out-of-bounds write in stabs parser read_member_functions() via crafted elf
First Time appeared Redhat
Redhat enterprise Linux
Redhat hummingbird
Weaknesses CWE-787
CPEs cpe:/a:redhat:hummingbird:1
cpe:/o:redhat:enterprise_linux:10
cpe:/o:redhat:enterprise_linux:6
cpe:/o:redhat:enterprise_linux:7
cpe:/o:redhat:enterprise_linux:8
cpe:/o:redhat:enterprise_linux:9
Vendors & Products Redhat
Redhat enterprise Linux
Redhat hummingbird
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}


Subscriptions

Redhat Enterprise Linux Hardened Images Hummingbird
cve-icon MITRE

Status: PUBLISHED

Assigner: redhat

Published:

Updated: 2026-08-31T19:23:18.741Z

Reserved: 2026-06-29T14:42:33.339Z

Link: CVE-2026-13732

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-31T20:17:02.180

Modified: 2026-08-31T20:17:02.180

Link: CVE-2026-13732

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-31T21:20:13Z

Weaknesses