CVE-2026-99797: io_uring/cancel: drop sqd->lock while SQPOLL waits

Published Nov 20, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

iouring/cancel: drop sqd->lock while SQPOLL waits

An exiting SQPOLL thread calls iouringcancelgeneric() with sqd->lock held, and keeps it across condresched() and the sleep until nothing is in flight anymore. A zero-copy send notification can't be canceled and stays pending as long as the peer doesn't read, so the lock is held for as long as a user cares to. ioringexitwork() needs it to park the thread, and so do IORINGREGISTERIOWQAFF and IOWQMAXWORKERS. With 64 such rings sharing the thread, every iouexit slot sleeps on the lock and no ring gets freed for anyone.

Drop the lock around condresched() and the sleep, like the main loop of the thread does. Each walk of ctxlist is still under one hold, and nothing is kept across the unlock. The thread drops its io-wq, frees its tctx and clears sqd->thread under one hold after the loop, so whoever holds the lock and finds sqd->thread set can still use them.

[axboe: adapted to the scheduletimeout() based loop]

Affected Software

7 affected componentsFixes available
linux/kernel>=6.0.0<6.12.118
6.12.118
linux/kernel>=6.13.0<6.18.64
6.18.64
linux/kernel>=6.19.0<7.3.5
7.3.5
debian/linux*
debian/linux*
debian/linux*
debian/linux<=6.1.176-1, <=6.1.192-2, <=6.12.107-1, <=6.12.117-1, <=7.3.4-1
7.3.5-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12.118
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.64
  3. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.5
  4. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 7.3.5-1
  5. Compensating control

    In io_uring cancellation, drop sqd->lock around cond_resched() and the sleep while SQPOLL waits; keep each ctx_list walk under one lock hold, and clear sqd->thread under one hold after the loop.

Frequently Asked Questions

1

Which systems are exposed to this issue?

Systems using Linux io_uring with SQPOLL threads are affected by the described lock contention condition. The impact is particularly relevant when many rings share an SQPOLL thread.

2

What conditions can trigger the lock being held for an extended time?

An SQPOLL thread must be exiting while a zero-copy send notification remains pending because its peer is not reading. Since that notification cannot be canceled, the exit path can wait while holding sqd->lock.

3

What operational impact can this cause?

Operations that need sqd->lock, including parking the thread during ring exit and the IORING_REGISTER_IOWQ_AFF and IOWQ_MAX_WORKERS registration paths, can block. With 64 rings sharing the thread, all available iou_exit slots can sleep on the lock and prevent rings from being freed.

4

What is the remediation described by the fix?

The fix releases sqd->lock around cond_resched() and the wait loop, while retaining the lock for each individual ctx_list walk. This prevents the lock from remaining held while waiting for in-flight work to finish.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203