HIGH Introduced in 6.8
ring-buffer SubbufResize Race
CVE-2026-89771
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI6.2MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: ring-buffer: Fix subbuf resize race with ring buffer readers trace_buffer subbuf_size is read lockless in ring_buffer_read_page() and ring_buffer_read_start(), while it can simultaneously be resized with ring_buffer_subbuf_order_set(). Instead of trace_buffer::subbuf_size, use bpage::order in ring_buffer_read_start() and ring_buffer_read_page(). In ring_buffer_read_start(), even with resize_disabled, there is still a possibility of a race with a buffer modification. Hold the trace_buffer mutex to synchronise with any pending ring buffer order modification. trace_buffer::subbuf_size is now actually useless, remove it. Also, create accessors rb_subbuf_capacity() and rb_page_capacity() which return the actual size available for storing events, while rb_subbuf_size() returns the actual subbuf page-size.
02KernelScan AI Analysis
Risk summary
A race condition in the kernel ring buffer allows a concurrent sub-buffer resize to corrupt the size value used by reader paths, potentially leading to out-of-bounds memory operations. Exploitation requires local root or CAP_SYS_ADMIN access to the tracing interface. The resulting memory corruption could cause kernel crashes or arbitrary read/write primitives.
Vulnerability analysis
The kernel ring buffer relies on a single shared size value for sub-buffers that reader paths read without any synchronization, while a resize operation can update that same value concurrently. A reader that observes a stale or partially updated size will use it for bounds checks and memory copies, potentially accessing memory beyond the actual buffer boundary and corrupting kernel heap memory. The fix removes the shared size value entirely and instead determines the capacity from each individual buffer page, which remains stable. It also adds locking in the read-start path to block concurrent resize operations, and moves a consistency check under the read lock. This vulnerability is reachable locally through the kernel tracing interface, which requires root or CAP_SYS_ADMIN privileges to access.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.12 | 6.8 | 6.12.109 | 6d666f0b8b36 |
| 6.18 | 6.8 | 6.18.50 | 50f4a793c4ff |
| 7.2 | 6.8 | 7.2.4 | 0c7c517827a4 |
| mainline | 6.8 | 7.3-rc1 | 8a5f63637890 |