CVE-2021-46942
Last modified
CVE-2021-46942 is a medium-severity vulnerability rated 5.5/10 on the CVSS scale. In the Linux kernel, the following vulnerability has been resolved: io_uring: fix shared sqpoll cancellation hangs [ 736.982891] INFO: task iou-sqp-4294:4295 blocked for more than 122 seconds. [ 736.982897] Call Trace: [ 736.982901] schedule+0x68/0xe0 [ 736.982903] io_uring_cancel_sqpoll+0xdb/0x110 [ 736.982908] io_sqpoll_cancel_cb+0x24/0x30 [ 736.982911] io_run_task_work_head+0x28/0x50 [ 736.982913] io_sq_thread+0x4e3/0x720 We call io_uring_cancel_sqpoll() one by one for each ctx either in sq_thread() itself or via task works, and it's intended to cancel all requests of a specified context. However the function uses per-task counters to track the number of inflight requests, so it counts more requests than available via currect io_uring ctx and goes to sleep for them to appear (e.g. EPSS estimates a 0.19% chance of exploitation in the next 30 days.
Description
In the Linux kernel, the following vulnerability has been resolved: io_uring: fix shared sqpoll cancellation hangs [ 736.982891] INFO: task iou-sqp-4294:4295 blocked for more than 122 seconds. [ 736.982897] Call Trace: [ 736.982901] schedule+0x68/0xe0 [ 736.982903] io_uring_cancel_sqpoll+0xdb/0x110 [ 736.982908] io_sqpoll_cancel_cb+0x24/0x30 [ 736.982911] io_run_task_work_head+0x28/0x50 [ 736.982913] io_sq_thread+0x4e3/0x720 We call io_uring_cancel_sqpoll() one by one for each ctx either in sq_thread() itself or via task works, and it's intended to cancel all requests of a specified context. However the function uses per-task counters to track the number of inflight requests, so it counts more requests than available via currect io_uring ctx and goes to sleep for them to appear (e.g. from IRQ), that will never happen. Cancel a bit more than before, i.e. all ctxs that share sqpoll and continue to use shared counters. Don't forget that we should not remove ctx from the list before running that task_work sqpoll-cancel, otherwise the function wouldn't be able to find the context and will hang.
Metrics
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux Kernel | >= 5.12.0, < 5.12.3 |
References
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2021-46942?
How severe is CVE-2021-46942?
How do I fix CVE-2021-46942?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2021
- CVE-2021-46936In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2021-46937In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2021-46938In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2021-46939In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2021-46940In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2021-46941In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2021-46943In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2021-46944In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2021-46945In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2021-46946Rejected reason: This CVE ID has been rejected or withdrawn …
- CVE-2021-46947In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2021-46948In the Linux kernel, the following vulnerability has been re…5.5
Are you affected by CVE-2021-46942?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
