Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7353F490BE3 for ; Fri, 25 Sep 2026 10:28:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790332097; cv=none; b=UOveagEWyZnhXmDRj16Sz+0z8nbMMtG5dSavwYKfK4hK+xdXPXtA6/pv1TrDOVQwzYAYFKerhc+pEN6TWrhiY34WPLtxS+5Ypsp7snI8MckKVZLCCXmNWY9SbZGvBKcglDHNBLLrtsWbAmnTHTtTmvXQ9FXkpsoUGIDGBUSs0s0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790332097; c=relaxed/simple; bh=AfIYRBfG8lOjcV05yxVI2xRhyP/fmg5MMnsPBStGLys=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=PyJqOJYOJKJClgiQeJdXvza9zElMxlIvLUOR9DQZTVz2DFpS6VwvDgBgd8b/E62GDBNZ7y85JfIvWyazXIHku0kqrO8ajNsuRzHv+Wq3Nu3yFV2mZOAkp9XDFszYU26bjcky6pge/tFjzfGJZJiiFrhByOwfMyovvvfBjOgHWWI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=RmDo8Mxn; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="RmDo8Mxn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD9991F000FF; Fri, 25 Sep 2026 10:28:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790332096; bh=VX/CNxzsvv3TTN7DopZ3j98xxocIIsLnzQ0ZvuYSnuo=; h=From:To:Cc:Subject:Date:Reply-To; b=RmDo8MxnxGhaJz2KE3AfehxF5Jr1kgPaM//oSwoBL25KQ3cLLApvEWIVPTrtCCkIL +gaKEgeiCkzKiHuaghsrkRPC+FtR0LmqO7Us25HF6GcYn097Z7DjvHs0CtyU1Sx+mn ftFiCz2dK2uQ6kU/ADNyWGcs5WObM189PiWPQAUo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-97918: tracing: Undo the registration when enabling the histogram trigger fails Date: Fri, 25 Sep 2026 12:23:41 +0200 Message-ID: <2026092507-CVE-2026-97918-345d@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4190; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=lMlEnLG5eHS97lF6rQTidNaueK+Vk8ddv/0daV4ZZTs=; b=owGbwMvMwCRo6H6F97bub03G02pJDFnbvP3P1V1bJLt3TlxyTvb6NzfLeS+IBzW3VAV56c1Wy Ey+t1qkI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbyn5dhQT/3Eg69eet+Wr9X n7t9XcSslJvG2QzzS4JtuT6fPKzIOP/EkSvHmjXzT7mfAAA= 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: Undo the registration when enabling the histogram trigger fails Commit 6f86bdeab633 ("tracing: Fix bad hist from corrupting named_triggers list") described how a trigger that is registered but not on file->triggers ends up freed while still on the global named_triggers list, and moved the registration down so that hist_trigger_enable() follows it immediately. One path still gets there. hist_trigger_enable() adds the trigger and takes it straight back out when the event cannot be enabled: list_add_tail_rcu(&data->list, &file->triggers); update_cond_flag(file); if (trace_event_trigger_enable_disable(file, 1) < 0) { list_del_rcu(&data->list); update_cond_flag(file); ret--; } so the list walk in hist_unregister_trigger() matches nothing, test stays NULL, and the ->free() that would call del_named_trigger() is skipped. out_unreg falls through to out_free, which frees the trigger anyway: BUG: KASAN: slab-use-after-free in find_named_trigger+0xac/0xc0 Read of size 8 at addr ffff8880091d3160 by task init/1 find_named_trigger+0xac/0xc0 hist_register_trigger+0xc1/0xa00 event_hist_trigger_parse+0x3146/0x6af0 event_trigger_write+0xce/0x160 Freed by task 69: kfree+0x154/0x420 trigger_kthread_fn+0xfd/0x160 Leave the trigger where hist_unregister_trigger() can find it and let that undo the registration, which is the only code that knows all of what cmd_ops->init() took: the named list entry, the hist_pad reference, the reference on the trigger a named histogram is shared with, and the copied cmd_ops. It also pairs the failed trace_event_trigger_enable_disable(), whose sm_ref and buffered event reference are otherwise left behind. Since ->free() releases trigger_data and, for a trigger that does not share its histogram, hist_data with it, out_unreg can no longer fall through to out_free. For a trigger that does share, hist_register_trigger() has already destroyed the caller's hist_data, so the fall-through was reading freed memory there as well. Move the enable_timestamps check in hist_unregister_trigger() above the ->free() call for the same reason: hist_data does not outlive it once the trigger being removed is the one that owns it. The Linux kernel CVE team has assigned CVE-2026-97918 to this issue. Affected and fixed versions =========================== Issue introduced in 4.17 with commit 067fe038e70f6e64960d26a79c4df5f1413d0f13 and fixed in 6.18.53 with commit 51b07104d563d4be2be34158d3b9d922ca417642 Issue introduced in 4.17 with commit 067fe038e70f6e64960d26a79c4df5f1413d0f13 and fixed in 7.2.7 with commit bfa6bc11aef93a3d9db0ac9564b734849a9d959b Issue introduced in 4.17 with commit 067fe038e70f6e64960d26a79c4df5f1413d0f13 and fixed in 7.3-rc3 with commit 92383cef66791a0c63a2f27755cadbdb2fbf270b 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-97918 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_events_hist.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/51b07104d563d4be2be34158d3b9d922ca417642 https://git.kernel.org/stable/c/bfa6bc11aef93a3d9db0ac9564b734849a9d959b https://git.kernel.org/stable/c/92383cef66791a0c63a2f27755cadbdb2fbf270b