CVE-2026-93781: scsi: core: Do not block on tag allocation in scsi_eh_lock_door()
In the Linux kernel, the following vulnerability has been resolved:
scsi: core: Do not block on tag allocation in scsiehlockdoor()
scsiehlockdoor() is called from scsirestartoperations() while the host is still in the SHOSTRECOVERY state, i.e. before the host is switched back to SHOSTRUNNING and scsirunhostqueues() restarts the queues. It allocates a request via scsiallocrequest() with no flags, so blkmqgettag() may block waiting for a free sched tag when all tags are already in use.
Those tags can be held by commands that were just requeued by scsiehflushdoneq() during error handling. Such commands cannot be dispatched until the host leaves SHOSTRECOVERY and scsirunhostqueues() is called - which only happens after scsiehlockdoor() returns.
This forms a circular dependency:
- scsiehlockdoor(), running in the SCSI error handler thread, waits for a sched tag held by a requeued command;
- the requeued command cannot complete and release its sched tag until the error handler thread leaves scsirestartoperations() and restart the queues.
For devices with a single driver tag (e.g. USB storage) it is a guaranteed deadlock and I/O that can never be submitted. This problem has also been reproduced in our environment.
Locking the door is a best-effort operation, and scsiehlockdoor() already returns silently when the request allocation fails. Pass BLKMQREQNOWAIT to scsiallocrequest() so the allocation fails instead of blocking when no tag is available. This breaks the circular dependency and allows the error handler to finish restarting the queues, after which the pending commands are dispatched normally.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Pass BLK_MQ_REQ_NOWAIT to scsi_alloc_request() so request allocation fails immediately when no tag is available instead of blocking.
Linux kernel SCSI error handler scsi_alloc_request() allocation flags in scsi_eh_lock_door() = BLK_MQ_REQ_NOWAIT
Event History
Frequently Asked Questions
Which systems are most exposed to the deadlock?
Systems using the Linux SCSI stack that enter SCSI error recovery while scheduler tags are exhausted are exposed. Devices with a single driver tag, such as USB storage devices, are specifically identified as having a guaranteed deadlock under these conditions.
What runtime conditions trigger the I/O hang?
During error handling, commands can be requeued while the host remains in SHOST_RECOVERY and its queues are not yet running. If scsi_eh_lock_door() then waits for a scheduler tag held by one of those requeued commands, neither the error handler nor the command can progress.