CVE-2026-74686: rqspinlock: Reset tail when preserving queue on deadlock

Published Aug 22, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

rqspinlock: Reset tail when preserving queue on deadlock

Currently, the destruction of the waiter queue is suppressed for rqspinlock in cases where a deadlock is detected. Deadlock checks happen relatively frequently (on entry for AA, within 1ms for ABBA), and waiter threads may not be involved in locking scenarios involving deadlocks. Thus, it is useful to not flush the queue and let other waiters take a stab at acquiring the lock after we detect a deadlock and exit.

However, we need to follow the same logic as what we did previously for the waitqtimeout label: reset the tail, and if we cannot, signal the next waiter appropriately. In case of deadlocks, this signal would just mark the MCS node as unlocked, and in case of timeouts, it would signal RESTIMEOUTVAL. The difference thus is in the value propagated, which decides whether the queue remains active or gets flushed.

Not doing the tail reset, and waiting for the next waiter can lead to cases where we are the final waiter, and thus no next waiter arrives, leading to intermittent stalls in this path. Once the next waiter does join, we will be unblocked. In the theoretical case when the next waiter never joins, we risk stalling indefinitely.

This can only happen for ABBA deadlocks, since entry into the wait queue is guarded with AA checks. A precise sequence of executions leading up to this scenario can be:

CPU 0 holds lock A. CPU 1 holds lock B. CPU 2 attempts lock B, becomes the pending waiter for B. CPU 0 attempts lock B. B has locked+pending bits set, thus CPU 0 queues. CPU 1 attempts lock A. CPU 0 detects an ABBA deadlock.

Once deadlock detection happens for CPU 0, it will sit waiting for the next waiter in the queue to populate node->next, which will experience delays until such a waiter arrives.

Fix this by adjusting the logic for the check for deadlocks preceding the waitqtimeout label. It would make sense to consolidate code for both cases and use 'ret' to distinguish the value being propagated, but that is left as an exercise for a future refactoring task to avoid diff noise in this patch.

Affected Software

1 affected component
Linux Kernel

Event History

Aug 22, 2026
CVE Published
via MITRE·03:32 PM
Data Sourced
via MITRE·03:32 PM
Description
Data Sourced
via NVD·04:16 PM
Description

Frequently Asked Questions

1

Under what conditions can the stall occur?

The stall can occur after rqspinlock detects a deadlock and preserves the waiter queue without resetting its tail. If the affected thread is the final waiter, it can remain blocked because no subsequent waiter arrives to advance the queue.

2

Is the stall permanent?

It is described as intermittent rather than permanent. The blocked path is released once another waiter joins the queue.

3

What change resolves the issue?

The fix resets the queue tail when preserving the queue after a deadlock; if the tail cannot be reset, it signals the next waiter by marking its MCS node unlocked. The supplied references identify stable commits f54667b0c16213285c9d9b8e3929f738b8f71826 and 7a3c0289c3c8eb4607dff448ae9ff9f902c813af.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203