ublk: fix race between io_uring_cmd_complete_in_task and ublk_cancel_cmd
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.12.1146.14.66.15In the Linux kernel, the following vulnerability has been resolved:
ublk: fix race between io_uring_cmd_complete_in_task and ublk_cancel_cmd
ublk_cancel_cmd() calls io_uring_cmd_done() to complete uring_cmd, but we may have scheduled task work via io_uring_cmd_complete_in_task() for dispatching request, then kernel crash can be triggered.
Fix it by not trying to canceling the command if ublk block request is started.
From the CVE record · Linux
The Linux kernel's ublk code has a race between command completion task work and command cancellation. If cancellation occurs after a ublk block request has started, the race can trigger a kernel crash. The input does not specify the access or user-interaction requirements for triggering it.
Engineers running Linux kernels with ublk should check their systems; affected versions are not specified.