mmc: vub300: defer reset until cmd_mutex is unlocked
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 88095e7b473a3d9ec3b9c60429576e9cbd327c89 · < bf9848a22a8e50d39d5e8d871581f0a8110f16b3| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
mmc: vub300: defer reset until cmd_mutex is unlocked
vub300_cmndwork_thread() holds cmd_mutex while it sends a command and waits for the command response. If the response wait times out, __vub300_command_response() kills the command URBs and then synchronously resets the USB device through usb_reset_device().
That reset path re-enters the driver through vub300_pre_reset(), which also takes cmd_mutex. 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:
vub300_cmndwork_thread() __vub300_command_response() usb_lock_device_for_reset() usb_reset_device() vub300_pre_reset()
Lockdep reported the same-task recursive acquisition on cmd_mutex:
From the CVE record · Linux
In the Linux kernel’s mmc vub300 driver, a command-response timeout can cause a USB reset to reacquire a mutex held by the same worker, resulting in a deadlock. The input does not establish whether an attacker can trigger the timeout or what access or user interaction would be required.
Engineers running Linux kernels with the mmc vub300 driver should check their kernel version; affected versions are not specified.