CVE-2026-100053

ublk: let STOP_DEV cancel the server's commands before its release

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: let STOP_DEV cancel the server's commands before its release

STOP_DEV cancels the fetched commands after dropping ub->mutex, so
START_DEV and FETCH can run in between:

STOP_DEV START_DEV / FETCH
lock ub->mutex
ublk_stop_dev_unlocked() (not started: does nothing)
unlock ub->mutex
START_DEV goes live, schedules scan
FETCH publishes a new command
cancel_work_sync(scan) cancels the new disk's scan
ublk_cancel_dev() takes the new command: NULL io->cmd
on a queue which isn't canceling

A START_DEV after STOP_DEV also goes live over the canceled commands.

Hold a reference on the server's /dev/ublkcN while canceling:

STOP_DEV
lock ub->mutex
ublk_stop_dev_unlocked()
cancel_work_sync(scan)
server attached: take a reference on its file, set STOPPING
unlock ub->mutex
ublk_cancel_dev()
drop the reference

- STOPPING makes FETCH and PREP get UBLK_IO_RES_ABORT and START_DEV
-EBUSY; a START_DEV or END_USER_RECOVERY waiting for the device
to get ready wakes up too; the reset in the server's release
clears it
- the release can't run before the reference is dropped, so no new
server can attach, and the cancel only meets this server's commands
- the cancel still runs after the unlock: io_uring_cmd_done() may take
uring_lock, under which FETCH takes ub->mutex

ublk_ch_open() saves the file in ->ch_file and ublk_ch_release() clears
it, under cancel_mutex. The release runs after the last reference is
gone, so take ours with file_ref_get(). Drop it with __fput_sync(): if
it is the last one, fput() would defer the release to this task, which
DEL_DEV then makes wait for the device to be freed.

A server which opened the device but hasn't fetched is stopped too.
Document what a server sees after STOP_DEV in ublk.rst.

Analysis

AI-generated

Technical impact

The ublk driver in the Linux kernel contains a race condition between the STOP_DEV and START_DEV/FETCH operations. STOP_DEV cancels commands after releasing a mutex, allowing START_DEV and FETCH to run concurrently. This timing flaw can cause a new command to be published while a cancellation is in progress, leading the kernel to process a NULL or otherwise invalid command. When the kernel later attempts to execute or clean up this command, it can trigger a crash or other unstable behavior, effectively denying service to the affected block device.

Affected Systems

The vulnerability is present in the Linux kernel’s ublk subsystem. No specific version range is listed in the available data, so all kernels including the ublk driver are considered potentially affected until a patch is applied.

Risk and Exploitability

No CVSS score is provided, and the EPSS score is unavailable; the vulnerability is not listed in CISA’s KEV catalog. The likely attack vector requires local control of the ublk server or the ability to issue conflicting START_DEV/STOP_DEV requests. An attacker who can orchestrate this timing attack could cause kernel panics or consistent denial of service to the block device, but there is no indication of remote code execution or privilege escalation in the current description.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest kernel update that addresses the ublk STOP_DEV race condition.
  • If an immediate patch is unavailable, disable or remove any ublk block devices to prevent the vulnerable code path from executing.
  • Monitor system logs and kernel panic reports for signs of crashes or anomalous behaviour related to ublk.

Generated by OpenCVE AI on November 30, 2026 at 16:22 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-362
CWE-476
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: ublk: let STOP_DEV cancel the server's commands before its release STOP_DEV cancels the fetched commands after dropping ub->mutex, so START_DEV and FETCH can run in between: STOP_DEV START_DEV / FETCH lock ub->mutex ublk_stop_dev_unlocked() (not started: does nothing) unlock ub->mutex START_DEV goes live, schedules scan FETCH publishes a new command cancel_work_sync(scan) cancels the new disk's scan ublk_cancel_dev() takes the new command: NULL io->cmd on a queue which isn't canceling A START_DEV after STOP_DEV also goes live over the canceled commands. Hold a reference on the server's /dev/ublkcN while canceling: STOP_DEV lock ub->mutex ublk_stop_dev_unlocked() cancel_work_sync(scan) server attached: take a reference on its file, set STOPPING unlock ub->mutex ublk_cancel_dev() drop the reference - STOPPING makes FETCH and PREP get UBLK_IO_RES_ABORT and START_DEV -EBUSY; a START_DEV or END_USER_RECOVERY waiting for the device to get ready wakes up too; the reset in the server's release clears it - the release can't run before the reference is dropped, so no new server can attach, and the cancel only meets this server's commands - the cancel still runs after the unlock: io_uring_cmd_done() may take uring_lock, under which FETCH takes ub->mutex ublk_ch_open() saves the file in ->ch_file and ublk_ch_release() clears it, under cancel_mutex. The release runs after the last reference is gone, so take ours with file_ref_get(). Drop it with __fput_sync(): if it is the last one, fput() would defer the release to this task, which DEL_DEV then makes wait for the device to be freed. A server which opened the device but hasn't fetched is stopped too. Document what a server sees after STOP_DEV in ublk.rst.
Title ublk: let STOP_DEV cancel the server's commands before its release
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-362

    Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

  • CWE-476

    NULL Pointer Dereference

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