CVE-2024-57849: s390/cpum_sf: Handle CPU hotplug remove during sampling
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:
perf_event_exit_cpu()
+--> perf_event_exit_cpu_context()
+--> __perf_event_exit_context()
+--> __perf_remove_from_context()
+--> event_sched_out()
+--> cpumsf_pmu_del()
+--> cpumsf_pmu_stop()
+--> hw_perf_event_update()
to stop and remove the event. During removal of the event, the
sampling device driver tries to read out the remaining samples from
the sample data buffers (SDBs). But they have already been freed
(and may have been re-assigned). This may lead to a use after free
situation in which case the samples are most likely invalid. In the
best case the memory has not been reassigned and still contains
valid data.
Remedy this situation and check if the CPU is still in reserved
state (bit PMU_F_RESERVED set). In this case the SDBs have not been
released an contain valid data. This is always the case when
the event is removed (and no CPU hotplug off occured).
If the PMU_F_RESERVED bit is not set, the SDB buffers are gone.
Security readout for executives and security teams
Plain-English summary
A Linux kernel flaw on IBM Z/s390 systems can access sampling memory after it has been freed when a CPU is removed during performance sampling. This can corrupt samples and potentially affect confidentiality, integrity, or availability. It does not broadly affect other processor architectures.
Executive priority
Prioritize remediation on s390 systems using performance sampling or CPU hotplug. The technical impact is potentially severe, but exposure is architecture-specific and exploitation is not reported. Schedule prompt patching through normal kernel maintenance, escalating systems where untrusted local users or tenants are present.
Technical view
The s390 CPUMF hotplug handler frees sampling data buffers and clears PMU_F_RESERVED before the performance subsystem removes an active event. Event shutdown can then read the released buffers, creating a use-after-free. The fix checks the reserved state before reading remaining samples.
Likely exposure
Exposure is limited to Linux on s390 where CPUMF sampling is active during CPU hot-removal. The supplied version data identifies affected kernels but does not clearly preserve complete version-range semantics. Confirm exposure against the running distribution's advisory and kernel package.
Exploitation context
The CVSS vector describes local, low-privilege, low-complexity access without user interaction. The vulnerable sequence also requires active sampling and CPU removal. The bundle reports no CISA KEV listing and provides no evidence of active exploitation or a public exploit.
Researcher notes
This is a race/order-related use-after-free in s390 CPUMF sampling teardown. Released sample buffers may remain valid or may be reassigned, making resulting samples unreliable and creating broader memory-safety risk. No CWE is supplied. The sources do not establish practical exploitation, reproducibility, or observed attacks.
Mitigation direction
Apply a vendor-supported kernel update containing the referenced upstream stable fix.
Confirm the distribution's fixed package version before relying on version comparisons.
Until patched, avoid CPU hot-removal while CPUMF sampling events are active, where operationally feasible.
Prioritize affected multi-user or workload-hosting s390 systems.
Validation and detection
Verify the host architecture and running kernel package version.
Determine whether CPUMF performance sampling is enabled or used.
Compare the installed package with the distribution's CVE advisory and fixed release.
After updating, confirm the patched kernel is running following any required reboot.
Review kernel logs around CPU hotplug and performance sampling for abnormal behavior.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2024-57849 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
1ADP providers
9Source links
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.