CVE-2026-100056

ublk: keep a canceled FETCH round canceling until the server is gone

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

ublk: keep a canceled FETCH round canceling until the server is gone

A cancel completes a fetched io command and sets io->cmd to NULL, but
the io still counts as ready. Only ubq->canceling stops ublk_queue_rq()
from using the NULL io->cmd. Two paths clear that flag too early:

partial FETCH round recovery, two queues
------------------- --------------------
task A: FETCH tags 0-2 q0 ready: q0->canceling = false
task A exits: q0 task exits:
start_cancel(): mark queues start_cancel(): ub->canceling
tags 0-2: io->cmd = NULL is still set -> q0 not marked
task B: FETCH tag 3 q0: io->cmd = NULL
queue ready: canceling = false q1 ready
START_DEV END_USER_RECOVERY
read -> ublk_queue_cmd(NULL) read on q0 -> ublk_queue_cmd(NULL)

A FETCH round runs from the open of /dev/ublkcN until
ublk_reset_ch_dev() resets the queues. A canceled command can't be
fetched again in the same round. So the ready check only needs one
fact: did this round see a cancel? ub->canceling already records it:
ublk_start_cancel() sets it under cancel_mutex before any command is
taken. It is only cleared too early, when all queues are ready.

Fix:

- clear ub->canceling only in ublk_reset_ch_dev()
- when a queue gets ready, clear ubq->canceling only if ub->canceling
is not set, and check it under cancel_mutex

The check and the marking are ordered by cancel_mutex:

check first: queue cleared -> start_cancel() marks it again
-> command taken
cancel first: check sees ub->canceling -> queue stays canceling

While ub->canceling is set, no queue clears its flag. So the "all
queues marked" shortcut in ublk_start_cancel() is correct again.

UBLK_F_BATCH_IO follows the same rule. It does not dispatch through
io->cmd, so it never hit the oops, but a round which lost a fetch
command is treated the same way: it has to start over.

Analysis

AI-generated

Technical impact

The bug in the Linux kernel’s ublk subsystem occurs when a FETCH round is canceled and the cancel flag is cleared too early. This allows the kernel to mistakenly treat a canceled request as still ready, ultimately dereferencing a NULL command pointer and causing a kernel oops. The flaw results in a loss of kernel stability and results in a denial of service, as the affected system may halt or require a reboot. The weakness can be viewed as a NULL pointer dereference and a race condition affecting concurrent cancel operations.

Affected Systems

The vulnerability affects all Linux kernel builds that include the ublk (USB block device) driver. No specific kernel versions are listed in the advisory, so the issue applies broadly to all affected Linux distributions that ship this module. Administrators should check whether their systems use the ublk subsystem and ensure that the kernel is up‑to‑date.

Risk and Exploitability

Active exploitation is not reported and the EPSS score is unavailable, but the contingency could be catastrophic in environments where kernel crashes are unacceptable. The advisory does not list this in the CISA KEV catalog, so it is not a known exploited vulnerability at present. Attackers who can load or interact with the ublk device (typically local users or processes with elevated privileges) could trigger the flaw by issuing a FETCH command that is subsequently canceled, leading to an oops. The risk rises with higher kernel privilege levels and the presence of unfiltered access to the /dev/ublkcN device interface.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Linux kernel to a release that includes the ublk fix as described in the source references
  • Rebuild any custom kernel modules that depend on the ublk subsystem to ensure the patch is applied
  • Restart or reboot the system to load the patched kernel and clear all in‑flight ublk requests

Generated by OpenCVE AI on November 30, 2026 at 16:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Linux linux
Vendors & Products Linux linux
Type Values Removed Values Added
Weaknesses CWE-476
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: ublk: keep a canceled FETCH round canceling until the server is gone A cancel completes a fetched io command and sets io->cmd to NULL, but the io still counts as ready. Only ubq->canceling stops ublk_queue_rq() from using the NULL io->cmd. Two paths clear that flag too early: partial FETCH round recovery, two queues ------------------- -------------------- task A: FETCH tags 0-2 q0 ready: q0->canceling = false task A exits: q0 task exits: start_cancel(): mark queues start_cancel(): ub->canceling tags 0-2: io->cmd = NULL is still set -> q0 not marked task B: FETCH tag 3 q0: io->cmd = NULL queue ready: canceling = false q1 ready START_DEV END_USER_RECOVERY read -> ublk_queue_cmd(NULL) read on q0 -> ublk_queue_cmd(NULL) A FETCH round runs from the open of /dev/ublkcN until ublk_reset_ch_dev() resets the queues. A canceled command can't be fetched again in the same round. So the ready check only needs one fact: did this round see a cancel? ub->canceling already records it: ublk_start_cancel() sets it under cancel_mutex before any command is taken. It is only cleared too early, when all queues are ready. Fix: - clear ub->canceling only in ublk_reset_ch_dev() - when a queue gets ready, clear ubq->canceling only if ub->canceling is not set, and check it under cancel_mutex The check and the marking are ordered by cancel_mutex: check first: queue cleared -> start_cancel() marks it again -> command taken cancel first: check sees ub->canceling -> queue stays canceling While ub->canceling is set, no queue clears its flag. So the "all queues marked" shortcut in ublk_start_cancel() is correct again. UBLK_F_BATCH_IO follows the same rule. It does not dispatch through io->cmd, so it never hit the oops, but a round which lost a fetch command is treated the same way: it has to start over.
Title ublk: keep a canceled FETCH round canceling until the server is gone
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:23 PM
Reserved
Sep 25, 2026, 10:25 AM
Status
Received
Published
Nov 30, 2026, 2:17 PM
Modified
Nov 30, 2026, 2:17 PM