CVE-2026-100053
published high CVSS 3.1 · 7.8ublk: let STOP_DEV cancel the server's commands before its release
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux85248d670b71d9edda9459ee14fdc85c8e9632c0 to < e5d84d6ebec814039f40a0366a7272fd330678d4 · 85248d670b71d9edda9459ee14fdc85c8e9632c0 to < 301e34ccf9a63705a197904ccc03e9eaaf442a37 · 85248d670b71d9edda9459ee14fdc85c8e9632c0 to < c8b349f9daf6d88ff21033028167d00e819dafb6 · a8555c86f508e0e246a2729fe0f40bdf9fc51da0 · 8cb8ef0c79e3686320e2854c2ab9c9ab4df7b8e8 · 6.1.70 to < 6.2 · 6.6.21 to < 6.7 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux6.7 (affected) · 0 to < 6.7 (unaffected · semver) · 6.18.66 through 6.18.* (unaffected · semver) · 7.3.4 through 7.3.* (unaffected · semver) · 7.4-rc1 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - Every step is a local io_uring passthrough command: UBLK_CMD_STOP_DEV/UBLK_CMD_START_DEV through ublk_ctrl_uring_cmd() on /dev/ublk-control and UBLK_IO_FETCH_REQ on /dev/ublkcN. ublk_stop_dev() runs ublk_cancel_dev() after dropping ub->mutex, and no remote peer supplies any data on this path. AC:L - The attacker performs every step, and no race is needed. After FETCHing every tag they send STOP_DEV. ublk_stop_dev_unlocked() does nothing on the never-started (DEAD) device, and ublk_cancel_dev() NULLs every io->cmd without setting ubq->canceling. Their START_DEV then goes live because nr_queue_ready is unchanged. The memory-corruption variant races STOP_DEV's cancel loop against I/O to their own disk, and they issue both sides. PR:L - ublk_ctrl_add_dev() lets a caller without CAP_SYS_ADMIN create a UBLK_F_UNPRIVILEGED_DEV device. ublk_ctrl_uring_cmd_permission() gates STOP_DEV/START_DEV only on MAY_READ|MAY_WRITE to the caller's own /dev/ublkcN, and ublk_ch_open() has no capability check. A local user with access to /dev/ublk-control, which the documented unprivileged mode grants, reaches the bug. UI:N - The attacker's own process acts as both the ublk server and the control client. The crash fires on the first I/O to the new /dev/ublkbN, whether from the attacker or from udev probing the disk it just added. No other user has to mount, open or approve anything. S:U - The NULL io->cmd dereference and the stale io_uring_cmd completion both stay inside the host kernel's ublk, blk-mq and io_uring code, the same authority that owns the ublk control and char device interfaces. No VM, IOMMU or sandbox boundary is crossed. C:H - ublk_cancel_dev() must run only after del_gendisk(), and ublk_cancel_cmd()'s blk_mq_request_started() check guards io_uring_cmd_done() against io_uring_cmd_complete_in_task() only when ubq->canceling fences ublk_queue_rq(). Here the disk is live and not canceling. The cancel can therefore load io->cmd after dispatch has completed it, or has overwritten the cmd/req union with a struct request, and treat freed or foreign memory as an io_kiocb. I:H - __io_uring_cmd_done() on that stale or type-confused pointer writes req flags and cqe.res, sets io_task_work.func and links the object into the io_uring task_work llist. That corrupts a freed io_kiocb or a live struct request and plants a callback that is later executed, which gives an exploitable write and control-flow primitive, not a bounded change. A:H - In the sequential STOP_DEV then START_DEV path, the first request through ublk_queue_rq() reaches ublk_queue_cmd() with a NULL io->cmd. ublk_get_uring_cmd_pdu(NULL)->req = rq then faults near NULL and oopses in blk-mq dispatch. The disk stays live with every command NULL, so each later I/O crashes too.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 85248d670b71d9edda9459ee14fdc85c8e9632c0 to < e5d84d6ebec814039f40a0366a7272fd330678d4 (affected · git)85248d670b71d9edda9459ee14fdc85c8e9632c0 to < 301e34ccf9a63705a197904ccc03e9eaaf442a37 (affected · git)85248d670b71d9edda9459ee14fdc85c8e9632c0 to < c8b349f9daf6d88ff21033028167d00e819dafb6 (affected · git)a8555c86f508e0e246a2729fe0f40bdf9fc51da0 (affected · git)8cb8ef0c79e3686320e2854c2ab9c9ab4df7b8e8 (affected · git)6.1.70 to < 6.2 (affected · semver)6.6.21 to < 6.7 (affected · semver)Default: unaffected | Linux · cna |
| Linux | Linux | 6.7 (affected)0 to < 6.7 (unaffected · semver)6.18.66 through 6.18.* (unaffected · semver)7.3.4 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
3Provider assertions
1Linux · cna
ublk: let STOP_DEV cancel the server's commands before its release
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- dbf59d8b451434756203ef2dc390b4556e8e99ae6d80e1367559dca3a323cb70
- Ingested
- 01 Dec 2026, 05:47:22 UTC
- Source record
- Official CVE record