From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4731A312837 for ; Wed, 24 Jun 2026 16:34:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782318863; cv=none; b=dABE+EKhWKBVl1e/oyw1R3zuXZ1rKKOdSxLEQjM6Sr41batxWiyXpe6rzpEityGh2M0Iyga1OFUi00+X+7f5Aa8azy7jhOB+FHTV/DfmwiLDPMq/8CgcPI5jjK1sPi/MS48oxlz94mD/D6zzIlkSuzxbZRI8qSTTA/j+BRW3S/g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782318863; c=relaxed/simple; bh=vK4B46BvyIysXCA5RdrbRpk5grunyS6txHsJwRMl6jg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=sCEixzhZS2XEIluzOZM0Azgtdt8h1jEM7jEF6WaZ1ZO49uIU984waGHbueHQ2KPb/tJEYROQbKJKGV/DuFaXQkBH/uj/J+5SUDTGEx690khoia03BdybhB96u5NFfwn/a2E37yFHZBtGQadwn66AbQFQ2ewksk9zH9kV6WvBNgQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=wBPEl0tx; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="wBPEl0tx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47B581F000E9; Wed, 24 Jun 2026 16:34:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1782318861; bh=kuZCGsSRhK108zJ1sQblDRtu7akQwYPOiXIyrRVRk54=; h=From:To:Cc:Subject:Date:Reply-To; b=wBPEl0txZIR5SWGGST32gsSg71V3uEMMTfb0ACF3jCDQNMuiFNnqCZBY9FaZeKItB yLbGXyAUXYY7VCqYf+vknKVyJWaV9NWv042+9HhYosXUk6tXf9GqQpl+QuiBk8lab5 IIJ/qizvKK1gc+BVDU8ru7xMRW/O+OzfL37sXVZ8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-52977: futex: Prevent lockup in requeue-PI during signal/ timeout wakeup Date: Wed, 24 Jun 2026 17:30:01 +0100 Message-ID: <2026062440-CVE-2026-52977-deda@gregkh> X-Mailer: git-send-email 2.54.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4603; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=qXKxRC/Mgxl4FAPf/XL3quoudwkpzSq7J5L6jhjX1TQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDFk2rF8vh6pt/7Eh8F7Rpscy109/f+sv6rpr5bfZPT1yT Fd+rZr3oiOWhUGQiUFWTJHlyzaeo/srDil6GdqehpnDygQyhIGLUwAmomzLsKDtRiJTsMb27Nbr 8bGVfMZGbAvdWBjmCpyYuHlP8uPkxTwhPvO4eDTvpPuVAAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman 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