perf/x86/intel/uncore: Fix uncore_box ref/unref ordering
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 6.12.114, 7.2.6
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
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.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From c74443d92f68f07c03ae242ced554b749e6c6736 · fixed in 3cfd351602e6704cce9bc766a974afb9f745d44b; From c74443d92f68f07c03ae242ced554b749e6c6736 · fixed in 64aa1bb4017d598828c6d8cd718f43daf2a83375; From c74443d92f68f07c03ae242ced554b749e6c6736 · fixed in 174f0582e38abe03b88e15f04bfe58490f88cb19
- Linux Linux
6.11
- KernelLinux
From 6.11.0 · fixed in 6.12.114; From 6.13.0 · fixed in 7.2.6