{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2024-57849", "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "state": "PUBLISHED", "assignerShortName": "Linux", "dateReserved": "2025-01-11T12:33:33.699Z", "datePublished": "2025-01-11T14:30:58.365Z", "dateUpdated": "2026-08-05T11:46:40.129Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux", "dateUpdated": "2026-08-05T11:46:40.129Z" }, "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ns390/cpum_sf: Handle CPU hotplug remove during sampling\n\nCPU hotplug remove handling triggers the following function\ncall sequence:\n\n CPUHP_AP_PERF_S390_SF_ONLINE --> s390_pmu_sf_offline_cpu()\n ...\n CPUHP_AP_PERF_ONLINE --> perf_event_exit_cpu()\n\nThe s390 CPUMF sampling CPU hotplug handler invokes:\n\n s390_pmu_sf_offline_cpu()\n +--> cpusf_pmu_setup()\n +--> setup_pmc_cpu()\n +--> deallocate_buffers()\n\nThis function de-allocates all sampling data buffers (SDBs) allocated\nfor that CPU at event initialization. It also clears the\nPMU_F_RESERVED bit. The CPU is gone and can not be sampled.\n\nWith the event still being active on the removed CPU, the CPU event\nhotplug support in kernel performance subsystem triggers the\nfollowing function calls on the removed CPU:\n\n perf_event_exit_cpu()\n +--> perf_event_exit_cpu_context()\n +--> __perf_event_exit_context()\n\t +--> __perf_remove_from_context()\n\t +--> event_sched_out()\n\t +--> cpumsf_pmu_del()\n\t +--> cpumsf_pmu_stop()\n +--> hw_perf_event_update()\n\nto stop and remove the event. During removal of the event, the\nsampling device driver tries to read out the remaining samples from\nthe sample data buffers (SDBs). But they have already been freed\n(and may have been re-assigned). This may lead to a use after free\nsituation in which case the samples are most likely invalid. In the\nbest case the memory has not been reassigned and still contains\nvalid data.\n\nRemedy this situation and check if the CPU is still in reserved\nstate (bit PMU_F_RESERVED set). In this case the SDBs have not been\nreleased an contain valid data. This is always the case when\nthe event is removed (and no CPU hotplug off occured).\nIf the PMU_F_RESERVED bit is not set, the SDB buffers are gone." } ], "metrics": [ { "cvssV3_1": { "version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH" }, "scenarios": [ { "lang": "en", "value": "AV:L - The vulnerability is reached through the local `perf_event_open()` syscall establishing a CPUM_SF sampling event combined with a CPU hot-unplug of that CPU; no network or adjacent-network path exists.\nAC:L - The attacker keeps a per-CPU sampling event installed indefinitely so any CPU-offline transition deterministically hits the freed SDBs, and on Linux on Z the offline side is attacker-influenceable (cpuplugd unplugs CPUs based on load the attacker generates) or directly performed, making the trigger repeatable rather than a narrow race.\nPR:L - A local unprivileged account suffices to hold the CPUM_SF sampling session on systems where perf_event_paranoid is relaxed — the standard configuration on IBM Z hosts that use CPUMF sampling for profiling — while the CPU-offline transition is supplied by the routinely-active cpuplugd daemon or hypervisor CPU reconfiguration rather than by the attacker's own privileges.\nUI:N - No victim action is required; the sampling event and the CPU hotplug transition are system/administrative operations, not interactions of a targeted user with attacker-supplied content.\nS:U - The use-after-free corrupts kernel memory within the same kernel security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - `hw_collect_samples()` reads `hws_basic_entry` records out of freed and reallocated pages and pushes them to userspace through `perf_push_sample()`, leaking arbitrary reused kernel memory into the attacker-readable perf ring buffer, with the target address taken from a freed-page value fed to `phys_to_virt()`.\nI:H - The stale walk writes into freed/reallocated memory via `sample->def = 0` and `cmpxchg128(&te->header.val, ...)`, at addresses derived from freed-page contents, giving a memory-corruption primitive usable against arbitrary reallocated kernel objects.\nA:H - Dereferencing a bogus physical address obtained from freed memory, plus corruption of pages already reassigned to other kernel users, reliably produces a kernel oops or panic." } ] } ], "affected": [ { "product": "Linux", "vendor": "Linux", "defaultStatus": "unaffected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "arch/s390/kernel/perf_cpum_sf.c" ], "versions": [ { "version": "e3d617fe6ac7294974fc513dc5e4d8ada8080fd1", "lessThan": "238e3af849dfdcb1faed544349f7025e533f9aab", "status": "affected", "versionType": "git" }, { "version": "e3d617fe6ac7294974fc513dc5e4d8ada8080fd1", "lessThan": "99192c735ed4bfdff0d215ec85c8a87a677cb898", "status": "affected", "versionType": "git" }, { "version": "e3d617fe6ac7294974fc513dc5e4d8ada8080fd1", "lessThan": "06a92f810df8037ca36157282ddcbefdcaf049b8", "status": "affected", "versionType": "git" }, { "version": "e3d617fe6ac7294974fc513dc5e4d8ada8080fd1", "lessThan": "b5be6a0bb639d165c8418d8dddd8f322587be8be", "status": "affected", "versionType": "git" }, { "version": "e3d617fe6ac7294974fc513dc5e4d8ada8080fd1", "lessThan": "a69752f1e5de817941a2ea0609254f6f25acd274", "status": "affected", "versionType": "git" }, { "version": "e3d617fe6ac7294974fc513dc5e4d8ada8080fd1", "lessThan": "be54e6e0f93a39a9c00478d70d12956a5f3d5b9b", "status": "affected", "versionType": "git" }, { "version": "e3d617fe6ac7294974fc513dc5e4d8ada8080fd1", "lessThan": "a0bd7dacbd51c632b8e2c0500b479af564afadf3", "status": "affected", "versionType": "git" } ] }, { "product": "Linux", "vendor": "Linux", "defaultStatus": "affected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "arch/s390/kernel/perf_cpum_sf.c" ], "versions": [ { "version": "4.8", "status": "affected" }, { "version": "0", "lessThan": "4.8", "status": "unaffected", "versionType": "semver" }, { "version": "5.4.287", "lessThanOrEqual": "5.4.*", "status": "unaffected", "versionType": "semver" }, { "version": "5.10.231", "lessThanOrEqual": "5.10.*", "status": "unaffected", "versionType": "semver" }, { "version": "5.15.174", "lessThanOrEqual": "5.15.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.1.120", "lessThanOrEqual": "6.1.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.6.66", "lessThanOrEqual": "6.6.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.12.5", "lessThanOrEqual": "6.12.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.13", "lessThanOrEqual": "*", "status": "unaffected", "versionType": "original_commit_for_fix" } ] } ], "cpeApplicability": [ { "nodes": [ { "operator": "OR", "negate": false, "cpeMatch": [ { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.8", "versionEndExcluding": "5.4.287" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.8", "versionEndExcluding": "5.10.231" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.8", "versionEndExcluding": "5.15.174" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.8", "versionEndExcluding": "6.1.120" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.8", "versionEndExcluding": "6.6.66" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.8", "versionEndExcluding": "6.12.5" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.8", "versionEndExcluding": "6.13" } ] } ] } ], "references": [ { "url": "https://git.kernel.org/stable/c/238e3af849dfdcb1faed544349f7025e533f9aab" }, { "url": "https://git.kernel.org/stable/c/99192c735ed4bfdff0d215ec85c8a87a677cb898" }, { "url": "https://git.kernel.org/stable/c/06a92f810df8037ca36157282ddcbefdcaf049b8" }, { "url": "https://git.kernel.org/stable/c/b5be6a0bb639d165c8418d8dddd8f322587be8be" }, { "url": "https://git.kernel.org/stable/c/a69752f1e5de817941a2ea0609254f6f25acd274" }, { "url": "https://git.kernel.org/stable/c/be54e6e0f93a39a9c00478d70d12956a5f3d5b9b" }, { "url": "https://git.kernel.org/stable/c/a0bd7dacbd51c632b8e2c0500b479af564afadf3" } ], "title": "s390/cpum_sf: Handle CPU hotplug remove during sampling", "x_generator": { "engine": "bippy-1.2.0" } }, "adp": [ { "title": "CVE Program Container", "references": [ { "url": "https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html" } ], "providerMetadata": { "orgId": "af854a3a-2127-422b-91ae-364da2661108", "shortName": "CVE", "dateUpdated": "2025-11-03T20:54:42.821Z" } } ] } }