From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793187634; b=uFPIWa4SPxwzi5w22K7hOH1Px0cLYrbjph1cGcOZIPppwql2JCsm5uvljD2xTXn4vxvv Jsus5/lOzqM9+ClOAGYbYXbXGQRq1iUb8Povz5NXyuxyHhfKuZ1BixrmyvrvMfQp1izfa XrzgDppSt1LGDz5/B66Kfc45faMN0IPpOqsU8rv+CweyUy1OYmGeLiVy2Nrq5RsI4WV+S H9dvzu+QTTA2w1fHHwaAssZc3t0C+CmYXDFEUZwQM49rMJJmqQOinS2zUU7gEigiZX4/p mWORsHgSjEx0XuXMYEqC/F20N3plwR6PmY0x0uyuFUY75K3RgHqye3yBSl0VoXvkl7w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793187634; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=CX0uMDfqD5YMoWauU37ufitnzi79nh5ugxz1LHtAVSQ=; b=b1xogxUmyVXXSyYbreBp+/rWy9AiNfcPIvyxFa/p3Mqmgf4RmKRn5wAiriABDk/LqCfR ODItuIyak4U8uuZakxYA4cFo6XGwI2i2y373YPinjGqVO4aktBsTKrY7cwRj/h9vcZ6tZ WS1WnzGGbRx8URrBTxv8C2xBlrvD/V7GvEecCuqZr27dZ6SKNRecknSXxd5oXmnC3xedc oOoBNwsUZYkAy9wae8Sz3EPqcSpZ16m6q22VfE4pKVuOGuzmoKMNhmYhsc8BZ0SLJpMHe wOCGwJXYpmxJ9Z+I+X8HzcsIzAmi+vwi5zixljvbEbdOLHKFzTOynMJqNNmHMQhA2Mw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=PPgYuh2h; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 072B3606A321 for ; Wed, 28 Oct 2026 11:40:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=PPgYuh2h Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3AD4F1F01825; Wed, 28 Oct 2026 11:40:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1793187633; bh=CX0uMDfqD5YMoWauU37ufitnzi79nh5ugxz1LHtAVSQ=; h=From:To:Cc:Subject:Date:Reply-To; b=PPgYuh2hMWoTH3/cHMk6dydecmj0OzoU+2rClx3rq4LoaiZRKXiPSjxiCw5OmSbrk jY2xbzcf91iJTjiFBdTHvXwwYq1b4SkcirXBipFkasC3ZPEZHGTOTlL6zrCJv04SQX fWS3+ZfwkRqgBtbSui8mz2pj7CrW6p/jCc6hDr5M= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99179: watch_queue: Fix note pool publication race in watch_queue_set_size() Date: Wed, 28 Oct 2026 11:36:06 +0100 Message-ID: <2026102809-CVE-2026-99179-23eb@gregkh> X-Mailer: git-send-email 2.56.0 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3599; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=OgWFNJZrZiZ8XbNdXqcfxKyduZpLoR9wczPfjY7tI1c=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkPz9+tE7nu+P53BdulVo9MjvBzN7vOlidXnGjz2S7It 2L1Nn6WjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiIiTfDfH8ebVObd7lfX225 qxT11/KxbZmSHsP8oEr9v1+s+eeV1f6O7hJNlZ7VWMgMAA== 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: watch_queue: Fix note pool publication race in watch_queue_set_size() There is a race between watch_queue_set_size() and post_one_notification(). watch_queue_set_size() publishes wqueue->notes, notes_bitmap, nr_pages and nr_notes with plain stores, and post_one_notification() reads them with plain loads under a different lock, so nothing orders the four stores against the poster's loads: depending on the build, notes can be stored last (gcc 14 on x86-64 does this). Since keyctl_watch_key() lets a watch attach to a queue before it is sized, post_one_notification() can already be running on another CPU at that moment: it reads nr_notes > 0, passes its bounds check, and then reads notes while it is still NULL, dereferencing notes[0]. An unprivileged user triggers this reliably by watching one of its own keys through a notification pipe and racing ioctl(IOC_WATCH_QUEUE_SET_SIZE) on that pipe against keyctl(KEYCTL_SETPERM) on the key from another CPU, triggering: BUG: kernel NULL pointer dereference, address: 0000000000000000 RIP: 0010:post_one_notification.isra.0+0xa2/0x1e0 Call Trace: __post_watch_notification+0x148/0x180 keyctl_setperm_key+0x119/0x130 do_syscall_64+0x108/0x4c0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Kernel panic - not syncing: Fatal exception in interrupt Fix this by publishing nr_notes last with smp_store_release(), and by reading it once with smp_load_acquire() in post_one_notification() before the bitmap and the page array are touched. A poster that observes a non-zero nr_notes then also observes the pool behind it; one that observes zero drops the notification as before. The Linux kernel CVE team has assigned CVE-2026-99179 to this issue. Affected and fixed versions =========================== Issue introduced in 5.8 with commit c73be61cede5882f9605a852414db559c0ebedfd and fixed in 6.18.59 with commit 811fb6d0b07605e8e8d93bde8748be4b3028809a Issue introduced in 5.8 with commit c73be61cede5882f9605a852414db559c0ebedfd and fixed in 7.2.13 with commit 9e73a6754457ffed8399b835552013b9363e51d1 Issue introduced in 5.8 with commit c73be61cede5882f9605a852414db559c0ebedfd and fixed in 7.3 with commit 5e531d62f1f8834faf7a4eed0d41105cf6570a8f 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-99179 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/watch_queue.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/811fb6d0b07605e8e8d93bde8748be4b3028809a https://git.kernel.org/stable/c/9e73a6754457ffed8399b835552013b9363e51d1 https://git.kernel.org/stable/c/5e531d62f1f8834faf7a4eed0d41105cf6570a8f