Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/5] tracepoint.c hardening against missing separators
@ 2026-11-12 17:41 Keith Seitz
  2026-11-12 17:41 ` [PATCH 1/5] [gdb/remote] Fix stack overflow in parse_tsv_definition Keith Seitz
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Keith Seitz @ 2026-11-12 17:41 UTC (permalink / raw)
  To: gdb-patches

Hi,

This small series introduces some hardening in tracepoint parsers
which have given rise to CVE-2026-121995 and CVE-2026-123151, filed
as gdb/34967 and gdb/34971.

The common thread here is that the various tracepoint parsers do
not validate their inputs, so malformed packets can actually smash
the stack in some cases.  That's Real Bad (TM).

Patch 1 adds the helpers and fixes parse_tsv_definition.
Patch 2 applies them throughout parse_tracepoint_definition (and
  tightens the enable flag to require 'E' or 'D').
Patches 3-5 cover the marker definition parser, and other hardening
  suggested/spotted by AI.

I intentionally stopped short of further hardening such as bounding
the ':X' payload length or rewriting parse_trace_status; those are potential
later follow-ups.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34967
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34971

Keith Seitz (5):
  [gdb/remote] Fix stack overflow in parse_tsv_definition
  [gdb/remote] Fix stack overflow in parse_tracepoint_definition
  [gdb/remote] Harden parse_static_tracepoint_marker_definition
  [gdb/remote] Harden comma separator in parse_tracepoint_definition
  [gdb/remote] Harden parse_tracepoint_status

 gdb/tracepoint.c                     | 107 ++++++----
 gdb/unittests/tracepoint-selftests.c | 289 +++++++++++++++++++++++++++
 2 files changed, 359 insertions(+), 37 deletions(-)


base-commit: 96248aa4173886a47a7aa1798861267edde28801
-- 
2.56.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-11-25 17:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-12 17:41 [PATCH 0/5] tracepoint.c hardening against missing separators Keith Seitz
2026-11-12 17:41 ` [PATCH 1/5] [gdb/remote] Fix stack overflow in parse_tsv_definition Keith Seitz
2026-11-24 12:07   ` Andrew Burgess
2026-11-12 17:41 ` [PATCH 2/5] [gdb/remote] Fix stack overflow in parse_tracepoint_definition Keith Seitz
2026-11-24 14:45   ` Andrew Burgess
2026-11-24 17:12     ` Andrew Burgess
2026-11-24 19:28     ` Keith Seitz
2026-11-12 17:41 ` [PATCH 3/5] [gdb/remote] Harden parse_static_tracepoint_marker_definition Keith Seitz
2026-11-12 17:41 ` [PATCH 4/5] [gdb/remote] Harden comma separator in parse_tracepoint_definition Keith Seitz
2026-11-12 17:41 ` [PATCH 5/5] [gdb/remote] Harden parse_tracepoint_status Keith Seitz
2026-11-24 17:14 ` [PATCH 0/5] tracepoint.c hardening against missing separators Andrew Burgess
2026-11-25 17:38   ` Keith Seitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox