* CVE-2026-52977: futex: Prevent lockup in requeue-PI during signal/ timeout wakeup
@ 2026-06-24 16:30 Greg Kroah-Hartman
0 siblings, 0 replies; only message in thread
From: Greg Kroah-Hartman @ 2026-06-24 16:30 UTC (permalink / raw)
To: linux-cve-announce; +Cc: Greg Kroah-Hartman
From: Greg Kroah-Hartman <gregkh@kernel.org>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
futex: Prevent lockup in requeue-PI during signal/ timeout wakeup
During wait-requeue-pi (task A) and requeue-PI (task B) the following
race can happen:
Task A Task B
futex_wait_requeue_pi()
futex_setup_timer()
futex_do_wait()
futex_requeue()
CLASS(hb, hb1)(&key1);
CLASS(hb, hb2)(&key2);
*timeout*
futex_requeue_pi_wakeup_sync()
requeue_state = Q_REQUEUE_PI_IGNORE
*blocks on hb->lock*
futex_proxy_trylock_atomic()
futex_requeue_pi_prepare()
Q_REQUEUE_PI_IGNORE => -EAGAIN
double_unlock_hb(hb1, hb2)
*retry*
Task B acquires both hb locks and attempts to acquire the PI-lock of the
top most waiter (task B). Task A is leaving early due to a signal/
timeout and started removing itself from the queue. It updates its
requeue_state but can not remove it from the list because this requires
the hb lock which is owned by task B.
Usually task A is able to swoop the lock after task B unlocked it.
However if task B is of higher priority then task A may not be able to
wake up in time and acquire the lock before task B gets it again.
Especially on a UP system where A is never scheduled.
As a result task A blocks on the lock and task B busy loops, trying to
make progress but live locks the system instead. Tragic.
This can be fixed by removing the top most waiter from the list in this
case. This allows task B to grab the next top waiter (if any) in the
next iteration and make progress.
Remove the top most waiter if futex_requeue_pi_prepare() fails.
Let the waiter conditionally remove itself from the list in
handle_early_requeue_pi_wakeup().
The Linux kernel CVE team has assigned CVE-2026-52977 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.15 with commit 07d91ef510fb16a2e0ca7453222105835b7ba3b8 and fixed in 6.1.175 with commit 4e0ed44e51727d56244a822ab941efe507c47966
Issue introduced in 5.15 with commit 07d91ef510fb16a2e0ca7453222105835b7ba3b8 and fixed in 6.6.141 with commit e3f95b1ba242e37093305812df7fdbe7288a43ac
Issue introduced in 5.15 with commit 07d91ef510fb16a2e0ca7453222105835b7ba3b8 and fixed in 6.12.91 with commit 0aacb6d18f76552e3e0ee25d9f40d21b3486f4cf
Issue introduced in 5.15 with commit 07d91ef510fb16a2e0ca7453222105835b7ba3b8 and fixed in 6.18.33 with commit 69a7cfc66405aeaa2483147653d031b3592ffc9c
Issue introduced in 5.15 with commit 07d91ef510fb16a2e0ca7453222105835b7ba3b8 and fixed in 7.0.10 with commit 0304d60abb9dcc02bc7fe6d1850f4ca206e8f1a0
Issue introduced in 5.15 with commit 07d91ef510fb16a2e0ca7453222105835b7ba3b8 and fixed in 7.1 with commit bc7304f3ae20972d11db6e0b1b541c63feda5f05
Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to
older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-52977
will be updated if fixes are backported, please check that for the most
up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
kernel/futex/requeue.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes. Individual
changes are never tested alone, but rather are part of a larger kernel
release. Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all. If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
https://git.kernel.org/stable/c/4e0ed44e51727d56244a822ab941efe507c47966
https://git.kernel.org/stable/c/e3f95b1ba242e37093305812df7fdbe7288a43ac
https://git.kernel.org/stable/c/0aacb6d18f76552e3e0ee25d9f40d21b3486f4cf
https://git.kernel.org/stable/c/69a7cfc66405aeaa2483147653d031b3592ffc9c
https://git.kernel.org/stable/c/0304d60abb9dcc02bc7fe6d1850f4ca206e8f1a0
https://git.kernel.org/stable/c/bc7304f3ae20972d11db6e0b1b541c63feda5f05
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-24 16:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-24 16:30 CVE-2026-52977: futex: Prevent lockup in requeue-PI during signal/ timeout wakeup Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox