CVE-2026-80659: mmc: vub300: defer reset until cmd_mutex is unlocked
In the Linux kernel, the following vulnerability has been resolved:
mmc: vub300: defer reset until cmdmutex is unlocked
vub300cmndworkthread() holds cmdmutex while it sends a command and waits for the command response. If the response wait times out, vub300commandresponse() kills the command URBs and then synchronously resets the USB device through usbresetdevice().
That reset path re-enters the driver through vub300prereset(), which also takes cmdmutex. The worker therefore tries to acquire the same mutex recursively while it is still holding it from the command path.
This issue was found by our static analysis tool and then manually reviewed against the current tree.
The grounded PoC kept the real worker and timeout/reset carrier:
vub300cmndworkthread() vub300commandresponse() usblockdeviceforreset() usbresetdevice() vub300prereset()
Lockdep reported the same-task recursive acquisition on cmdmutex:
WARNING: possible recursive locking detected ... (&testvub300.cmdmutex) ... at: usbresetdevice... [vulnmsv] ... (&testvub300.cmdmutex) ... at: vub300cmndworkthread+0x12/0x20 [vulnmsv] Workqueue: vub300cmdwq vub300cmndworkthread [vulnmsv] DEADLOCK
Return a flag from vub300commandresponse() when the timeout path needs a device reset, then perform the reset after vub300cmndworkthread() has cleared the in-flight command state and dropped cmdmutex. The reset is still attempted before mmcrequestdone(), preserving the existing request completion ordering while avoiding the recursive lock.
Event History
Frequently Asked Questions
What condition is required to trigger the locking issue?
A command response wait must time out while vub300_cmndwork_thread() is holding cmd_mutex. The timeout path kills the command URBs and synchronously resets the USB device.
Why does the USB reset cause a recursive lock acquisition?
usb_reset_device() re-enters the vub300 driver through vub300_pre_reset(), which also acquires cmd_mutex. The command worker still holds that mutex when it initiates the reset.