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

Published Nov 3, 2026
·
Updated

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 fetchregisterusingp, which decodes a stub's register reply into an alloca-sized buffer without bounding writes by the register width.

Other sources

Stack buffer overflow in remotetarget::fetchregisterusingp (gdb/remote.c). The function allocates a stack buffer via alloca(registersize) then decodes the stub's p-reply into it with a loop that terminates only on NUL, without bounding writes by registersize. A malicious RSP stub sends an oversized p-reply to overflow the stack buffer and overwrite the saved return address. The same primitive — with a reply shorter than registersize — leaks stack bytes via rawsupply, enabling canary and ASLR disclosure from the same connection.

— Red Hat

Affected Software

0 affected components

Event History

Nov 3, 2026
Data Sourced
via Red Hat·10:03 AM
DescriptionSeverityAffected Software
Nov 5, 2026
CVE Published
via MITRE·04:08 PM
Data Sourced
via MITRE·04:08 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:18 PM
DescriptionSeverityWeakness

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203