CVE-2026-98937: perf/core: Check kernel access when kernel callchains are requested
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
perf/core: Check kernel access when kernel callchains are requested
perf_event_open() currently gates perf_allow_kernel() only on !attr.exclude_kernel.
However, users can still request kernel callchain collection with attr.exclude_callchain_kernel == 0 even when attr.exclude_kernel == 1. That still requires kernel profiling privilege, but the existing check does not enforce it.
Update the permission check to call perf_allow_kernel() when either kernel sampling is requested or kernel callchains are requested.
This keeps permission checks aligned with requested data and prevents unprivileged use of kernel callchain capture.
The Linux kernel CVE team has assigned CVE-2026-98937 to this issue.
Affected and fixed versions
===========================
Fixed in 6.12.113 with commit 132bee76097be421ab3012130b5b506324cf2be1 Fixed in 6.18.56 with commit 2581b43e162cfc43e6f5d8dd8d2b38f3441550de Fixed in 7.2.10 with commit 6e187281f978a2bff98ead6aa40f8ddc9a2c9afb Fixed in 7.3 with commit a4573a3838ae4fc73b70019cfa1dac9aaea7cc2f
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-98937
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/events/core.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/132bee76097be421ab3012130b5b506324cf2be1 https://git.kernel.org/stable/c/2581b43e162cfc43e6f5d8dd8d2b38f3441550de https://git.kernel.org/stable/c/6e187281f978a2bff98ead6aa40f8ddc9a2c9afb https://git.kernel.org/stable/c/a4573a3838ae4fc73b70019cfa1dac9aaea7cc2f