{"id":"CVE-2026-74686","aliases":["CVE-2026-74686"],"related":[],"kind":"vulnerability","state":"published","title":"rqspinlock: Reset tail when preserving queue on deadlock","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nrqspinlock: Reset tail when preserving queue on deadlock\n\nCurrently, the destruction of the waiter queue is suppressed for\nrqspinlock in cases where a deadlock is detected. Deadlock checks happen\nrelatively frequently (on entry for AA, within 1ms for ABBA), and waiter\nthreads may not be involved in locking scenarios involving deadlocks.\nThus, it is useful to not flush the queue and let other waiters take a\nstab at acquiring the lock after we detect a deadlock and exit.\n\nHowever, we need to follow the same logic as what we did previously for\nthe waitq_timeout label: reset the tail, and if we cannot, signal the\nnext waiter appropriately. In case of deadlocks, this signal would just\nmark the MCS node as unlocked, and in case of timeouts, it would signal\nRES_TIMEOUT_VAL. The difference thus is in the value propagated, which\ndecides whether the queue remains active or gets flushed.\n\nNot doing the tail reset, and waiting for the next waiter can lead to\ncases where we are the final waiter, and thus no next waiter arrives,\nleading to intermittent stalls in this path. Once the next waiter does\njoin, we will be unblocked. In the theoretical case when the next waiter\nnever joins, we risk stalling indefinitely.\n\nThis can only happen for ABBA deadlocks, since entry into the wait queue\nis guarded with AA checks. A precise sequence of executions leading up\nto this scenario can be:\n\nCPU 0 holds lock A.\nCPU 1 holds lock B.\nCPU 2 attempts lock B, becomes the pending waiter for B.\nCPU 0 attempts lock B. B has locked+pending bits set, thus CPU 0 queues.\nCPU 1 attempts lock A.\nCPU 0 detects an ABBA deadlock.\n\nOnce deadlock detection happens for CPU 0, it will sit waiting for the\nnext waiter in the queue to populate node->next, which will experience\ndelays until such a waiter arrives.\n\nFix this by adjusting the logic for the check for deadlocks preceding\nthe waitq_timeout label. It would make sense to consolidate code for\nboth cases and use 'ret' to distinguish the value being propagated, but\nthat is left as an exercise for a future refactoring task to avoid diff\nnoise in this patch.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nrqspinlock: Reset tail when preserving queue on deadlock\n\nCurrently, the destruction of the waiter queue is suppressed for\nrqspinlock in cases where a deadlock is detected. Deadlock checks happen\nrelatively frequently (on entry for AA, within 1ms for ABBA), and waiter\nthreads may not be involved in locking scenarios involving deadlocks.\nThus, it is useful to not flush the queue and let other waiters take a\nstab at acquiring the lock after we detect a deadlock and exit.\n\nHowever, we need to follow the same logic as what we did previously for\nthe waitq_timeout label: reset the tail, and if we cannot, signal the\nnext waiter appropriately. In case of deadlocks, this signal would just\nmark the MCS node as unlocked, and in case of timeouts, it would signal\nRES_TIMEOUT_VAL. The difference thus is in the value propagated, which\ndecides whether the queue remains active or gets flushed.\n\nNot doing the tail reset, and waiting for the next waiter can lead to\ncases where we are the final waiter, and thus no next waiter arrives,\nleading to intermittent stalls in this path. Once the next waiter does\njoin, we will be unblocked. In the theoretical case when the next waiter\nnever joins, we risk stalling indefinitely.\n\nThis can only happen for ABBA deadlocks, since entry into the wait queue\nis guarded with AA checks. A precise sequence of executions leading up\nto this scenario can be:\n\nCPU 0 holds lock A.\nCPU 1 holds lock B.\nCPU 2 attempts lock B, becomes the pending waiter for B.\nCPU 0 attempts lock B. B has locked+pending bits set, thus CPU 0 queues.\nCPU 1 attempts lock A.\nCPU 0 detects an ABBA deadlock.\n\nOnce deadlock detection happens for CPU 0, it will sit waiting for the\nnext waiter in the queue to populate node->next, which will experience\ndelays until such a waiter arrives.\n\nFix this by adjusting the logic for the check for deadlocks preceding\nthe waitq_timeout label. It would make sense to consolidate code for\nboth cases and use 'ret' to distinguish the value being propagated, but\nthat is left as an exercise for a future refactoring task to avoid diff\nnoise in this patch.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nrqspinlock: Reiniciar el final al preservar la cola en caso de interbloqueo\n\nActualmente, la destrucción de la cola de espera se suprime para rqspinlock en los casos en que se detecta un interbloqueo. Las comprobaciones de interbloqueo ocurren con relativa frecuencia (al entrar para AA, dentro de 1ms para ABBA), y los hilos de espera pueden no estar involucrados en escenarios de bloqueo que implican interbloqueos. Por lo tanto, es útil no vaciar la cola y permitir que otros hilos de espera intenten adquirir el bloqueo después de que detectemos un interbloqueo y salgamos.\n\nSin embargo, necesitamos seguir la misma lógica que la que hicimos previamente para la etiqueta waitq_timeout: reiniciar el final, y si no podemos, señalar al siguiente hilo de espera apropiadamente. En caso de interbloqueos, esta señal simplemente marcaría el nodo MCS como desbloqueado, y en caso de tiempos de espera, señalaría RES_TIMEOUT_VAL. La diferencia, por lo tanto, radica en el valor propagado, que decide si la cola permanece activa o se vacía.\n\nNo realizar el reinicio del final, y esperar al siguiente hilo de espera puede llevar a casos en los que somos el último hilo de espera, y, por lo tanto, no llega ningún siguiente hilo de espera, lo que provoca bloqueos intermitentes en esta ruta. Una vez que el siguiente hilo de espera se une, seremos desbloqueados. En el caso teórico cuando el siguiente hilo de espera nunca se une, corremos el riesgo de un bloqueo indefinido.\n\nEsto solo puede ocurrir para interbloqueos ABBA, ya que la entrada a la cola de espera está protegida con comprobaciones AA. Una secuencia precisa de ejecuciones que conduce a este escenario puede ser:\n\nLa CPU 0 mantiene el bloqueo A.\nLa CPU 1 mantiene el bloqueo B.\nLa CPU 2 intenta el bloqueo B, se convierte en el hilo de espera pendiente para B.\nLa CPU 0 intenta el bloqueo B. B tiene los bits de bloqueado+pendiente establecidos, por lo tanto, la CPU 0 se encola.\nLa CPU 1 intenta el bloqueo A.\nLa CPU 0 detecta un interbloqueo ABBA.\n\nUna vez que la detección de interbloqueo ocurre para la CPU 0, se quedará esperando al siguiente hilo de espera en la cola para poblar node -> next, lo que experimentará retrasos hasta que llegue dicho hilo de espera.\n\nSolucione esto ajustando la lógica para la comprobación de interbloqueos que precede a la etiqueta waitq_timeout. Tendría sentido consolidar el código para ambos casos y usar 'ret' para distinguir el valor que se propaga, pero eso se deja como un ejercicio para una futura tarea de refactorización para evitar ruido en el diff de este parche.","source":"nvd"}],"published":"2026-08-22T15:32:52.178Z","modified":"2026-10-14T13:10:00.187Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"7bd6e5ce5be666fb3fb873bf20f77e62555b7835","fixed":"f54667b0c16213285c9d9b8e3929f738b8f71826","status":"affected"},{"type":"git","introduced":"7bd6e5ce5be666fb3fb873bf20f77e62555b7835","fixed":"7a3c0289c3c8eb4607dff448ae9ff9f902c813af","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.19","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.19","status":"unaffected"},{"type":"semver","introduced":"7.1.9","lastAffected":"7.1.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.2","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/f54667b0c16213285c9d9b8e3929f738b8f71826","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7a3c0289c3c8eb4607dff448ae9ff9f902c813af","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-74686","url":"https://www.cve.org/CVERecord?id=CVE-2026-74686","licence":"CVE Terms of Use","modified":"2026-08-22T15:32:52.178Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-74686","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-74686","licence":"Public domain","modified":"2026-10-14T13:10:00.187Z"}],"updatedAt":"2026-11-25T22:59:34.934Z","epss":{"score":0.00189,"percentile":0.08998,"date":"2026-12-02T12:00:21.000Z"}}