---
id: CVE-2026-121997
title: >-
  Gdb: gdbserver: heap buffer overflow in cmd_qtdpsrc via qtdpsrc
  declared/actual length mismatch
summary: >-
  A heap buffer overflow in gdbserver's QTDPsrc packet handler allows an
  unauthenticated remote attacker to achieve native code execution in the
  gdbserver process. The vulnerability results from a mismatch between a
  packet's declared sourc…
severity: high
cvss: 8.1
cvssVector: 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H'
cvssSource: cna
cwe:
  - CWE-122
vendor: Red Hat
product: crash
affected:
  - crash
  - gdb (all versions)
  - gdb (all versions)
  - gdb (all versions)
  - crash
  - gcc-toolset-14-gdb (all versions)
  - gcc-toolset-15-gdb (all versions)
  - gdb (all versions)
  - crash
  - gdb (all versions)
  - gdb (all versions)
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: total
  timestamp: '2026-11-05T17:24:54.506711Z'
published: '2026-11-05'
updated: '2026-11-06'
sourceUpdated: '2026-11-06T04:56:36.443Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-121997'
references:
  - url: 'https://access.redhat.com/security/cve/CVE-2026-121997'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2565679'
    label: RHBZ#2565679
tags:
  - cve.org
ingestedAt: '2026-11-05T22:38:31.491Z'
---

## Overview

A heap buffer overflow in gdbserver's QTDPsrc packet handler allows an unauthenticated remote attacker to achieve native code execution in the gdbserver process. The vulnerability results from a mismatch between a packet's declared source length and the actual data length, causing hex2bin to write beyond the allocated heap buffer.

## Affected

- `crash`
- `gdb (all versions)`
- `gdb (all versions)`
- `gdb (all versions)`
- `crash`
- `gcc-toolset-14-gdb (all versions)`
- `gcc-toolset-15-gdb (all versions)`
- `gdb (all versions)`
- `crash`
- `gdb (all versions)`
- `gdb (all versions)`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

### Workarounds

There is no mitigation for this vulnerability. gdbserver has no authentication mechanism; exposure is limited only by network access to the gdbserver port.
