From: Keith Seitz <keiths@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 0/5] tracepoint.c hardening against missing separators
Date: Thu, 12 Nov 2026 09:41:11 -0800 [thread overview]
Message-ID: <cover.1794430701.git.keiths@redhat.com> (raw)
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
next reply other threads:[~2026-11-12 17:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 17:41 Keith Seitz [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1794430701.git.keiths@redhat.com \
--to=keiths@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox