CVE-2026-89747
massUse-After-Free in Linux Kernel trace_pipe Sub-Buffer Order Change Race
The Linux kernel's tracing subsystem contains a use-after-free in which writing to the tracefs file buffer_subbuf_size_kb makes ring_buffer_subbuf_order_set() free and replace every ring-buffer sub-buffer, including the reader page, while a concurrent trace_pipe reader may still hold a pointer to a previously peeked event. Because ring_buffer_peek() returns that event pointer after dropping cpu_buffer->reader_lock, a race between the sub-buffer order change and the reader dereferencing the event leads to a use-after-free (KASAN-reported in ring_buffer_peek, found by syzbot fuzzing). Exploitation requires local code execution with privileges sufficient to write to tracefs (normally root or equivalent), so this is primarily a concern for sandbox/container escape scenarios, malicious privileged workloads, or multi-user systems that expose tracing to semi-trusted code; CVSS 3.1 is 7.8 with high impact to confidentiality, integrity, and availability, meaning a kernel memory disclosure, crash, or potential code execution primitive. All Linux kernel builds carrying the buffer_subbuf_size_kb sub-buffer order-change support are affected, though the advisory does not specify exact version ranges; the fix takes trace_access_lock(RING_BUFFER_ALL_CPUS) around the order change, the same lock trace_pipe readers already hold. No public proof of concept or in-the-wild exploitation is known, and the issue is not in CISA's KEV catalog.
What to do: Apply your distribution's kernel updates as soon as the fix (taking trace_access_lock across the sub-buffer order change) is backported. Verify that no unprivileged users, containers, or workloads can write to tracefs (/sys/kernel/tracing, including buffer_subbuf_size_kb) — on container hosts, avoid bind-mounting host tracefs into containers and restrict tracing-related capabilities for untrusted workloads. If tracefs access is required by monitoring agents, ensure those agents run as the only writers and cannot be influenced by untrusted code.
| Linux kernel | — |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
In the Linux kernel, the following vulnerability has been resolved: tracing: Fix use-after-free in trace_pipe read on sub-buffer order change Writing to buffer_subbuf_size_kb calls ring_buffer_subbuf_order_set(), which frees every sub-buffer of the ring buffer, including the reader page, and replaces them with newly allocated ones. Readers of trace_pipe hold pointers into those pages. ring_buffer_peek() looks up an event under cpu_buffer->reader_lock but returns the event pointer after dropping the lock, and peek_next_entry() then calls ring_buffer_event_length() and ring_buffer_event_data() on it. If the sub-buffer order is changed in that window, the reader dereferences freed memory: BUG: KASAN: use-after-free in ring_buffer_peek+0x3e0/0x430 Read of size 1 at addr ffff88802a4cf010 by task syz-executor989/6002 Freed by: free_buffer_page kernel/trace/ring_buffer.c:398 [inline] ring_buffer_subbuf_order_set+0x1325/0x18e0 kernel/trace/ring_buffer.c:7444 buffer_subbuf_size_write+0x182/0x280 kernel/trace/trace.c:8221 Take trace_access_lock(RING_BUFFER_ALL_CPUS) around the order change. This is the lock trace_pipe readers already hold across their entire peek-and-print loop, so the swap can no longer race with a reader that is dereferencing a peeked event.
- Vector
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
In the news0 stories
No ingested article mentions this CVE yet.