Skip to main content
← Vulnerabilities

Gdb: gdb: stack buffer overflow in fetch_register_using_p via unchecked p-reply length

Affects GDB as shipped with Red Hat Enterprise Linux 6 through 10 and Red Hat Hardened Images when it connects to a malicious or compromised debug target. No fixed version is listed in the checked facts.

Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.

8.8HighCNA
Exploited
No known exploitation
Fix
No fix listed
Who is exposed
Specific setups only

Do first: Check whether your setup matches what the bug needs. GDB connects to a malicious or compromised debug target The affected GDB is the build shipped with Red Hat Enterprise Linux

Published
Last modified
37/100 · provisional
Specific setups only
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: total

Summary

GDB, the GNU debugger, contains a stack buffer overflow in its remote protocol handler that lets an attacker-controlled debug target execute arbitrary code in the GDB process. An attacker can reach it remotely, without logging in, but a user must take an action to trigger it.

Read the original description

A stack buffer overflow in the GDB client's remote protocol handler allows an attacker-controlled debug target to execute arbitrary code in the GDB process. The vulnerability exists in fetch_register_using_p, which decodes a stub's register reply into an alloca-sized buffer without bounding writes by the register width.

cve.now Index

37Pcve.now Index 37 of 100 · methodology v3 · provisional
  • Exploitation0/40No signal
  • Exposure12/25Specific setups only, reachable over the network without a login
  • Reach10/20Shipped in major Linux distributions
  • Severity9.8/10CVSS 8.8, total technical impact per CISA
  • No patch5/5No patch listed yet

What would change the score

  • Would score about 87 if added to CISA KEV
  • Would score about 82 if CISA's SSVC rates exploitation active

What to do

  • Check whether your setup matches what the bug needs.

    GDB connects to a malicious or compromised debug target The affected GDB is the build shipped with Red Hat Enterprise Linux
  • Workaround: Connect GDB only to debug targets you trust, and avoid attaching it to untrusted or possibly compromised targets until a fixed package is installed.

Timeline

  1. CVE published
  2. First seen by cve.now
  3. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: total

  4. Record last updated

Affected versions

  • crash

    Version range not reported

  • gdb

    Version range not reported

  • gdb

    Version range not reported

  • gdb

    Version range not reported

  • crash

    Version range not reported

  • gcc-toolset-14-gdb

    Version range not reported

  • gcc-toolset-15-gdb

    Version range not reported

  • gdb

    Version range not reported

Show all 11 packagesShow fewer packages
  • crash

    Version range not reported

  • gdb

    Version range not reported

  • gdb

    Version range not reported

Evidence 2

  1. Report
  2. Link

Corrections

None so far.

Something wrong on this page? Report an error. Every fix is listed here.

Questions about CVE-2026-121994

Is CVE-2026-121994 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data

What does this mean?

A stack buffer overflow in GDB's fetch_register_using_p function occurs because the length of a p-reply from the debug target is not checked. A malicious or compromised debug target can use this to run arbitrary code in the GDB process.Source: access.redhat.com

Am I affected, and how do I check?

The affected build is GDB as shipped with Red Hat Enterprise Linux 6, 7, 8, 9, and 10 and Red Hat Hardened Images. To check a GDB build, run gdb --version or rpm -q gdb on the system. Exposure requires connecting GDB to a malicious or compromised debug target.Source: access.redhat.com

How do I fix CVE-2026-121994?

The checked facts do not list a fixed package version. Install the GDB update from Red Hat once it is available, and check the Red Hat advisory for the package build that contains the fix. Until then, avoid connecting GDB to debug targets that are not trusted.Source: access.redhat.com

What if there's no patch?

Connect GDB only to debug targets you trust, and avoid attaching it to untrusted or possibly compromised targets until a fixed package is installed.Source: access.redhat.com