freenode
Kernel & Low-Level

PREEMPT_RT futex deadlock detection can silently fail

Stale waiter state turns a two-task priority-inheritance cycle into a permanent hang instead of an error, tracked as CVE-2026-43499.

A missed initialization in the kernel's real-time mutex code can hide a futex deadlock on PREEMPT_RT, leaving both tasks blocked forever. The flaw is tracked as CVE-2026-43499.

Priority-inheritance futexes build their waiters on the stack and rely on the common waiter setup path. That path never clears a field the lock code uses to decide whether a waiter belongs to a wound-wait mutex. On PREEMPT_RT, the priority-chain walk treats a leftover non-null value as a reason to turn off deadlock detection, or to convert a detected deadlock into success. The caller is told the operation worked. Both tasks stay blocked.

Sebastian Chlad found the failure with the LTP ghostlock test, which builds a two-task cycle and requeues a waiter onto a PI futex whose owner is already blocked on a futex the waiter holds. The requeue syscall returned success instead of a deadlock error. The fix clears the field when the waiter is initialized. Wound-wait mutexes still set it afterward, so their behavior is unchanged.