CVE-2026-23380: tracing: Fix WARN_ON in tracing_buffers_mmap_close
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
tracing: Fix WARN_ON in tracing_buffers_mmap_close
When a process forks, the child process copies the parent's VMAs but the user_mapped reference count is not incremented. As a result, when both the parent and child processes exit, tracing_buffers_mmap_close() is called twice. On the second call, user_mapped is already 0, causing the function to return -ENODEV and triggering a WARN_ON.
Normally, this isn't an issue as the memory is mapped with VM_DONTCOPY set. But this is only a hint, and the application can call madvise(MADVISE_DOFORK) which resets the VM_DONTCOPY flag. When the application does that, it can trigger this issue on fork.
Fix it by incrementing the user_mapped reference count without re-mapping the pages in the VMA's open callback.
The Linux kernel CVE team has assigned CVE-2026-23380 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.10 with commit cf9f0f7c4c5bb45e7bb270e48bab6f7837825a64 and fixed in 6.12.77 with commit 91f3e8d84c89918769e71393f839c9fefadc2580 Issue introduced in 6.10 with commit cf9f0f7c4c5bb45e7bb270e48bab6f7837825a64 and fixed in 6.18.17 with commit cdd96641b64297a2db42676f051362b76280a58b Issue introduced in 6.10 with commit cf9f0f7c4c5bb45e7bb270e48bab6f7837825a64 and fixed in 6.19.7 with commit b0f269ba6fefe9e3cb9feedcf78fcd0b633800c0 Issue introduced in 6.10 with commit cf9f0f7c4c5bb45e7bb270e48bab6f7837825a64 and fixed in 7.0-rc3 with commit e39bb9e02b68942f8e9359d2a3efe7d37ae6be0e
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-23380
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:
include/linux/ring_buffer.h
kernel/trace/ring_buffer.c
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/91f3e8d84c89918769e71393f839c9fefadc2580 https://git.kernel.org/stable/c/cdd96641b64297a2db42676f051362b76280a58b https://git.kernel.org/stable/c/b0f269ba6fefe9e3cb9feedcf78fcd0b633800c0 https://git.kernel.org/stable/c/e39bb9e02b68942f8e9359d2a3efe7d37ae6be0e