io_uring: wake ring pollers for local task_work
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel 2c88d978f1dfd03edf67924ea8fd25cc45499eef, Kernel 92bfadcbe0a9a001beb5e58a2abaf040b873deb6, Kernel 9bb28e7740ce78beecafc5db074b45f4cbeb8a47 and 2 more.
In the Linux kernel, the following vulnerability has been resolved: io_uring: wake ring pollers for local task_work With IORING_SETUP_DEFER_TASKRUN completions are queued as local work, and only become CQEs when the submitter enters the kernel to wait for events. For an application that finds out via poll() or epoll on the ring fd when it is time to do that, io_uring_poll() reports EPOLLIN if local work is pending. That only helps if the work is there at the time of the call. When DEFER_TASKRUN was added, io_req_local_work_add() did io_cqring_wake(), which took care of tasks sleeping in poll() as well. Then polling got a wait queue of its own, ->poll_wq, and the wake up in io_req_local_work_add() was replaced by waking the submitter directly. Since then ->poll_wq is only woken when CQEs are committed, which for such a ring is done by the very task that is waiting to be told to: submitter completion poll(ring_fd) io_uring_poll() // nothing yet schedule() io_req_local_work_add() // ->cq_wait_nr: nobody waits // sleeps on Wake ->poll_wq when the first entry is put on the work list. Like for the eventfd, that must not be done right away if the work is queued from a wake up handler, as the chain of wake ups could get back to the wait queue whose lock is held. Use an RCU callback in that case, with a reference to the ring.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Linux | Kernel | =6.3, >=130bd686d9be918e4cc8c03abf5794ba2d860502 <2c88d978f1dfd03edf67924ea8fd25cc45499eef, >=130bd686d9be918e4cc8c03abf5794ba2d860502 <92bfadcbe0a9a001beb5e58a2abaf040b873deb6, >=130bd686d9be918e4cc8c03abf5794ba2d860502 <9bb28e7740ce78beecafc5db074b45f4cbeb8a47, >=130bd686d9be918e4cc8c03abf5794ba2d860502 <b88902d8745a701d24275d012f0830e3628e2a22, >=130bd686d9be918e4cc8c03abf5794ba2d860502 <d8c618747a6aa90022e19ec614aa7157d0302108 | 2c88d978f1dfd03edf67924ea8fd25cc45499eef, 92bfadcbe0a9a001beb5e58a2abaf040b873deb6, 9bb28e7740ce78beecafc5db074b45f4cbeb8a47, b88902d8745a701d24275d012f0830e3628e2a22, d8c618747a6aa90022e19ec614aa7157d0302108 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Kernel, strongest first
Embed
A live severity badge for an advisory, README or ticket