{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-100054","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-09-25T10:25:14.455Z","datePublished":"2026-11-30T13:23:27.640Z","dateUpdated":"2026-12-01T05:40:00.085Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-12-01T05:40:00.085Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nublk: mark the batch fetch command cancelable before linking it\n\nUBLK_U_IO_FETCH_IO_CMDS has the same order problem as the per-io\ncommands: ublk_batch_attach() links the fetch command into fcmd_head\nand marks it cancelable only after dropping evts_lock. A cancel from\nthe control path (ublk_batch_cancel_queue()) can take it in between and\ncomplete it, and the later mark puts a completed request on io_uring's\ncancelable list.\n\nMark it before linking it. evts_lock orders the mark before the link,\nwhich is where the cancel finds it.\n\nBatch commands are not bounced to task work, so they can run from io-wq\nwithout uring_lock, and io_uring's cancel walk can now find a fetch\ncommand before it is linked. Two things make that safe:\n\n - initialize fcmd->node: it came from kzalloc(), so list_empty() saw a\n   linked node and ublk_batch_cancel_cmd() would list_del_init() NULL\n   pointers\n - on the -ENODEV path, complete the command with io_uring_cmd_done()\n   before freeing fcmd: that removes it from the cancelable list under\n   uring_lock, after which nothing can see fcmd\n\nAlso use data->cmd instead of fcmd->cmd after dropping evts_lock: once\nfcmd is linked and not the active one, a control-path cancel may\ncomplete and free it."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The race is reached only through local io_uring passthrough on /dev/ublkcN and /dev/ublk-control: UBLK_U_IO_FETCH_IO_CMDS into ublk_ch_batch_io_uring_cmd() -> ublk_batch_attach(), racing UBLK_CMD_STOP_DEV -> ublk_stop_dev() -> ublk_cancel_dev() -> ublk_batch_cancel_queue(). No remote peer supplies data on either path.\nAC:L - The attacker owns both sides: one thread queues a second FETCH_IO_CMDS on a queue whose first fetch command still sits on fcmd_head, another sends STOP_DEV for the same device (it reaches ublk_cancel_dev() even before START_DEV). The window between spin_unlock(evts_lock) and io_uring_cmd_mark_cancelable() is short, but the attacker retries with DEL_DEV/ADD_DEV loops; nothing outside their control is needed.\nPR:L - ublk_ctrl_add_dev() accepts UBLK_F_UNPRIVILEGED_DEV from callers without CAP_SYS_ADMIN and does not strip UBLK_F_BATCH_IO for such devices; ublk_ctrl_uring_cmd_permission() then allows STOP_DEV on MAY_READ|MAY_WRITE access to the owner's /dev/ublkcN. An ordinary local user with unprivileged ublk access drives both sides; no init-namespace capability is checked.\nUI:N - The attacking process creates the device, opens /dev/ublkcN, submits the fetch commands and issues STOP_DEV itself; no other user or administrator has to act.\nS:U - The freed ublk_batch_fetch_cmd and the stale io_kiocb left on ctx->cancelable_uring_cmd are host kernel heap objects; the corruption stays inside the kernel's own authority and crosses no VM, IOMMU or sandbox boundary.\nC:H - ublk_batch_cancel_cmd() kfree()s fcmd, then ublk_batch_attach() reads fcmd->cmd from the freed 32-byte object and hands it to io_uring_cmd_mark_cancelable(); a reclaimed object supplies an attacker-chosen io_uring_cmd pointer, and the completed io_kiocb left on the cancelable list is a reusable-request UAF that can disclose kernel memory.\nI:H - io_uring_cmd_mark_cancelable() does hlist_add_head() through the possibly attacker-controlled cmd pointer and links an already completed request into ctx->cancelable_uring_cmd; on ring exit ublk_batch_cancel_fn() runs list_del_init(), a second io_uring_cmd_done() and a second kfree() on the freed fcmd: write-after-free plus double free.\nA:H - io_uring_try_cancel_uring_cmd() on ring exit walks the freed request and calls ->uring_cmd on it; sibling fix a261f0cacacc reports the same pattern ending in a GPF, so an unprivileged ublk owner can crash the kernel."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/block/ublk_drv.c"],"versions":[{"version":"a4d88375539920b7401ead59d2f944ac23c668ea","lessThan":"de0967c9aa6bb63d30e835c79fd935310f30402b","status":"affected","versionType":"git"},{"version":"a4d88375539920b7401ead59d2f944ac23c668ea","lessThan":"b59e96011d22e322fbf4d5d1d1124de538c278ed","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/block/ublk_drv.c"],"versions":[{"version":"7.0","status":"affected"},{"version":"0","lessThan":"7.0","status":"unaffected","versionType":"semver"},{"version":"7.3.4","lessThanOrEqual":"7.3.*","status":"unaffected","versionType":"semver"},{"version":"7.4-rc1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.0","versionEndExcluding":"7.3.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.0","versionEndExcluding":"7.4-rc1"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/de0967c9aa6bb63d30e835c79fd935310f30402b"},{"url":"https://git.kernel.org/stable/c/b59e96011d22e322fbf4d5d1d1124de538c278ed"}],"title":"ublk: mark the batch fetch command cancelable before linking it","x_generator":{"engine":"bippy-1.2.0"}}}}