Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

redhat логотип

CVE-2026-13732

Опубликовано: 06 авг. 2026
Источник: redhat
CVSS3: 7
EPSS Низкий

Описание

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.

Отчет

This flaw affects the STABS debug format parser in GDB, which is present and active in all currently supported Red Hat product streams that ship GDB. The STABS format is a legacy debug information format predating DWARF that GDB parses automatically from .stab/.stabstr ELF sections. While GCC removed STABS emitting support in GCC 13 and GDB deprecated STABS parsing in GDB 17, all deployed GDB versions parse STABS data without user opt-in. An attacker can embed STABS sections in any ELF binary, including one compiled with DWARF debug information, and GDB will parse both. The vulnerability requires the user to open the crafted binary in GDB and issue a symbol-inspection command, which is normal GDB usage.

Меры по смягчению последствий

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.

Затронутые пакеты

ПлатформаПакетСостояниеРекомендацияРелиз
Red Hat Enterprise Linux 10gdbAffected
Red Hat Enterprise Linux 6gdbAffected
Red Hat Enterprise Linux 7gdbAffected
Red Hat Enterprise Linux 8gdbAffected
Red Hat Enterprise Linux 9gdbAffected
Red Hat Hardened ImagesgdbAffected

Показывать по

Дополнительная информация

Статус:

Important
Дефект:
CWE-787
https://bugzilla.redhat.com/show_bug.cgi?id=2494416gdb: gdb: Out-of-bounds write in STABS parser read_member_functions() via crafted ELF

EPSS

Процентиль: 2%
0.00117
Низкий

7 High

CVSS3

Связанные уязвимости

CVSS3: 7
ubuntu
21 день назад

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.

CVSS3: 7
nvd
21 день назад

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.

msrc
12 дней назад

Gdb: gdb: out-of-bounds write in stabs parser read_member_functions() via crafted elf

CVSS3: 7
debian
21 день назад

A flaw was found in GDB's STABS debug format parser. The read_member_f ...

CVSS3: 7.8
github
21 день назад

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.

EPSS

Процентиль: 2%
0.00117
Низкий

7 High

CVSS3