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=1793187605; b=DNNGG1Ju/omp5ZTdLpNUeC9qcIFrMt3I8MfkUIPveSXTlIQXX+AcFdo4ClRru8OrwZaJ o7E6fK4lw6ilhGlgD6q/1R70pkQHSFLEzJEojqvSecmAAtcAjHtgsz1ZjLP+71hTNAbL1 wXhkXGfrfEsFPIZZzdbMr9Z2PT/EmyEX+NkduAGHJv42PGQYv1NrV6XdIbVf5nZftdGUS qh3QiXXOGrFlO4zW4En4JX1mGT/nHXZrrVH4hekfsrKnQlMlK8l+xho8bC6iHrvdDBQHQ 2F7/cE5aq0msWlXnUXfaimSK4GN1V8RScKUzXOXk0MOP/1axar0JWGJWw9xN4WXuXGA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793187605; 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=yibm0uNIHgwkMTcfVs4NM2DoBQU+/sSx4o1JaTSQB5w=; b=J8IVGxQaB4I23fXGCjQMlYCm3igvjUlQN8ow5BuNG0NFBokcsxChyt3+yAGF1ovHf4S5 naUDPMjj71vU6FXbLQaV65Xpj9r5f6jCqboUgy1LpnncMhTaQxm9eaQxvV9DDzyGnOuh+ Br/YX0/vZ6hbmKkKN+VxF5HvqQ5VUk1Ki9P7fMIXyNBJLsFJcgV2bwBVpNwDRT44gy2Pn Sj20G6TVl/qQpuVHcwWYWNCLbpNK8a+w3HO1eEaT5lLbjOa7FfIlNa7E/MfqU/fWWn94x V0J3K1aOSZWGMY16U+4VE9AJiVIuY0s9GTnUi7XHqHDJB2ftBykUYG1+gzX0jPGcQZg== 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=M4J2FOQp; 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 25D30606A31E for ; Wed, 28 Oct 2026 11:40:05 +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=M4J2FOQp Received: by smtp.kernel.org (Postfix) with ESMTPSA id 689891F01825; Wed, 28 Oct 2026 11:40:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1793187605; bh=yibm0uNIHgwkMTcfVs4NM2DoBQU+/sSx4o1JaTSQB5w=; h=From:To:Cc:Subject:Date:Reply-To; b=M4J2FOQpJ6GqYa9nO2Zc0pfxwCoa6xH/+ux2BFEC4mWmjouePaGv9CnHIYQwC6RVS eAQ/dZzraE6rkQYkOvUv627AH2LEl7+YHOVwfbbJcJBGoDQ4QFEsYkMjlMCjaNiieV Gd4SCZwgC8QiD7Q5i2XUSDRmybHwUvn0FVK944vI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99140: tracing: Fix hist trigger timestamps for buffered events Date: Wed, 28 Oct 2026 11:35:27 +0100 Message-ID: <2026102801-CVE-2026-99140-5b9b@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=4959; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=yyMOo4luMgeTVWrZ/3mBkP6Bf3WpBHWGjmQAosL371Q=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkPz1+d3q5cznb2Q5NQYeZ6bfOI6zf9VK3m9C9cXPdkY l6vt3pkRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExkASfDgu7Cgso5f11f/zFd EyrbuPXRfo2VGgzz8zOybWa9OzHtKvPcyEd+dRsuvXpbCgA= 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 hist trigger timestamps for buffered events Syzkaller triggered a WARN_ON_ONCE(!nest) warning: WARNING: kernel/trace/ring_buffer.c:821 at ring_buffer_event_time_stamp Call trace: ring_buffer_event_time_stamp hist_field_timestamp hist_fn_call event_hist_trigger event_triggers_call __event_trigger_test_discard trace_event_buffer_commit do_trace_event_raw_event_sched_switch trace_event_raw_event_sched_switch The warning is probabilistically reproducible and is related to syzkaller executing the following commands: echo 'prev_pid == 999999' > events/sched/sched_switch/filter echo 'hist:keys=common_timestamp' > events/sched/sched_switch/trigger The specific triggering process is as follows: CPU 0 CPU 1 (context switching) (echo 'hist:keys=common_timestamp' > \ events/sched/sched_switch/trigger) do_trace_event_raw_event_##call trace_event_buffer_lock_reserve if (!tr->no_filter_buffering_ref && trace_file->flags & EVENT_FILE_FL_FILTERED) return entry; // return directly event_hist_trigger_parse hist_register_trigger tracing_set_filter_buffering(file->tr, true); tr->no_filter_buffering_ref++; __trace_buffer_lock_reserve rb_start_commit local_inc(&cpu_buffer->committing); // skipped and not executed trace_event_buffer_commit __event_trigger_test_discard event_triggers_call event_hist_trigger hist_fn_call hist_field_timestamp ring_buffer_event_time_stamp nest = local_read(&cpu_buffer->committing); WARN_ON_ONCE(!nest) // trigger warning The root cause is that when an event file has a filter attached and the hist trigger has not yet been attached, trace_event_buffer_lock_reserve() writes the event into the per-CPU trace_buffered_event temp buffer instead of reserving it in the ring buffer, so cpu_buffer->committing is not incremented. When the event is later processed at commit time by a hist trigger, hist_field_timestamp() -> ring_buffer_event_time_stamp() sees a zero committing count, triggering WARN_ON_ONCE(!nest). tracing_event_time_stamp() was added by commit d8279bfc5e959 ("tracing: Add tracing_event_time_stamp() API") for exactly this case: if the event is the per-CPU trace_buffered_event, it returns the current ring buffer timestamp. But it never gained a caller. Use it in hist_field_timestamp(), so that a hist trigger that races onto a buffered event records the current time, which is only marginally later than when the event was recorded, instead of warning and recording a bogus timestamp. The Linux kernel CVE team has assigned CVE-2026-99140 to this issue. Affected and fixed versions =========================== Issue introduced in 5.13 with commit b94bc80df64823e676b506f8de7dcf6a688d681e and fixed in 6.18.59 with commit 09c7cce2e59e6b3b1807520bcb1980c561f15d1e Issue introduced in 5.13 with commit b94bc80df64823e676b506f8de7dcf6a688d681e and fixed in 7.2.13 with commit 89e90b16aadd6e66bd0323bc8dfc76a62e756b57 Issue introduced in 5.13 with commit b94bc80df64823e676b506f8de7dcf6a688d681e and fixed in 7.3 with commit 9414ca3b99e5a7f1f3bf51c2a01b383e1b355dd0 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-99140 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/09c7cce2e59e6b3b1807520bcb1980c561f15d1e https://git.kernel.org/stable/c/89e90b16aadd6e66bd0323bc8dfc76a62e756b57 https://git.kernel.org/stable/c/9414ca3b99e5a7f1f3bf51c2a01b383e1b355dd0