{"id":"CVE-2024-57951","aliases":["CVE-2024-57951"],"related":[],"kind":"vulnerability","state":"published","title":"hrtimers: Handle CPU state correctly on hotplug","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nhrtimers: Handle CPU state correctly on hotplug\n\nConsider a scenario where a CPU transitions from CPUHP_ONLINE to halfway\nthrough a CPU hotunplug down to CPUHP_HRTIMERS_PREPARE, and then back to\nCPUHP_ONLINE:\n\nSince hrtimers_prepare_cpu() does not run, cpu_base.hres_active remains set\nto 1 throughout. However, during a CPU unplug operation, the tick and the\nclockevents are shut down at CPUHP_AP_TICK_DYING. On return to the online\nstate, for instance CFS incorrectly assumes that the hrtick is already\nactive, and the chance of the clockevent device to transition to oneshot\nmode is also lost forever for the CPU, unless it goes back to a lower state\nthan CPUHP_HRTIMERS_PREPARE once.\n\nThis round-trip reveals another issue; cpu_base.online is not set to 1\nafter the transition, which appears as a WARN_ON_ONCE in enqueue_hrtimer().\n\nAside of that, the bulk of the per CPU state is not reset either, which\nmeans there are dangling pointers in the worst case.\n\nAddress this by adding a corresponding startup() callback, which resets the\nstale per CPU state and sets the online flag.\n\n[ tglx: Make the new callback unconditionally available, remove the online\n  \tmodification in the prepare() callback and clear the remaining\n  \tstate in the starting callback instead of the prepare callback ]","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nhrtimers: Handle CPU state correctly on hotplug\n\nConsider a scenario where a CPU transitions from CPUHP_ONLINE to halfway\nthrough a CPU hotunplug down to CPUHP_HRTIMERS_PREPARE, and then back to\nCPUHP_ONLINE:\n\nSince hrtimers_prepare_cpu() does not run, cpu_base.hres_active remains set\nto 1 throughout. However, during a CPU unplug operation, the tick and the\nclockevents are shut down at CPUHP_AP_TICK_DYING. On return to the online\nstate, for instance CFS incorrectly assumes that the hrtick is already\nactive, and the chance of the clockevent device to transition to oneshot\nmode is also lost forever for the CPU, unless it goes back to a lower state\nthan CPUHP_HRTIMERS_PREPARE once.\n\nThis round-trip reveals another issue; cpu_base.online is not set to 1\nafter the transition, which appears as a WARN_ON_ONCE in enqueue_hrtimer().\n\nAside of that, the bulk of the per CPU state is not reset either, which\nmeans there are dangling pointers in the worst case.\n\nAddress this by adding a corresponding startup() callback, which resets the\nstale per CPU state and sets the online flag.\n\n[ tglx: Make the new callback unconditionally available, remove the online\n  \tmodification in the prepare() callback and clear the remaining\n  \tstate in the starting callback instead of the prepare callback ]","source":"cvelist"},{"lang":"es","text":"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 ]","source":"nvd"}],"published":"2025-02-12T13:27:53.124Z","modified":"2026-10-15T02:17:13.857Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"54d0d83a53508d687fd4a225f8aa1f18559562d0","fixed":"95e4f62df23f4df1ce6ef897d44b8e23c260921a","status":"affected"},{"type":"git","introduced":"7f4c89400d2997939f6971c7981cc780a219e36b","fixed":"14984139f1f2768883332965db566ef26db609e7","status":"affected"},{"type":"git","introduced":"6fcbcc6c8e52650749692c7613cbe71bf601670d","fixed":"15b453db41d36184cf0ccc21e7df624014ab6a1a","status":"affected"},{"type":"git","introduced":"75b5016ce325f1ef9c63e5398a1064cf8a7a7354","fixed":"3d41dbf82e10c44e53ea602398ab002baec27e75","status":"affected"},{"type":"git","introduced":"53f408cad05bb987af860af22f4151e5a18e6ee8","fixed":"a5cbbea145b400e40540c34816d16d36e0374fbc","status":"affected"},{"type":"git","introduced":"5c0930ccaad5a74d74e8b18b648c5eb21ed2fe94","fixed":"38492f6ee883c7b1d33338bf531a62cff69b4b28","status":"affected"},{"type":"git","introduced":"5c0930ccaad5a74d74e8b18b648c5eb21ed2fe94","fixed":"2f8dea1692eef2b7ba6a256246ed82c365fdc686","status":"affected"},{"type":"git","version":"9a2fc41acb69dd4e2a58d0c04346c3333c2341fc","status":"affected"},{"type":"semver","introduced":"5.4.264","fixed":"5.4.290","status":"affected"},{"type":"semver","introduced":"5.10.204","fixed":"5.10.234","status":"affected"},{"type":"semver","introduced":"5.15.143","fixed":"5.15.177","status":"affected"},{"type":"semver","introduced":"6.1.68","fixed":"6.1.127","status":"affected"},{"type":"semver","introduced":"6.6.7","fixed":"6.6.74","status":"affected"},{"type":"semver","introduced":"4.19.302","fixed":"4.20","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.7","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.7","status":"unaffected"},{"type":"semver","introduced":"5.4.290","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.234","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.177","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.127","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.74","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.11","lastAffected":"6.12.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.13","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"4.19.302","fixed":"4.20"},{"status":"affected","introduced":"5.4.264","fixed":"5.4.290"},{"status":"affected","introduced":"5.10.204","fixed":"5.10.234"},{"status":"affected","introduced":"5.15.143","fixed":"5.15.177"},{"status":"affected","introduced":"6.1.68","fixed":"6.1.127"},{"status":"affected","introduced":"6.6.7","fixed":"6.6.74"},{"status":"affected","introduced":"6.7","fixed":"6.12.11"},{"status":"affected","version":"6.13"},{"status":"affected","version":"6.13"},{"status":"affected","version":"6.13"},{"status":"affected","version":"6.13"},{"status":"affected","version":"6.13"},{"status":"affected","version":"6.13"},{"status":"affected","version":"6.13"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/95e4f62df23f4df1ce6ef897d44b8e23c260921a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/14984139f1f2768883332965db566ef26db609e7","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/15b453db41d36184cf0ccc21e7df624014ab6a1a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3d41dbf82e10c44e53ea602398ab002baec27e75","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a5cbbea145b400e40540c34816d16d36e0374fbc","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/38492f6ee883c7b1d33338bf531a62cff69b4b28","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2f8dea1692eef2b7ba6a256246ed82c365fdc686","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-265688.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-355557.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2025-10-01T19:51:21.225Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-57951","url":"https://www.cve.org/CVERecord?id=CVE-2024-57951","licence":"CVE Terms of Use","modified":"2026-10-15T01:01:03.578Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-57951","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-57951","licence":"Public domain","modified":"2026-10-15T02:17:13.857Z"}],"updatedAt":"2026-11-25T22:58:51.621Z","epss":{"score":0.00331,"percentile":0.18775,"date":"2026-11-30T12:00:22.000Z"}}