s390/cpum_sf: Handle CPU hotplug remove during sampling
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ e3d617fe6ac7294974fc513dc5e4d8ada8080fd1 · < be54e6e0f93a39a9c00478d70d12956a5f3d5b9b| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
s390/cpum_sf: Handle CPU hotplug remove during sampling
CPU hotplug remove handling triggers the following function call sequence:
CPUHP_AP_PERF_S390_SF_ONLINE --> s390_pmu_sf_offline_cpu() ... CPUHP_AP_PERF_ONLINE --> perf_event_exit_cpu()
The s390 CPUMF sampling CPU hotplug handler invokes:
s390_pmu_sf_offline_cpu() +--> cpusf_pmu_setup() +--> setup_pmc_cpu() +--> deallocate_buffers()
This function de-allocates all sampling data buffers (SDBs) allocated for that CPU at event initialization. It also clears the PMU_F_RESERVED bit. The CPU is gone and can not be sampled.
With the event still being active on the removed CPU, the CPU event hotplug support in kernel performance subsystem triggers the following function calls on the removed CPU:
From the CVE record · Linux
The Linux kernel's s390 CPUMF sampling driver may access freed sample buffers when a CPU is removed while a sampling event remains active. This can cause a use-after-free and invalid samples; the input does not specify an attacker path, authentication requirements, or user interaction.
Teams running the Linux kernel on s390 systems with CPUMF sampling should check their kernel; affected versions are not specified.