CVE-2026-99159: ring-buffer: Fix the sub-buffer array base in rb_meta_subbuf_idx()
In the Linux kernel, the following vulnerability has been resolved:
ring-buffer: Fix the sub-buffer array base in rbmetasubbufidx()
On a persistent ring buffer, rbmetasubbufidx() can return an index one sub-buffer too high. rbsetupidsmetapage() then fills subbufids[] shifted by one and leaves subbufids[0] NULL, which rbmapvma() dereferences when userspace maps tracepiperaw. rbupdatemetareader() writes two such indices into meta->buffers[], which rbcpumetavalid() would reject on the next boot, discarding the previous boot's trace.
A CPU's sub-buffer array starts after its meta header and the nrsubbufs integers that follow, aligned up to a sub-buffer. rbmetasubbufidx() inverts that calculation but skips only the integers, not the header, so its base is one sub-buffer low whenever the omitted header size crosses the alignment boundary.
Invert the calculation with rbsubbufsfrommeta() rather than repeating it. rbrangebuffer() maps an index back to an address through the same helper, so the two directions can no longer disagree.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.115 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.59 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.2.13 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.3.0-10.10 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.3.0-1004.4 - Upgrade
Upgrade
ubuntu/linux-azureto a version that resolves this vulnerability.Fixed in 7.3.0-1004.4 - Upgrade
Upgrade
ubuntu/linux-azure-fdeto a version that resolves this vulnerability.Fixed in 7.3.0-1004.5 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.3.0-1004.4 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.3.0-1004.4 - Upgrade
Upgrade
ubuntu/linux-raspito a version that resolves this vulnerability.Fixed in 7.3.0-1004.4 - Upgrade
Upgrade
ubuntu/linux-realtimeto a version that resolves this vulnerability.Fixed in 7.3.0-10.10.1 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.3.0-10.10.1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.115-2 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.2.13-1 - Upgrade
Upgrade
debian/linux-6.12to a version that resolves this vulnerability.Fixed in 6.12.115-2~deb12u1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.192-2Fixed in 6.12.117-1Fixed in 7.2.15-1Fixed in 7.3.4-1 - Upgrade
Upgrade
debian/linux-6.12to a version that resolves this vulnerability.Fixed in 6.12.117-1~deb12u1
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
The issue affects Linux kernel systems using a persistent ring buffer. The described failure occurs when userspace maps trace_pipe_raw.
What conditions trigger the fault?
The incorrect index occurs when the omitted metadata header size crosses the sub-buffer alignment boundary. This can leave subbuf_ids[0] NULL, which is dereferenced during the trace_pipe_raw mapping.
What are the operational consequences besides the userspace mapping failure?
The metadata reader can write invalid sub-buffer indices into meta->buffers[]. On the next boot, validation can reject those indices and discard trace data from the previous boot.