From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 4kHYN2n69WrXfQYAWB0awg (envelope-from ) for ; Thu, 12 Nov 2026 12:42:01 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=UwNa0/tK; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D27D81E0BC; Thu, 12 Nov 2026 12:42:01 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 156901E087 for ; Thu, 12 Nov 2026 12:42:01 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CD2084BA23E4 for ; Thu, 12 Nov 2026 17:41:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CD2084BA23E4 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=UwNa0/tK Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 6F7FE4BA2E38 for ; Thu, 12 Nov 2026 17:41:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6F7FE4BA2E38 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6F7FE4BA2E38 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1794505283; cv=none; b=lMZE6+SuO1hEPKj0nwtaRqjlvJumx21SmROVaXWWHRSD9z1Gy30+yqOEWxLxtMBBJHf6BdS+YHBkyPYMzk85wFuzISXiUvUl/e0GcxQ4tTg3BUltC8/np3TyRyooq8J9OwYcuu0wR1MssIC+ZcRvj65+uq+1vfXZwTB8C9f9hbY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1794505283; c=relaxed/simple; bh=Hp18d04wHwzaATjWT3y4Ai3eTJUz0TH8zWZdlHt4g1Y=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=WvgERwz7UKfNTh3N5QEAsMeExNYFW3u+lN3gT4kAVUyDmxf8WVeZkPYyo3os1QieLewfzQEFTCveUu9+3Y8W3TNH8YONkVZ6flYjGNOc1l801FsHIk1MO16/owIkSCc/KikQTW3MxqVpXQLdqf8MGMIoALytQt8gvyNnIa00VnI= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=UwNa0/tK DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6F7FE4BA2E38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1794505283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4MHA1rtP4A20sttbgcM2T3+Q+BrRqaHOy6dYAp/paHw=; b=UwNa0/tKrwYmmauxg57XlfRUdrv0JebPLowGa73l585WlK3VCj+PjWa8d5/FtzYh3PsTZm vys0Zr7hDfR5Ci9ohpkeHJpDnHzpvi4y5L2I4csvojqngGi9cGyAC0u8hfTuHASYs0Xwe/ ygJEmzIVNP2e10QcbGSzwaZz7WLKsTg= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-226-GBWJXllWMFSnAkKtyTl2yg-1; Thu, 12 Nov 2026 12:41:20 -0500 X-MC-Unique: GBWJXllWMFSnAkKtyTl2yg-1 X-Mimecast-MFC-AGG-ID: GBWJXllWMFSnAkKtyTl2yg_1794505280 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 692791800359 for ; Thu, 12 Nov 2026 17:41:19 +0000 (UTC) Received: from keiths-thinkpadp1gen7.redhat.corp (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8AFBC1956089 for ; Thu, 12 Nov 2026 17:41:18 +0000 (UTC) From: Keith Seitz To: gdb-patches@sourceware.org Subject: [PATCH 0/5] tracepoint.c hardening against missing separators Date: Thu, 12 Nov 2026 09:41:11 -0800 Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Gteb9_GliUdfHiq1EmcMgYiirAYJS0E7N1KdNxkQK2I_1794505280 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org 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