Skip to contentSkip to conversation

CVE-2026-99158: ring-buffer: Fix false warning in ring_buffer_map_get_reader()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 28

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

ring-buffer: Fix false warning in ring_buffer_map_get_reader()

The mmap reader can warn when it catches up with a writer that is still committing events. rb_get_reader_page() returns NULL in this case, but ring_buffer_map_get_reader() treats that result as an error.

The initial rb_per_cpu_empty() check filters out an empty buffer, but it does not guarantee that the next reader page has committed data. Writers do not take reader_lock and can advance commit_page before publishing the committed length on the new page. rb_get_reader_page() can swap to that page, catch up with the writer and return NULL.

Handle NULL through the existing no-data exit without warning. Remove the caller's reader_page == commit_page check as well, since the reader-page helper already handles that case. The existing metadata update and return path remain in place.

The Linux kernel CVE team has assigned CVE-2026-99158 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.10 with commit 117c39200d9d760cbd5944bb89efb7b9c51965aa and fixed in 6.18.59 with commit 029770f5badedc0f0ff85fc45e24785cbbee4a67
	Issue introduced in 6.10 with commit 117c39200d9d760cbd5944bb89efb7b9c51965aa and fixed in 7.2.13 with commit 68e6ab180cfb6dfa79652f41ed7899a6d4cf5438
	Issue introduced in 6.10 with commit 117c39200d9d760cbd5944bb89efb7b9c51965aa and fixed in 7.3 with commit 89bab1dba8a0167ef0d819e0f55b6bafa038e87f

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-99158

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/ring_buffer.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/029770f5badedc0f0ff85fc45e24785cbbee4a67
	https://git.kernel.org/stable/c/68e6ab180cfb6dfa79652f41ed7899a6d4cf5438
	https://git.kernel.org/stable/c/89bab1dba8a0167ef0d819e0f55b6bafa038e87f