Skip to contentSkip to conversation

CVE-2026-93181: perf/x86/intel/uncore: Fix uncore_box ref/unref ordering

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 17

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/x86/intel/uncore: Fix uncore_box ref/unref ordering

In uncore_event_cpu_online(), uncore_box_ref() was called before uncore_change_context(). uncore_box_ref() gates on box->cpu >= 0, but box->cpu is still -1 at that point because uncore_change_context() has not run yet. As a result, the box is never initialized on the first CPU to come online in a die, leaving it permanently uninitialized in the single-CPU-per-die case.

Thus, box->refcnt is one count below the true value, and in the CPU offline path, the box will be torn down on the second-to-last CPU.

In uncore_event_cpu_offline(), uncore_box_unref() was called after uncore_change_context(), so box->cpu is already -1 when the collector CPU goes offline, which prevents it from tearing down the box.

Fix by swapping the call order in both paths so that uncore_box_{ref,unref}() runs at the point where box->cpu reflects the correct context.

Move allocate_boxes() out of uncore_box_ref() to enable this reordering.

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

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

	Issue introduced in 6.11 with commit c74443d92f68f07c03ae242ced554b749e6c6736 and fixed in 7.2.6 with commit 64aa1bb4017d598828c6d8cd718f43daf2a83375
	Issue introduced in 6.11 with commit c74443d92f68f07c03ae242ced554b749e6c6736 and fixed in 7.3-rc1 with commit 174f0582e38abe03b88e15f04bfe58490f88cb19

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

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:
arch/x86/events/intel/uncore.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/64aa1bb4017d598828c6d8cd718f43daf2a83375
	https://git.kernel.org/stable/c/174f0582e38abe03b88e15f04bfe58490f88cb19