Skip to contentSkip to conversation

CVE-2026-97961: perf/core: Allow list_del during perf_event_overflow()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 25

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/core: Allow list_del during perf_event_overflow()

A PMU might use perf_sched_cb_inc() and perf_sched_cb_dec() interface to get the PMU call back function pmu::sched_task invoked at schedule in and schedule out. This is achieved by walking along the list anchored by sched_cb_list.

The following scenario might lead to a list corruption.

perf_pmu_sched_task()

      for_each_list_entry(..., &sched_cb_list)
      +--> __perf_pmu_sched_task()
           +--> event->pmu->sched_task())
                +--> PMU_push_sample()
                     +--> perf_event_overflow()
                          +--> __perf_event_overflow()
                               +--> pmu->stop()
                                    +--> perf_sched_cb_dec()
                                         remove entry from sched_cb_list
                                         while list node in use.

This happens when ioctl(fd, PERF_EVENT_IOC_REFRESH, xxx) has been invoked and perf_event::event_limit hits zero.

Prevent the list corruption and convert for_each_list_entry() to for_each_list_entry_safe().

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

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

	Issue introduced in 6.2 with commit bd27568117664b8b3e259721393df420ed51f57b and fixed in 6.12.111 with commit 723e85fb2c3bcd237ac02cbd69502ed62ce0068c
	Issue introduced in 6.2 with commit bd27568117664b8b3e259721393df420ed51f57b and fixed in 6.18.53 with commit 6d0b9ce3be221c9077653f3670d60d66bb725ee2
	Issue introduced in 6.2 with commit bd27568117664b8b3e259721393df420ed51f57b and fixed in 7.2.7 with commit e2770c76a02452fddb52e9e05c7ed6acfef06c32
	Issue introduced in 6.2 with commit bd27568117664b8b3e259721393df420ed51f57b and fixed in 7.3-rc3 with commit 59e63416f5153e7d58652c616fbdcb7d5e01fff7

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

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/723e85fb2c3bcd237ac02cbd69502ed62ce0068c
	https://git.kernel.org/stable/c/6d0b9ce3be221c9077653f3670d60d66bb725ee2
	https://git.kernel.org/stable/c/e2770c76a02452fddb52e9e05c7ed6acfef06c32
	https://git.kernel.org/stable/c/59e63416f5153e7d58652c616fbdcb7d5e01fff7