{"id":"CVE-2026-100056","aliases":["CVE-2026-100056"],"related":[],"kind":"vulnerability","state":"published","title":"ublk: keep a canceled FETCH round canceling until the server is gone","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nublk: keep a canceled FETCH round canceling until the server is gone\n\nA cancel completes a fetched io command and sets io->cmd to NULL, but\nthe io still counts as ready. Only ubq->canceling stops ublk_queue_rq()\nfrom using the NULL io->cmd. Two paths clear that flag too early:\n\n  partial FETCH round                 recovery, two queues\n  -------------------                 --------------------\n  task A: FETCH tags 0-2              q0 ready: q0->canceling = false\n  task A exits:                       q0 task exits:\n    start_cancel(): mark queues         start_cancel(): ub->canceling\n    tags 0-2: io->cmd = NULL              is still set -> q0 not marked\n  task B: FETCH tag 3                   q0: io->cmd = NULL\n    queue ready: canceling = false    q1 ready\n  START_DEV                           END_USER_RECOVERY\n  read -> ublk_queue_cmd(NULL)        read on q0 -> ublk_queue_cmd(NULL)\n\nA FETCH round runs from the open of /dev/ublkcN until\nublk_reset_ch_dev() resets the queues. A canceled command can't be\nfetched again in the same round. So the ready check only needs one\nfact: did this round see a cancel? ub->canceling already records it:\nublk_start_cancel() sets it under cancel_mutex before any command is\ntaken. It is only cleared too early, when all queues are ready.\n\nFix:\n\n - clear ub->canceling only in ublk_reset_ch_dev()\n - when a queue gets ready, clear ubq->canceling only if ub->canceling\n   is not set, and check it under cancel_mutex\n\nThe check and the marking are ordered by cancel_mutex:\n\n  check first:   queue cleared -> start_cancel() marks it again\n                 -> command taken\n  cancel first:  check sees ub->canceling -> queue stays canceling\n\nWhile ub->canceling is set, no queue clears its flag. So the \"all\nqueues marked\" shortcut in ublk_start_cancel() is correct again.\n\nUBLK_F_BATCH_IO follows the same rule. It does not dispatch through\nio->cmd, so it never hit the oops, but a round which lost a fetch\ncommand is treated the same way: it has to start over.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nublk: keep a canceled FETCH round canceling until the server is gone\n\nA cancel completes a fetched io command and sets io->cmd to NULL, but\nthe io still counts as ready. Only ubq->canceling stops ublk_queue_rq()\nfrom using the NULL io->cmd. Two paths clear that flag too early:\n\n  partial FETCH round                 recovery, two queues\n  -------------------                 --------------------\n  task A: FETCH tags 0-2              q0 ready: q0->canceling = false\n  task A exits:                       q0 task exits:\n    start_cancel(): mark queues         start_cancel(): ub->canceling\n    tags 0-2: io->cmd = NULL              is still set -> q0 not marked\n  task B: FETCH tag 3                   q0: io->cmd = NULL\n    queue ready: canceling = false    q1 ready\n  START_DEV                           END_USER_RECOVERY\n  read -> ublk_queue_cmd(NULL)        read on q0 -> ublk_queue_cmd(NULL)\n\nA FETCH round runs from the open of /dev/ublkcN until\nublk_reset_ch_dev() resets the queues. A canceled command can't be\nfetched again in the same round. So the ready check only needs one\nfact: did this round see a cancel? ub->canceling already records it:\nublk_start_cancel() sets it under cancel_mutex before any command is\ntaken. It is only cleared too early, when all queues are ready.\n\nFix:\n\n - clear ub->canceling only in ublk_reset_ch_dev()\n - when a queue gets ready, clear ubq->canceling only if ub->canceling\n   is not set, and check it under cancel_mutex\n\nThe check and the marking are ordered by cancel_mutex:\n\n  check first:   queue cleared -> start_cancel() marks it again\n                 -> command taken\n  cancel first:  check sees ub->canceling -> queue stays canceling\n\nWhile ub->canceling is set, no queue clears its flag. So the \"all\nqueues marked\" shortcut in ublk_start_cancel() is correct again.\n\nUBLK_F_BATCH_IO follows the same rule. It does not dispatch through\nio->cmd, so it never hit the oops, but a round which lost a fetch\ncommand is treated the same way: it has to start over.","source":"cvelist"}],"published":"2026-11-30T13:23:28.707Z","modified":"2026-11-30T14:17:23.800Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"728cbac5fe219d3b8a21a0688a08f2b7f8aeda2b","fixed":"f715e4324b821f051dbd2832c6bd974642b803f2","status":"affected"},{"type":"git","introduced":"728cbac5fe219d3b8a21a0688a08f2b7f8aeda2b","fixed":"1f866a06b65ec13d37767843d2e991df2dcd1a00","status":"affected"},{"type":"git","introduced":"728cbac5fe219d3b8a21a0688a08f2b7f8aeda2b","fixed":"4c454b5b2634d982caf797fbe477770c3edfc983","status":"affected"},{"type":"git","version":"42ea64e01c96e594fb4f80c54dfe4f934d008a6e","status":"affected"},{"type":"semver","introduced":"6.14.6","fixed":"6.15","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.15","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.15","status":"unaffected"},{"type":"semver","introduced":"6.18.64","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.4","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/f715e4324b821f051dbd2832c6bd974642b803f2","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1f866a06b65ec13d37767843d2e991df2dcd1a00","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4c454b5b2634d982caf797fbe477770c3edfc983","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-100056","url":"https://www.cve.org/CVERecord?id=CVE-2026-100056","licence":"CVE Terms of Use","modified":"2026-11-30T13:23:28.707Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-100056","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-100056","licence":"Public domain","modified":"2026-11-30T14:17:23.800Z"}],"updatedAt":"2026-11-30T14:32:43.507Z","epss":{"score":0.00174,"percentile":0.07147,"date":"2026-12-01T12:00:22.000Z"}}