{"id":"CVE-2024-31076","aliases":["CVE-2024-31076"],"related":[],"kind":"vulnerability","state":"published","title":"genirq/cpuhotplug, x86/vector: Prevent vector leak during CPU offline","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ngenirq/cpuhotplug, x86/vector: Prevent vector leak during CPU offline\n\nThe absence of IRQD_MOVE_PCNTXT prevents immediate effectiveness of\ninterrupt affinity reconfiguration via procfs. Instead, the change is\ndeferred until the next instance of the interrupt being triggered on the\noriginal CPU.\n\nWhen the interrupt next triggers on the original CPU, the new affinity is\nenforced within __irq_move_irq(). A vector is allocated from the new CPU,\nbut the old vector on the original CPU remains and is not immediately\nreclaimed. Instead, apicd->move_in_progress is flagged, and the reclaiming\nprocess is delayed until the next trigger of the interrupt on the new CPU.\n\nUpon the subsequent triggering of the interrupt on the new CPU,\nirq_complete_move() adds a task to the old CPU's vector_cleanup list if it\nremains online. Subsequently, the timer on the old CPU iterates over its\nvector_cleanup list, reclaiming old vectors.\n\nHowever, a rare scenario arises if the old CPU is outgoing before the\ninterrupt triggers again on the new CPU.\n\nIn that case irq_force_complete_move() is not invoked on the outgoing CPU\nto reclaim the old apicd->prev_vector because the interrupt isn't currently\naffine to the outgoing CPU, and irq_needs_fixup() returns false. Even\nthough __vector_schedule_cleanup() is later called on the new CPU, it\ndoesn't reclaim apicd->prev_vector; instead, it simply resets both\napicd->move_in_progress and apicd->prev_vector to 0.\n\nAs a result, the vector remains unreclaimed in vector_matrix, leading to a\nCPU vector leak.\n\nTo address this issue, move the invocation of irq_force_complete_move()\nbefore the irq_needs_fixup() call to reclaim apicd->prev_vector, if the\ninterrupt is currently or used to be affine to the outgoing CPU.\n\nAdditionally, reclaim the vector in __vector_schedule_cleanup() as well,\nfollowing a warning message, although theoretically it should never see\napicd->move_in_progress with apicd->prev_cpu pointing to an offline CPU.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ngenirq/cpuhotplug, x86/vector: Prevent vector leak during CPU offline\n\nThe absence of IRQD_MOVE_PCNTXT prevents immediate effectiveness of\ninterrupt affinity reconfiguration via procfs. Instead, the change is\ndeferred until the next instance of the interrupt being triggered on the\noriginal CPU.\n\nWhen the interrupt next triggers on the original CPU, the new affinity is\nenforced within __irq_move_irq(). A vector is allocated from the new CPU,\nbut the old vector on the original CPU remains and is not immediately\nreclaimed. Instead, apicd->move_in_progress is flagged, and the reclaiming\nprocess is delayed until the next trigger of the interrupt on the new CPU.\n\nUpon the subsequent triggering of the interrupt on the new CPU,\nirq_complete_move() adds a task to the old CPU's vector_cleanup list if it\nremains online. Subsequently, the timer on the old CPU iterates over its\nvector_cleanup list, reclaiming old vectors.\n\nHowever, a rare scenario arises if the old CPU is outgoing before the\ninterrupt triggers again on the new CPU.\n\nIn that case irq_force_complete_move() is not invoked on the outgoing CPU\nto reclaim the old apicd->prev_vector because the interrupt isn't currently\naffine to the outgoing CPU, and irq_needs_fixup() returns false. Even\nthough __vector_schedule_cleanup() is later called on the new CPU, it\ndoesn't reclaim apicd->prev_vector; instead, it simply resets both\napicd->move_in_progress and apicd->prev_vector to 0.\n\nAs a result, the vector remains unreclaimed in vector_matrix, leading to a\nCPU vector leak.\n\nTo address this issue, move the invocation of irq_force_complete_move()\nbefore the irq_needs_fixup() call to reclaim apicd->prev_vector, if the\ninterrupt is currently or used to be affine to the outgoing CPU.\n\nAdditionally, reclaim the vector in __vector_schedule_cleanup() as well,\nfollowing a warning message, although theoretically it should never see\napicd->move_in_progress with apicd->prev_cpu pointing to an offline CPU.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se resolvió la siguiente vulnerabilidad: genirq/cpuhotplug, x86/vector: evita la fuga de vectores durante la CPU fuera de línea. La ausencia de IRQD_MOVE_PCNTXT impide la efectividad inmediata de la reconfiguración de la afinidad de interrupción a través de procfs. En cambio, el cambio se difiere hasta la siguiente instancia de interrupción que se activa en la CPU original. La siguiente vez que se activa la interrupción en la CPU original, la nueva afinidad se aplica dentro de __irq_move_irq(). Se asigna un vector desde la nueva CPU, pero el vector antiguo en la CPU original permanece y no se recupera inmediatamente. En su lugar, se marca apicd-&gt;move_in_progress y el proceso de recuperación se retrasa hasta el siguiente desencadenante de la interrupción en la nueva CPU. Tras la activación posterior de la interrupción en la nueva CPU, irq_complete_move() agrega una tarea a la lista vector_cleanup de la CPU anterior si permanece en línea. Posteriormente, el temporizador de la CPU antigua itera sobre su lista vector_cleanup, recuperando vectores antiguos. Sin embargo, surge un escenario poco común si la CPU antigua sale antes de que la interrupción se active nuevamente en la nueva CPU. En ese caso, irq_force_complete_move() no se invoca en la CPU saliente para recuperar el antiguo apicd-&gt;prev_vector porque la interrupción no es actualmente afín a la CPU saliente, e irq_needs_fixup() devuelve false. Aunque más tarde se llama a __vector_schedule_cleanup() en la nueva CPU, no reclama apicd-&gt;prev_vector; en su lugar, simplemente restablece apicd-&gt;move_in_progress y apicd-&gt;prev_vector a 0. Como resultado, el vector permanece sin reclamar en vector_matrix, lo que provoca una fuga de vector de CPU. Para solucionar este problema, mueva la invocación de irq_force_complete_move() antes de la llamada irq_needs_fixup() para recuperar apicd-&gt;prev_vector, si la interrupción es actualmente o solía ser afín a la CPU saliente. Además, recupere también el vector en __vector_schedule_cleanup(), después de un mensaje de advertencia, aunque en teoría nunca debería ver apicd-&gt;move_in_progress con apicd-&gt;prev_cpu apuntando a una CPU fuera de línea.","source":"nvd"}],"published":"2024-06-21T10:18:04.335Z","modified":"2026-06-17T07:27:44.767Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"f0383c24b4855f6a4b5a358c7b2d2c16e0437e9b","fixed":"a40209d355afe4ed6d533507838c9e5cd70a76d8","status":"affected"},{"type":"git","introduced":"f0383c24b4855f6a4b5a358c7b2d2c16e0437e9b","fixed":"f5f4675960609d8c5ee95f027fbf6ce380f98372","status":"affected"},{"type":"git","introduced":"f0383c24b4855f6a4b5a358c7b2d2c16e0437e9b","fixed":"6752dfcfff3ac3e16625ebd3f0ad9630900e7e76","status":"affected"},{"type":"git","introduced":"f0383c24b4855f6a4b5a358c7b2d2c16e0437e9b","fixed":"9eeda3e0071a329af1eba15f4e57dc39576bb420","status":"affected"},{"type":"git","introduced":"f0383c24b4855f6a4b5a358c7b2d2c16e0437e9b","fixed":"e9c96d01d520498b169ce734a8ad1142bef86a30","status":"affected"},{"type":"git","introduced":"f0383c24b4855f6a4b5a358c7b2d2c16e0437e9b","fixed":"59f86a2908380d09cdc726461c0fbb8d8579c99f","status":"affected"},{"type":"git","introduced":"f0383c24b4855f6a4b5a358c7b2d2c16e0437e9b","fixed":"ebfb16fc057a016abb46a9720a54abf0d4f6abe1","status":"affected"},{"type":"git","introduced":"f0383c24b4855f6a4b5a358c7b2d2c16e0437e9b","fixed":"a6c11c0a5235fb144a65e0cb2ffd360ddc1f6c32","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.13","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.13","status":"unaffected"},{"type":"semver","introduced":"4.19.316","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.278","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.219","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.161","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.93","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.33","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.9.4","lastAffected":"6.9.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.10","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.13","fixed":"4.19.316"},{"status":"affected","introduced":"4.20","fixed":"5.4.278"},{"status":"affected","introduced":"5.5","fixed":"5.10.219"},{"status":"affected","introduced":"5.11","fixed":"5.15.161"},{"status":"affected","introduced":"5.16","fixed":"6.1.93"},{"status":"affected","introduced":"6.2","fixed":"6.6.33"},{"status":"affected","introduced":"6.7","fixed":"6.9.4"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/a40209d355afe4ed6d533507838c9e5cd70a76d8","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f5f4675960609d8c5ee95f027fbf6ce380f98372","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6752dfcfff3ac3e16625ebd3f0ad9630900e7e76","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9eeda3e0071a329af1eba15f4e57dc39576bb420","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e9c96d01d520498b169ce734a8ad1142bef86a30","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/59f86a2908380d09cdc726461c0fbb8d8579c99f","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ebfb16fc057a016abb46a9720a54abf0d4f6abe1","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a6c11c0a5235fb144a65e0cb2ffd360ddc1f6c32","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-09-10T17:09:53.896Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-31076","url":"https://www.cve.org/CVERecord?id=CVE-2024-31076","licence":"CVE Terms of Use","modified":"2026-05-11T20:10:48.791Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-31076","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-31076","licence":"Public domain","modified":"2026-06-17T07:27:44.767Z"}],"updatedAt":"2026-11-25T22:58:42.103Z","epss":{"score":0.00258,"percentile":0.18684,"date":"2026-12-02T12:00:21.000Z"}}