{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2024-56706", "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "state": "PUBLISHED", "assignerShortName": "Linux", "dateReserved": "2024-12-27T15:00:39.856Z", "datePublished": "2024-12-28T09:46:27.297Z", "dateUpdated": "2026-08-05T11:46:11.395Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux", "dateUpdated": "2026-08-05T11:46:11.395Z" }, "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ns390/cpum_sf: Fix and protect memory allocation of SDBs with mutex\n\nReservation of the PMU hardware is done at first event creation\nand is protected by a pair of mutex_lock() and mutex_unlock().\nAfter reservation of the PMU hardware the memory\nrequired for the PMUs the event is to be installed on is\nallocated by allocate_buffers() and alloc_sampling_buffer().\nThis done outside of the mutex protection.\nWithout mutex protection two or more concurrent invocations of\nperf_event_init() may run in parallel.\nThis can lead to allocation of Sample Data Blocks (SDBs)\nmultiple times for the same PMU.\nPrevent this and protect memory allocation of SDBs by\nmutex." } ], "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 vulnerable code is reached only through the local `perf_event_open(2)` syscall on s390, via `cpumsf_pmu_event_init()` → `__hw_perf_event_init()`. There is no remote or adjacent-network path to the CPU-measurement sampling facility.\nAC:L - The attacker controls both sides of the race by simply calling `perf_event_open()` from two or more of its own threads in a loop; `perf_try_init_event()` holds no global lock, and the race window spans a long `GFP_KERNEL` page-allocation loop (hundreds to thousands of pages, freely sleeping), making it trivially winnable.\nPR:L - Under the upstream default `perf_event_paranoid = 2`, an ordinary unprivileged user may open a per-task sampling event (`pid=self`, `cpu=-1`, `exclude_kernel=1`) with no capability at all, and that `cpu == -1` branch is precisely the one that allocates buffers on every online CPU. A local account is required, so not PR:N.\nUI:N - The attacking process triggers the race entirely on its own by issuing concurrent syscalls; no action by any other user or victim process is needed.\nS:U - The corruption is confined to kernel memory managed by the same security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The racing `free_sampling_buffer()` treats still-zero SDBT entries as SDB pointers and walks past the end of the table page, reading unbounded adjacent kernel memory as physical addresses; combined with the resulting use-after-free, the hardware keeps writing sample data into freed/reallocated pages that the attacker reads back through the perf ring buffer.\nI:H - The race yields double-free, use-after-free writes into freed SDBT/SDB pages, and `free_page()` on in-use pages (including physical page 0 via `phys_to_virt(0)`), all classic page-allocator grooming primitives that can be escalated to arbitrary write and control-flow hijack.\nA:H - At minimum each won race orphans an entire SDBT/SDB chain (up to ~32 MB per online CPU) and can be repeated in a loop to exhaust memory; the double-free and freeing of live kernel pages readily produce a page-allocator BUG 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": "8a6fe8f21ec4f049a7b1fe120ad50a5065a9c7a8", "lessThan": "4b3bdfa89635db6a53e02955548bd07bebcae233", "status": "affected", "versionType": "git" }, { "version": "8a6fe8f21ec4f049a7b1fe120ad50a5065a9c7a8", "lessThan": "f55bd479d8663a4a4e403b3d308d3d1aa33d92df", "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": "6.12", "status": "affected" }, { "version": "0", "lessThan": "6.12", "status": "unaffected", "versionType": "semver" }, { "version": "6.12.2", "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": "6.12", "versionEndExcluding": "6.12.2" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.12", "versionEndExcluding": "6.13" } ] } ] } ], "references": [ { "url": "https://git.kernel.org/stable/c/4b3bdfa89635db6a53e02955548bd07bebcae233" }, { "url": "https://git.kernel.org/stable/c/f55bd479d8663a4a4e403b3d308d3d1aa33d92df" } ], "title": "s390/cpum_sf: Fix and protect memory allocation of SDBs with mutex", "x_generator": { "engine": "bippy-1.2.0" } } } }