Bug 2565678 (CVE-2026-121996) - CVE-2026-121996 gdb: gdbserver: heap disclosure and wild pointer in gdb_parse_agent_expr via untrusted agent-expression length
Summary: CVE-2026-121996 gdb: gdbserver: heap disclosure and wild pointer in gdb_parse...
Keywords:
Status: NEW
Alias: CVE-2026-121996
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-11-03 10:03 UTC by OSIDB Bzimport
Modified: 2026-11-05 14:35 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2026-11-03 10:03:12 UTC
Length validation flaw in gdb_parse_agent_expr (gdbserver/ax.cc). The function trusts the attacker-declared xlen unconditionally: xmalloc(xlen) allocates the buffer and aexpr->length is set to xlen, but hex2bin stops at the packet terminator if actual data is shorter, leaving the buffer tail uninitialized. Additionally, *actparm is advanced by xlen*2 regardless of actual data length, producing a wild pointer the caller dereferences. Two confirmed impacts: (1) gdbserver echoes uninitialized heap bytes back to the client, disclosing heap addresses for ASLR bypass; (2) deterministic crash via wild pointer when declared length greatly exceeds actual data.


Note You need to log in before you can comment on or make changes to this bug.