Skip to contentSkip to conversation

CVE-2026-99125: s390/pai: Handle multiple PMU stop callback invocations

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 28

lore
Share & tools
lore
#0 lore raw

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

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

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

s390/pai: Handle multiple PMU stop callback invocations

Handle the following scenario:
The kernel protects itself against a very high sampling load and throttles the sampling using:

perf_event_throttle() --> PMU->stop()

Shortly later the scheduler may terminate the task and removes it from the CPU. It again calls

PMU->stop()

which results in two invocations of PMU->stop() called back to back. Protect against this and check the PERF_HES_STOPPED bit on function entry. If it is already set return.
Clear bit PERF_HES_STOPPED in PMU->start().

Prohibit ioctl(fd, PERF_EVENT_IOC_PERIOD, ...) call for this event. It sets perf_event::event_limit to a positive value and causes perf_event_overflow() to invoke pai_stop() call back function when perf_event::event_limit hits zero. This is not supported because the sample events CRYPTO_ALL and NNPA_ALL are only taken at schedule out of a task.

Use list_for_each_entry_safe() for safe iteration over syswide_list in pai_have_samples().

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

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

	Issue introduced in 6.11 with commit 9f66572f2889a5e72a9d7e17787e52f03b1f7bd8 and fixed in 7.2.13 with commit cf348ec613f75b9774291e47b804fd7010835a6c
	Issue introduced in 6.11 with commit 9f66572f2889a5e72a9d7e17787e52f03b1f7bd8 and fixed in 7.3 with commit f3110e969ad226ffbb2d9b4bf5387e68d0d9ef40

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

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/s390/kernel/perf_pai.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/cf348ec613f75b9774291e47b804fd7010835a6c
	https://git.kernel.org/stable/c/f3110e969ad226ffbb2d9b4bf5387e68d0d9ef40