From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793187501; b=TYZiKmy7xUZQcLjMsfA5+bJddzG6nIklaziqfY1dzx19LoIC22FoT+zX6doFbZjZiqBs KhQ9K2rVfQ7LNP0TR2V6ej/nNvuGswG33Nztp0zh05z6aOWJ+CK0VRCQKRnQ3+r8AbKXn 3WRFw2SESXiS8tbATy59ySE7Fkc6/92VuqcN5Z/kqzx0YdFpv6nexBCpaJe5lNUHp3jDE Vi14Jo+JpP6lixL/ePuAYcNCTXi1CmIeL4PProi9LP02reSrQ6L6aTbYLubPDKyCCzl5L VEDpVBuDFE74d4LnHP2ZMpvJB3oL15jgMNiGi7LD/2ZF3g+tbmtdlUbCjAsiBQJa5Ew== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793187501; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=y0C65YkVvq5s2rz5KUye0ItdSACNW5avpJEJO/1vcUo=; b=cSiFBiE0HFvltO+grXpG0nnEOb1Ix1oYZTOj3lndxH7W9q+DWO1DudXz+hutQEkIgCUp ey7ZrSgRhtgweAiFJHSfHZOAalshWyOAhzX/3MVGEPDuUwD9bHqEcOHfLqhinueoEiCbW EcLBtf3qmhu6MydeEOKdpqCfWA4EJeAB1WEtp/cXcJXu4df0FC4TNEuLQeQf+KRmL//mn Ss2fSh9pnjK8TWEH+nlnCoOJVf6y7EC/holceHXLs1ry5r+KJGoIlzpSrC8qRc6Z9Inx4 sYVWKc49qrARyZwXoKyu5LRdGFyb8FIN9omeczXQvywQ0wSzDseq/EcGYv5Wza/w2GQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=1pgK5Bsa; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E6000606A31C for ; Wed, 28 Oct 2026 11:38:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=1pgK5Bsa Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D1B71F01825; Wed, 28 Oct 2026 11:38:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1793187500; bh=y0C65YkVvq5s2rz5KUye0ItdSACNW5avpJEJO/1vcUo=; h=From:To:Cc:Subject:Date:Reply-To; b=1pgK5Bsax6r3yEdLaauwusAi+YOG6TI34S7HGg8GxNFM1ryt+tVoDlLXQcn8euw0y WJwj7gPYDKePL+0AW+Sgs1mCzeMcBNsYLrh77ShQ0Fv03t4hpdBrPsb4OW7m2CurS0 dhFT9aJYd7QsOwgPC2+P8fSa2ZtjnofTHjbBFpZU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99141: tracing: Fix crash in print_graph_function_event() Date: Wed, 28 Oct 2026 11:35:28 +0100 Message-ID: <2026102801-CVE-2026-99141-79ea@gregkh> X-Mailer: git-send-email 2.56.0 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3475; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=kd41mfc61YGV/wr5G21iKC+7NzQqnSOtg+Wl9iy3vnM=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkPz191ONZ6suNV9o8nLtu3r4/WTr64qy26QtHhU0GbZ sXTrIXLO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAij3cyzM9UesQQ/+F6//xr Qidv1n44qHN3YhjD/HATlRkOa770LtrQGzVb9oXOzWKPBwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: tracing: Fix crash in print_graph_function_event() tracing_set_tracer() assigns the flags of the newly selected tracer with: tr->current_trace_flags = t->flags ? : t->tracer->flags; If the new tracer defines neither static flags nor default flags, like hwlat, irqsoff or wakeup, add_tracer() has no per instance flags copy for it, and both operands are NULL, so tr->current_trace_flags ends up being NULL as well. The ring buffer is not cleared when switching tracers: it is reset inside tracer_init(), after current_trace_flags was already assigned. If the buffer still holds function_graph entries of the previous tracer, printing one of them dereferences the NULL pointer. This was hit by cat trace during an ftrace stress test: BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor read access in kernel mode RIP: 0010:print_graph_function_event+0xe/0x20 Call Trace: s_show+0x4d/0x110 seq_read_iter+0x2d4/0x490 seq_read+0x130/0x170 vfs_read+0xb5/0x370 ksys_read+0x6d/0xe0 do_syscall_64+0xbc/0x450 The snapshot buffer is not reset at all, so this can be reproduced without a race: echo function_graph > /sys/kernel/tracing/current_tracer echo 1 > /sys/kernel/tracing/snapshot echo hwlat > /sys/kernel/tracing/current_tracer cat /sys/kernel/tracing/snapshot Rather than teaching every user of tr->current_trace_flags about this corner case, make sure it is never NULL: when the newly selected tracer has no flags at all, tracing_set_tracer() falls back to a static empty no_tracer_flags. run_tracer_selftest() can hit the same case, so the same fallback is added there too. The existing users already handle opts == NULL, so these tracers keep behaving as before. The Linux kernel CVE team has assigned CVE-2026-99141 to this issue. Affected and fixed versions =========================== Issue introduced in 6.19 with commit e29aa918a928408c3e64b0d1025e4eb9f6fc549e and fixed in 7.2.13 with commit b1547c6ba93b8863010aa324cd20c441f886f23e Issue introduced in 6.19 with commit e29aa918a928408c3e64b0d1025e4eb9f6fc549e and fixed in 7.3 with commit 3cc117514d69067a94d6c7479730dce41e678f50 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-99141 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: kernel/trace/trace.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/b1547c6ba93b8863010aa324cd20c441f886f23e https://git.kernel.org/stable/c/3cc117514d69067a94d6c7479730dce41e678f50