{"id":"CVE-2026-46274","aliases":["CVE-2026-46274"],"related":[],"kind":"vulnerability","state":"published","title":"io-wq: check that the predecessor is hashed in io_wq_remove_pending()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nio-wq: check that the predecessor is hashed in io_wq_remove_pending()\n\nio_wq_remove_pending() needs to fix up wq->hash_tail[] if the cancelled\nwork was the tail of its hash bucket. When doing this, it checks whether\nthe preceding entry in acct->work_list has the same hash value, but\nnever checks that the predecessor is hashed at all. io_get_work_hash()\nis simply atomic_read(&work->flags) >> IO_WQ_HASH_SHIFT, and the hash\nbits are never set for non-hashed work, so it returns 0. Thus, when a\nhashed bucket-0 work is cancelled while a non-hashed work is its list\npredecessor, the check spuriously passes and a pointer to the non-hashed\nio_kiocb is stored in wq->hash_tail[0].\n\nBecause non-hashed work is dequeued via the fast path in\nio_get_next_work(), which never touches hash_tail[], the stale pointer\nis never cleared. Therefore, after the non-hashed io_kiocb completes and\nis freed back to req_cachep, wq->hash_tail[0] is a dangling pointer. The\nio_wq is per-task (tctx->io_wq) and survives ring open/close, so the\ndangling pointer persists for the lifetime of the task; the next hashed\nbucket-0 enqueue dereferences it in io_wq_insert_work() and\nwq_list_add_after() writes through freed memory.\n\nAdd the missing io_wq_is_hashed() check so a non-hashed predecessor\nnever inherits a hash_tail[] slot.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nio-wq: check that the predecessor is hashed in io_wq_remove_pending()\n\nio_wq_remove_pending() needs to fix up wq->hash_tail[] if the cancelled\nwork was the tail of its hash bucket. When doing this, it checks whether\nthe preceding entry in acct->work_list has the same hash value, but\nnever checks that the predecessor is hashed at all. io_get_work_hash()\nis simply atomic_read(&work->flags) >> IO_WQ_HASH_SHIFT, and the hash\nbits are never set for non-hashed work, so it returns 0. Thus, when a\nhashed bucket-0 work is cancelled while a non-hashed work is its list\npredecessor, the check spuriously passes and a pointer to the non-hashed\nio_kiocb is stored in wq->hash_tail[0].\n\nBecause non-hashed work is dequeued via the fast path in\nio_get_next_work(), which never touches hash_tail[], the stale pointer\nis never cleared. Therefore, after the non-hashed io_kiocb completes and\nis freed back to req_cachep, wq->hash_tail[0] is a dangling pointer. The\nio_wq is per-task (tctx->io_wq) and survives ring open/close, so the\ndangling pointer persists for the lifetime of the task; the next hashed\nbucket-0 enqueue dereferences it in io_wq_insert_work() and\nwq_list_add_after() writes through freed memory.\n\nAdd the missing io_wq_is_hashed() check so a non-hashed predecessor\nnever inherits a hash_tail[] slot.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nio-wq: verificar que el predecesor esté hasheado en io_wq_remove_pending()\n\nio_wq_remove_pending() necesita corregir wq->hash_tail[] si el trabajo cancelado era la cola de su cubo hash. Al hacer esto, verifica si la entrada precedente en acct->work_list tiene el mismo valor hash, pero nunca verifica que el predecesor esté hasheado en absoluto. io_get_work_hash() es simplemente atomic_read(&work->flags) >> IO_WQ_HASH_SHIFT, y los bits hash nunca se establecen para trabajos no hasheados, por lo que devuelve 0. Así, cuando un trabajo hasheado del cubo 0 es cancelado mientras que un trabajo no hasheado es su predecesor en la lista, la verificación pasa de forma espuria y un puntero al io_kiocb no hasheado se almacena en wq->hash_tail[0].\n\nDebido a que el trabajo no hasheado se desencola a través de la ruta rápida en io_get_next_work(), que nunca toca hash_tail[], el puntero obsoleto nunca se borra. Por lo tanto, después de que el io_kiocb no hasheado se completa y se libera de nuevo a req_cachep, wq->hash_tail[0] es un puntero colgante. El io_wq es por tarea (tctx->io_wq) y sobrevive a la apertura/cierre del anillo, por lo que el puntero colgante persiste durante la vida útil de la tarea; la siguiente encolación hasheada del cubo 0 lo desreferencia en io_wq_insert_work() y wq_list_add_after() escribe a través de memoria liberada.\n\nAñadir la verificación io_wq_is_hashed() faltante para que un predecesor no hasheado nunca herede una ranura hash_tail[].","source":"nvd"}],"published":"2026-06-08T14:30:53.323Z","modified":"2026-08-05T12:30:57.842Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"204361a77f4018627addd4a06877448f088ddfc0","fixed":"d6bda9df0c0a3080804181464d5c0f4d78a4e769","status":"affected"},{"type":"git","introduced":"204361a77f4018627addd4a06877448f088ddfc0","fixed":"5a20ebf0c81b61f5ea3b1b529c100cad69b9f603","status":"affected"},{"type":"git","introduced":"204361a77f4018627addd4a06877448f088ddfc0","fixed":"252c5051dba9c709b6a72f2866f93e5e618b3f06","status":"affected"},{"type":"git","introduced":"204361a77f4018627addd4a06877448f088ddfc0","fixed":"d376c131af7c7739a87ff037ed2fdb67c2542c8a","status":"affected"},{"type":"git","introduced":"204361a77f4018627addd4a06877448f088ddfc0","fixed":"d6a2d7b04b5a093021a7a0e2e69e9d5237dfa8cc","status":"affected"},{"type":"git","version":"13f35a2c0fd5c6a4fcd8903542b053bcc914fcf5","status":"affected"},{"type":"semver","introduced":"5.8.6","fixed":"5.9","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.9","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.9","status":"unaffected"},{"type":"semver","introduced":"6.6.141","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.91","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.33","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.0.10","lastAffected":"7.0.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.8.6","fixed":"5.9"},{"status":"affected","introduced":"5.9.1","fixed":"6.6.141"},{"status":"affected","introduced":"6.7","fixed":"6.12.91"},{"status":"affected","introduced":"6.13","fixed":"6.18.33"},{"status":"affected","introduced":"6.19","fixed":"7.0.10"},{"status":"affected","version":"5.9"},{"status":"affected","version":"5.9"},{"status":"affected","version":"5.9"},{"status":"affected","version":"5.9"},{"status":"affected","version":"5.9"},{"status":"affected","version":"5.9"},{"status":"affected","version":"5.9"},{"status":"affected","version":"7.1"},{"status":"affected","version":"7.1"},{"status":"affected","version":"7.1"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/d6bda9df0c0a3080804181464d5c0f4d78a4e769","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5a20ebf0c81b61f5ea3b1b529c100cad69b9f603","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/252c5051dba9c709b6a72f2866f93e5e618b3f06","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d376c131af7c7739a87ff037ed2fdb67c2542c8a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d6a2d7b04b5a093021a7a0e2e69e9d5237dfa8cc","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-46274","url":"https://www.cve.org/CVERecord?id=CVE-2026-46274","licence":"CVE Terms of Use","modified":"2026-08-05T12:30:57.842Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-46274","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46274","licence":"Public domain","modified":"2026-07-23T07:10:00.113Z"}],"updatedAt":"2026-11-25T22:59:23.981Z","epss":{"score":0.00175,"percentile":0.04102,"date":"2026-11-30T12:00:22.000Z"}}