CVE-2026-46274: io-wq: check that the predecessor is hashed in io_wq_remove_pending()
In the Linux kernel, the following vulnerability has been resolved:
io-wq: check that the predecessor is hashed in iowqremovepending()
iowqremovepending() needs to fix up wq->hashtail[] if the cancelled work was the tail of its hash bucket. When doing this, it checks whether the preceding entry in acct->worklist has the same hash value, but never checks that the predecessor is hashed at all. iogetworkhash() is simply atomicread(&work->flags) >> IOWQHASHSHIFT, and the hash bits are never set for non-hashed work, so it returns 0. Thus, when a hashed bucket-0 work is cancelled while a non-hashed work is its list predecessor, the check spuriously passes and a pointer to the non-hashed iokiocb is stored in wq->hashtail[0].
Because non-hashed work is dequeued via the fast path in iogetnextwork(), which never touches hashtail[], the stale pointer is never cleared. Therefore, after the non-hashed iokiocb completes and is freed back to reqcachep, wq->hashtail[0] is a dangling pointer. The iowq is per-task (tctx->iowq) and survives ring open/close, so the dangling pointer persists for the lifetime of the task; the next hashed bucket-0 enqueue dereferences it in iowqinsertwork() and wqlistaddafter() writes through freed memory.
Add the missing iowqishashed() check so a non-hashed predecessor never inherits a hashtail[] slot.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2026-46274?
CVE-2026-46274 has a risk rating of 56, indicating a moderate severity level.
How do I fix CVE-2026-46274?
To mitigate CVE-2026-46274, update the Linux kernel to the latest patched version provided by your distribution.
Which software is affected by CVE-2026-46274?
CVE-2026-46274 affects the Linux kernel, specifically its workqueue implementation.
What is the nature of the vulnerability in CVE-2026-46274?
CVE-2026-46274 is due to the lack of a check for whether the predecessor is hashed when removing pending work in the io_wq_remove_pending() function.
Is CVE-2026-46274 exploitable?
While it has a moderate severity rating, exploitation details are not provided, but it is advisable to apply relevant patches promptly.