CVE-2024-57951

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: 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 ]
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc6:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc7:*:*:*:*:*:*

History

14 Feb 2025, 15:57

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: hrtimers: Controlar el estado de la CPU correctamente en hotplug Considere un escenario donde una CPU pasa de CPUHP_ONLINE a la mitad de un hotunplug de CPU hasta CPUHP_HRTIMERS_PREPARE, y luego vuelve a CPUHP_ONLINE: Dado que hrtimers_prepare_cpu() no se ejecuta, cpu_base.hres_active permanece establecido en 1 durante todo el proceso. Sin embargo, durante una operación de desconexión de la CPU, el tick y los clockevents se apagan en CPUHP_AP_TICK_DYING. Al volver al estado en línea, por ejemplo, CFS supone incorrectamente que el hrtick ya está activo, y la posibilidad de que el dispositivo clockevent pase al modo one-shot también se pierde para siempre para la CPU, a menos que vuelva a un estado inferior a CPUHP_HRTIMERS_PREPARE una vez. Este viaje de ida y vuelta revela otro problema; cpu_base.online no se establece en 1 después de la transición, lo que aparece como WARN_ON_ONCE en enqueue_hrtimer(). Aparte de eso, la mayor parte del estado por CPU tampoco se restablece, lo que significa que hay punteros inactivos en el peor de los casos. Resuelva esto agregando una devolución de llamada startup() correspondiente, que restablece el estado obsoleto por CPU y establece el indicador en línea. [ tglx: haga que la nueva devolución de llamada esté disponible incondicionalmente, elimine la modificación en línea en la devolución de llamada prepare() y borre el estado restante en la devolución de llamada de inicio en lugar de la devolución de llamada de preparación ]
CPE cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc6:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc7:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.13:rc1:*:*:*:*:*:*
First Time Linux
Linux linux Kernel
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 7.8
CWE CWE-416
References () https://git.kernel.org/stable/c/14984139f1f2768883332965db566ef26db609e7 - () https://git.kernel.org/stable/c/14984139f1f2768883332965db566ef26db609e7 - Patch
References () https://git.kernel.org/stable/c/15b453db41d36184cf0ccc21e7df624014ab6a1a - () https://git.kernel.org/stable/c/15b453db41d36184cf0ccc21e7df624014ab6a1a - Patch
References () https://git.kernel.org/stable/c/2f8dea1692eef2b7ba6a256246ed82c365fdc686 - () https://git.kernel.org/stable/c/2f8dea1692eef2b7ba6a256246ed82c365fdc686 - Patch
References () https://git.kernel.org/stable/c/38492f6ee883c7b1d33338bf531a62cff69b4b28 - () https://git.kernel.org/stable/c/38492f6ee883c7b1d33338bf531a62cff69b4b28 - Patch
References () https://git.kernel.org/stable/c/3d41dbf82e10c44e53ea602398ab002baec27e75 - () https://git.kernel.org/stable/c/3d41dbf82e10c44e53ea602398ab002baec27e75 - Patch
References () https://git.kernel.org/stable/c/95e4f62df23f4df1ce6ef897d44b8e23c260921a - () https://git.kernel.org/stable/c/95e4f62df23f4df1ce6ef897d44b8e23c260921a - Patch
References () https://git.kernel.org/stable/c/a5cbbea145b400e40540c34816d16d36e0374fbc - () https://git.kernel.org/stable/c/a5cbbea145b400e40540c34816d16d36e0374fbc - Patch

12 Feb 2025, 14:15

Type Values Removed Values Added
New CVE

Information

Published : 2025-02-12 14:15

Updated : 2025-02-14 15:57


NVD link : CVE-2024-57951

Mitre link : CVE-2024-57951

CVE.ORG link : CVE-2024-57951


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-416

Use After Free