Skip to contentSkip to conversation

CVE-2026-23271: perf: Fix __perf_event_overflow() vs perf_remove_from_context() race

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Mar 20

lore
Share & tools
lore
#0 lore raw

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

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

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

perf: Fix __perf_event_overflow() vs perf_remove_from_context() race

Make sure that __perf_event_overflow() runs with IRQs disabled for all possible callchains. Specifically the software events can end up running it with only preemption disabled.

This opens up a race vs perf_event_exit_event() and friends that will go and free various things the overflow path expects to be present, like the BPF program.

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

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

	Issue introduced in 2.6.31 with commit 592903cdcbf606a838056bae6d03fc557806c914 and fixed in 6.12.77 with commit 5c48fdc4b4623533d86e279f51531a7ba212eb87
	Issue introduced in 2.6.31 with commit 592903cdcbf606a838056bae6d03fc557806c914 and fixed in 6.18.17 with commit 3f89b61dd504c5b6711de9759e053b082f9abf12
	Issue introduced in 2.6.31 with commit 592903cdcbf606a838056bae6d03fc557806c914 and fixed in 6.19.7 with commit bb190628fe5f2a73ba762a9972ba16c5e895f73e
	Issue introduced in 2.6.31 with commit 592903cdcbf606a838056bae6d03fc557806c914 and fixed in 7.0-rc2 with commit c9bc1753b3cc41d0e01fbca7f035258b5f4db0ae

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

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/5c48fdc4b4623533d86e279f51531a7ba212eb87
	https://git.kernel.org/stable/c/3f89b61dd504c5b6711de9759e053b082f9abf12
	https://git.kernel.org/stable/c/bb190628fe5f2a73ba762a9972ba16c5e895f73e
	https://git.kernel.org/stable/c/c9bc1753b3cc41d0e01fbca7f035258b5f4db0ae