{"id":"CVE-2026-99179","published":"2026-10-28T10:35:32Z","modified":"2026-10-30T12:42:42Z","title":"watch_queue: Fix note pool publication race in watch_queue_set_size()","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nwatch_queue: Fix note pool publication race in watch_queue_set_size()\n\nThere is a race between watch_queue_set_size() and post_one_notification().\nwatch_queue_set_size() publishes wqueue->notes, notes_bitmap, nr_pages and\nnr_notes with plain stores, and post_one_notification() reads them with\nplain loads under a different lock, so nothing orders the four stores\nagainst the poster's loads: depending on the build, notes can be stored\nlast (gcc 14 on x86-64 does this).  Since keyctl_watch_key() lets a watch\nattach to a queue before it is sized, post_one_notification() can already\nbe running on another CPU at that moment: it reads nr_notes > 0, passes\nits bounds check, and then reads notes while it is still NULL,\ndereferencing notes[0].\n\nAn unprivileged user triggers this reliably by watching one of its own\nkeys through a notification pipe and racing ioctl(IOC_WATCH_QUEUE_SET_SIZE)\non that pipe against keyctl(KEYCTL_SETPERM) on the key from another CPU,\ntriggering:\n\n  BUG: kernel NULL pointer dereference, address: 0000000000000000\n  RIP: 0010:post_one_notification.isra.0+0xa2/0x1e0\n  Call Trace:\n   __post_watch_notification+0x148/0x180\n   keyctl_setperm_key+0x119/0x130\n   do_syscall_64+0x108/0x4c0\n   entry_SYSCALL_64_after_hwframe+0x77/0x7f\n  Kernel panic - not syncing: Fatal exception in interrupt\n\nFix this by publishing nr_notes last with smp_store_release(), and by\nreading it once with smp_load_acquire() in post_one_notification() before\nthe bitmap and the page array are touched.  A poster that observes a\nnon-zero nr_notes then also observes the pool behind it; one that observes\nzero drops the notification as before.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.00218,"percentile":0.12355,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/2137d487b25eefa862be70de489b64f4c679fe1f","tags":[]},{"url":"https://git.kernel.org/stable/c/6aaa6c1a1b61aae332d6e7e0083140b86ea51e14","tags":[]},{"url":"https://git.kernel.org/stable/c/4b20867d80e7e91fb7db531f34035d91591ba405","tags":[]},{"url":"https://git.kernel.org/stable/c/da52e5fcb2cae6acdc0d5722ff83499f8232b9d1","tags":[]},{"url":"https://git.kernel.org/stable/c/f94c45f83e688e41dfe1b3a589806a0a25567260","tags":[]},{"url":"https://git.kernel.org/stable/c/811fb6d0b07605e8e8d93bde8748be4b3028809a","tags":[]},{"url":"https://git.kernel.org/stable/c/9e73a6754457ffed8399b835552013b9363e51d1","tags":[]},{"url":"https://git.kernel.org/stable/c/5e531d62f1f8834faf7a4eed0d41105cf6570a8f","tags":[]}],"priority":{"score":2.5,"factors":[{"name":"EPSS percentile","points":2.47}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= c73be61cede5882f9605a852414db559c0ebedfd, < 2137d487b25eefa862be70de489b64f4c679fe1f",">= c73be61cede5882f9605a852414db559c0ebedfd, < 6aaa6c1a1b61aae332d6e7e0083140b86ea51e14",">= c73be61cede5882f9605a852414db559c0ebedfd, < 4b20867d80e7e91fb7db531f34035d91591ba405",">= c73be61cede5882f9605a852414db559c0ebedfd, < da52e5fcb2cae6acdc0d5722ff83499f8232b9d1",">= c73be61cede5882f9605a852414db559c0ebedfd, < f94c45f83e688e41dfe1b3a589806a0a25567260",">= c73be61cede5882f9605a852414db559c0ebedfd, < 811fb6d0b07605e8e8d93bde8748be4b3028809a",">= c73be61cede5882f9605a852414db559c0ebedfd, < 9e73a6754457ffed8399b835552013b9363e51d1",">= c73be61cede5882f9605a852414db559c0ebedfd, < 5e531d62f1f8834faf7a4eed0d41105cf6570a8f"]},{"vendor":"Linux","product":"Linux","versions":["5.8"]}],"euvd":{"id":"EUVD-2026-111931","exploited":false,"provenance":"source"}}