ublk: mark the batch fetch command cancelable before linking it

State
Published
Severity
Not Scored
Published
Nov 30, 2026
Updated
Nov 30, 2026
Reserved
Sep 25, 2026

Read the record on cve.org

Description

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

ublk: mark the batch fetch command cancelable before linking it

UBLK_U_IO_FETCH_IO_CMDS has the same order problem as the per-io commands: ublk_batch_attach() links the fetch command into fcmd_head and marks it cancelable only after dropping evts_lock. A cancel from the control path (ublk_batch_cancel_queue()) can take it in between and complete it, and the later mark puts a completed request on io_uring's cancelable list.

Mark it before linking it. evts_lock orders the mark before the link, which is where the cancel finds it.

Batch commands are not bounced to task work, so they can run from io-wq without uring_lock, and io_uring's cancel walk can now find a fetch command before it is linked. Two things make that safe:

- initialize fcmd->node: it came from kzalloc(), so list_empty() saw a linked node and ublk_batch_cancel_cmd() would list_del_init() NULL pointers - on the -ENODEV path, complete the command with io_uring_cmd_done() before freeing fcmd: that removes it from the cancelable list under uring_lock, after which nothing can see fcmd

Also use data->cmd instead of fcmd->cmd after dropping evts_lock: once fcmd is linked and not the active one, a control-path cancel may complete and free it.

ProductVersions
Linux Linuxa4d88375539920b7401ead59d2f944ac23c668ea to before de0967c9aa6bb63d30e835c79fd935310f30402b Affecteda4d88375539920b7401ead59d2f944ac23c668ea to before b59e96011d22e322fbf4d5d1d1124de538c278ed Affected
Linux Linux7.0 Affectedbefore 7.0 Not Affected7.3.4 through 7.3.* Not Affected7.4-rc1 and later Not Affected

Weaknesses

The record names no weakness.

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.