Cyber Posture

CVE-2024-57951

High

Published: 12 February 2025

Published
12 February 2025
Modified
03 November 2025
KEV Added
Patch
CVSS Score 7.8 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.0001 2.0th percentile
Risk Priority 16 60% EPSS · 20% KEV · 20% CVSS

Summary

CVE-2024-57951 is a high-severity Use After Free (CWE-416) vulnerability in Linux Linux Kernel. Its CVSS base score is 7.8 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploitation for Privilege Escalation (T1068); ranked at the 2.0th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified are NIST 800-53 SI-2 (Flaw Remediation) and SI-16 (Memory Protection).

Threat & Defense at a Glance

What attackers do: exploitation maps to Exploitation for Privilege Escalation (T1068) and 1 other technique. What defenders deploy: see the NIST 800-53 controls recommended below.
Threat & Defense Details

Mitigating Controls (NIST 800-53 r5)AI

prevent

Timely remediation through application of the kernel patches adding the hrtimers startup callback directly prevents stale per-CPU state and dangling pointers during CPU hotplug transitions.

prevent

Kernel memory protection mechanisms such as KASLR, SMEP, and SMAP mitigate exploitation of the use-after-free condition resulting from unreset per-CPU state.

detect

System monitoring of kernel logs can detect indicators of exploitation like WARN_ON_ONCE triggers, scheduler anomalies, or crashes from the hrtimers state inconsistencies.

MITRE ATT&CK Enterprise TechniquesAI

T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
T1499.004 Application or System Exploitation Impact
Adversaries may exploit software vulnerabilities that can cause an application or system to crash and deny availability to users.
Why these techniques?

Kernel use-after-free in CPU hotplug path enables local privilege escalation via memory corruption and system crashes/DoS via scheduler or WARN triggers.

Confidence: MEDIUM · MITRE ATT&CK Enterprise v18.1

NVD Description

In the Linux kernel, the following vulnerability has been resolved: hrtimers: Handle CPU state correctly on hotplug Consider a scenario where a CPU transitions from CPUHP_ONLINE to halfway through a CPU hotunplug down to CPUHP_HRTIMERS_PREPARE, and then back to CPUHP_ONLINE:…

more

Since hrtimers_prepare_cpu() does not run, cpu_base.hres_active remains set to 1 throughout. However, during a CPU unplug operation, the tick and the clockevents are shut down at CPUHP_AP_TICK_DYING. On return to the online state, for instance CFS incorrectly assumes that the hrtick is already active, and the chance of the clockevent device to transition to oneshot mode is also lost forever for the CPU, unless it goes back to a lower state than CPUHP_HRTIMERS_PREPARE once. This round-trip reveals another issue; cpu_base.online is not set to 1 after the transition, which appears as a WARN_ON_ONCE in enqueue_hrtimer(). Aside of that, the bulk of the per CPU state is not reset either, which means there are dangling pointers in the worst case. Address this by adding a corresponding startup() callback, which resets the stale per CPU state and sets the online flag. [ tglx: Make the new callback unconditionally available, remove the online modification in the prepare() callback and clear the remaining state in the starting callback instead of the prepare callback ]

Deeper analysisAI

CVE-2024-57951 is a vulnerability in the Linux kernel's hrtimers subsystem during CPU hotplug operations. It occurs when a CPU transitions from the CPUHP_ONLINE state partway through a hotunplug process to CPUHP_HRTIMERS_PREPARE and then back to CPUHP_ONLINE. In this scenario, hrtimers_prepare_cpu() does not execute, leaving cpu_base.hres_active set to 1. The tick and clockevents shut down at CPUHP_AP_TICK_DYING, causing issues like the Completely Fair Scheduler (CFS) incorrectly assuming hrtick is active, permanent loss of oneshot mode for the clockevent device unless the CPU reaches a lower state, cpu_base.online not being set (triggering a WARN_ON_ONCE in enqueue_hrtimer()), and unreset per-CPU state potentially leading to dangling pointers. This corresponds to CWE-416 (Use After Free) with a CVSS v3.1 base score of 7.8 (AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

A local attacker with low privileges can exploit this vulnerability by triggering the specific CPU hotplug state transitions. Successful exploitation could result in high-impact confidentiality, integrity, and availability violations, such as system crashes from WARN_ON_ONCE triggers, incorrect scheduler behavior, or memory corruption via dangling pointers in per-CPU state.

The provided references are kernel stable commit patches that address the issue. These include adding a startup() callback to unconditionally reset stale per-CPU state and set the cpu_base.online flag, removing online modifications from the prepare() callback, and clearing remaining state in the starting callback. Applying these patches to affected Linux kernels mitigates the vulnerability.

Details

CWE(s)

Affected Products

linux
linux kernel
6.13 · 4.19.302 — 4.20 · 5.4.264 — 5.4.290 · 5.10.204 — 5.10.234

CVEs Like This One

CVE-2024-57795Same product: Linux Linux Kernel
CVE-2026-31665Same product: Linux Linux Kernel
CVE-2025-21791Same product: Linux Linux Kernel
CVE-2025-21883Same product: Linux Linux Kernel
CVE-2026-31485Same product: Linux Linux Kernel
CVE-2026-31511Same product: Linux Linux Kernel
CVE-2025-21751Same product: Linux Linux Kernel
CVE-2023-53023Same product: Linux Linux Kernel
CVE-2026-31580Same product: Linux Linux Kernel
CVE-2024-58072Same product: Linux Linux Kernel

References