| 0/0 |
2026/08/21 02:12 |
flow |
assessment-security |
34m
Results: map[DenialOfService:true Explanation:Based on the analysis of the provided kernel bug report and source code, here is
the assessment of the bug:
**Bug Mechanism:**
The bug is a deadlock (hung task) in the `vub300` USB SDIO host controller
driver.
When a USB device is disconnected, the USB subsystem calls
`vub300_disconnect()`. This function sets `vub300->interface = NULL` and then
calls `mmc_remove_host()`. The `mmc_remove_host()` function attempts to cancel
the delayed `detect` work (which runs `mmc_rescan()`) and waits for it to finish
if it is currently running.
If `mmc_rescan()` is running concurrently, it may have issued an MMC request
(e.g., `mmc_send_io_op_cond()`) which gets queued to the driver's worker thread
`vub300_cmndwork_thread()`.
However, `vub300_cmndwork_thread()` starts with the following check:
```c
if (!vub300->interface) {
kref_put(&vub300->kref, vub300_delete);
return;
}
```
If `vub300_disconnect()` has already set `vub300->interface` to `NULL`, the
worker thread simply returns and drops the request without ever calling
`mmc_request_done()`. As a result, `mmc_rescan()` waits indefinitely in
`mmc_wait_for_req_done()` for the completion of the dropped request.
Consequently, `vub300_disconnect()` also waits indefinitely in
`mmc_remove_host()`.
**Security Impact:**
* **Exploitable:** No. This is a pure deadlock. The waiting thread
(`mmc_rescan`) uses an uninterruptible wait (`wait_for_completion`), meaning it
cannot be killed by signals. Therefore, the stack frame where the MMC request is
allocated is never freed or reused, preventing any use-after-free or memory
corruption scenarios.
* **Denial Of Service:** Yes. The deadlock causes `vub300_disconnect()` to hang
indefinitely, which blocks the `usb_hub_wq` workqueue. This prevents the system
from processing any further USB hub events, meaning no other USB devices can be
enumerated or disconnected, effectively causing a DoS for the USB subsystem.
* **Peripheral Trigger:** Yes. The bug can be triggered by physically plugging
in a USB device that binds to the `vub300` driver and then unplugging it at the
right time (or by a malicious USB device simulating a disconnect).
* **Accessible From Unprivileged Processes / User Namespaces:** No. Unprivileged
users cannot trigger USB device disconnects via software (e.g., unbinding the
driver via sysfs requires root privileges). Triggering it requires physical
access to plug/unplug the device (covered by Peripheral Trigger) or root access
to emulate it (e.g., via `/dev/vhci` which Syzkaller uses, but is restricted in
production). Exploitable:false FilesystemTrigger:false NetworkTrigger:false PeripheralTrigger:true RemoteTrigger:false Unprivileged:false UserNamespace:false VMGuestTrigger:false VMHostTrigger:false]
|
| 1/1 |
2026/08/21 02:12 |
action |
syz-repro-to-c-repro |
0m
Results:
|
| 2/1 |
2026/08/21 02:12 |
action |
kernel-checkouter |
1m
Results: map[KernelSrc:/app/workdir/cache/src/11e2229c360f1d8ce24ad8b419215b33a234887e]
|
| 3/1 |
2026/08/21 02:13 |
action |
kernel-builder |
18m
Results: map[KernelObj:/app/workdir/cache/build/b2749936d2aa704a559583144924c95a3d2c02c3]
|
| 4/1 |
2026/08/21 02:32 |
action |
codesearch-prepare |
12m
Results: map[Index:codesearch-index]
|
| 5/1 |
2026/08/21 02:45 |
agent |
expert |
1m
Model:
Results: map[DenialOfService:true Exploitable:false FilesystemTrigger:false NetworkTrigger:false PeripheralTrigger:true RemoteTrigger:false Unprivileged:false UserNamespace:false VMGuestTrigger:false VMHostTrigger:false]
Instruction: You are an experienced Linux kernel security engineer. Your task is to analyze given kernel bug report
and determine its security impact based on the following dimensions.
Use the provided tools to examine the source code, check for capability checks (e.g., capable(), ns_capable()),
and understand the nature of the bug. Analyze the given kernel build and configuration.
You can check the kernel config by grepping ".config" file; you can check kernel cmdline by grepping
".config" file for "CONFIG_CMDLINE=". Assume sysctl parameters have default values.
But analyze for the corresponding production build w/o debugging tools enabled (like KASAN, KMSAN, UBSAN).
Try different strategies when analyzing the bug:
- think of ways in which the vulnerable code is unreachable
- or the other way around: try to come up with different ideas of how an unprivileged user can reach the bug
If still unsure err on the side of the bug being non-exploitable/not-accessible.
In the final reply, provide a reasoning for your assessment.
Analysis dimensions:
* Exploitable:
Determine if the bug can result in memory corruption, elevated privileges, or an information leak.
Memory safety issues are almost always exploitable (KASAN or UBSAN reports for use-after-free, out-of-bounds;
refcounting issues, corrupted lists, etc). When kernel is crashing on a completely wild pointer access
(e.g. user-space address, or non-canonical address, but not on NULL or address corresponding to KASAN shadow
for NULL address), including both data accesses and control transfers, that also usually implies possibility
of exploitation. Such reports usually say "unable to handle kernel paging request".
Uses of uninitialized values detected by KMSAN may be exploitable b/c attacker frequently can affect uninit
values with spraying techniques. However, for these exploitability depends on how exactly the uninit value
is used in the code, and what it affects.
Information leaks are exploitable on their own and should be classified as such. A bug that copies kernel
memory contents to userspace (e.g. an out-of-bounds read whose result is returned to the caller, or
uninitialized stack/heap bytes written to a user buffer) is exploitable: it can reveal kernel pointer
values and defeat KASLR, expose sensitive data such as cryptographic keys or other processes' memory, and
serves as a necessary building block in most modern kernel privilege-escalation exploit chains. Do not classify
an information leak as non-exploitable solely because it does not directly cause a memory write or control-flow
hijack; the leak itself is the exploit primitive.
Think of what happens after the bug is triggered. Some bugs cause kernel panic and halt execution,
they are harder to exploit. For example, BUG reports halts the kernel. However, WARNING reports don't halt
execution in production builds. Debug bug detection tools (like KASAN, KMSAN, KCSAN, UBSAN) are also not enabled
in production builds, so attacker can freely exploit these bugs w/o being detected by these tools.
If you see an integer overflow, think how the overflowed value used later (if it's used as allocation size,
or an array index). If you see an out-of-bounds read, think if it's followed by an out-of-bounds write as well.
Some KCSAN data-races may be exploitable by skilled attackers as well. Think what data structures got corrupted
as the result of data races and how. However, note that kernel has lots of "benign" data races that don't lead
to any runtime misbehavior at all.
* Denial Of Service:
Determine if the bug can result in denial-of-service. Most bugs can, since they cause system crash,
hangs, deadlocks, or resource leaks. This is mostly applicable to WARNING bugs that won't cause system crash
in production. For these think what will be consequences of the violation of the kernel assumptions flagged
by the WARNING. In some cases the unexpected condition is also properly handled by the normal control flow
(e.g. with "if (WARN_ON(...))"), these won't cause denial-of-service. If the condition is not handled,
then it may or may not cause denial-of-service.
* Accessible From Unprivileged Processes:
Determine if the bug can be reached from a typical (non-root) user process that does NOT have any special capabilities
(like CAP_SYS_ADMIN, CAP_NET_ADMIN, CAP_NET_RAW, CAP_PERFMON) or access to device nodes restricted to root.
Assume that unprivileged_bpf_disabled=1, that is eBPF loading is not accessible. However, cBPF (classical BPF)
is still accessible to non-root processes.
Assume that user namespaces are not accessible, that is, the process cannot get the mentioned capabilities even
within a new user namespace (checked by ns_capable() function in the kernel sources).
* Accessible From User Namespaces:
Determine if the bug can be reached within a user-namespace where the process has all capabilities
(including CAP_SYS_ADMIN, CAP_NET_ADMIN, CAP_NET_RAW, CAP_PERFMON). Such capabilities are checked with ns_capable()
function in the kernel sources.
* VM Guest Trigger:
Determine if the bug can be triggered from the context of a typical KVM guest (e.g., set up by a QEMU VMM).
Consider accesses to standard Linux host paravirtualized features (virtio-blk, virtio-net, etc.),
and handling of VM exits in the KVM code.
* VM Host Trigger in The Confidential Computing Context:
Determine if the bug can be triggered in a confidential computing guest kernel from the context of a KVM host.
Consider access to standard Linux guest paravirtualized features (virtio-blk, virtio-net, etc.).
* Ethernet Network Trigger:
Determine if the bug can be triggered by processing ingress network Ethernet traffic, either directly (network stack)
or via drivers exposed to network data.
* Other Remote Trigger:
Determine if the bug can be triggered by processing remote traffic other than Ethernet (Wifi, Bluetooth, NFC, etc).
* Peripheral Trigger:
Determine if the bug can be triggered via an untrusted peripheral device that can be physically plugged
into a system, such as a USB device or a niche hardware driver handling external hardware inputs.
This is particularly important for mobile and desktop environments where users can plug in unknown devices.
* Malicious Filesystem Trigger:
Determine if the bug can be triggered by the kernel mounting and parsing a malicious filesystem image.
This is highly critical for Desktop and Mobile environments where external media or downloaded images
might be auto-mounted.
Don't make assumptions about the kernel source code (it may be different from what you assume it is).
Extensively use the provided code access tools (codesearch-*, git-*, grepper, etc)
to examine the actual source code, and confirm any assumptions.
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt:
The kernel bug report is:
INFO: task kworker/0:2:980 blocked for more than 143 seconds.
Not tainted syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/0:2 state:D
stack:21624 pid:980 tgid:980 ppid:2 task_flags:0x4208060 flags:0x00080000
Workqueue: events_freezable mmc_rescan
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5510 [inline]
__schedule+0x125c/0x6740 kernel/sched/core.c:7239
__schedule_loop kernel/sched/core.c:7316 [inline]
schedule+0xdd/0x2c0 kernel/sched/core.c:7331
schedule_timeout+0x1b2/0x280 kernel/time/sleep_timeout.c:75
do_wait_for_common kernel/sched/completion.c:100 [inline]
__wait_for_common+0x2e7/0x4c0 kernel/sched/completion.c:121
mmc_wait_for_req_done+0xcd/0x3d0 drivers/mmc/core/core.c:408
mmc_wait_for_req+0x207/0x2c0 drivers/mmc/core/core.c:619
mmc_wait_for_cmd+0x154/0x200 drivers/mmc/core/core.c:645
mmc_send_io_op_cond+0x128/0x2f0 drivers/mmc/core/sdio_ops.c:28
mmc_attach_sdio+0xd0/0xec0 drivers/mmc/core/sdio.c:1220
mmc_rescan_try_freq drivers/mmc/core/core.c:2134 [inline]
mmc_rescan+0xd2b/0x11c0 drivers/mmc/core/core.c:2316
process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
process_scheduled_works kernel/workqueue.c:3405 [inline]
worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
kthread+0x373/0x450 kernel/kthread.c:436
ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
INFO: task kworker/1:2:1210 blocked for more than 143 seconds.
Not tainted syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/1:2 state:D stack:21384 pid:1210 tgid:1210 ppid:2 task_flags:0x4288060 flags:0x00080000
Workqueue: usb_hub_wq hub_event
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5510 [inline]
__schedule+0x125c/0x6740 kernel/sched/core.c:7239
__schedule_loop kernel/sched/core.c:7316 [inline]
schedule+0xdd/0x2c0 kernel/sched/core.c:7331
schedule_timeout+0x1b2/0x280 kernel/time/sleep_timeout.c:75
do_wait_for_common kernel/sched/completion.c:100 [inline]
__wait_for_common+0x2e7/0x4c0 kernel/sched/completion.c:121
__flush_work+0x7c7/0xcb0 kernel/workqueue.c:4374
__cancel_work_sync kernel/workqueue.c:4494 [inline]
cancel_delayed_work_sync+0xd1/0xf0 kernel/workqueue.c:4568
__mmc_stop_host drivers/mmc/core/core.c:2368 [inline]
__mmc_stop_host drivers/mmc/core/core.c:2357 [inline]
mmc_stop_host+0xe9/0x400 drivers/mmc/core/core.c:2373
mmc_remove_host+0x15/0x60 drivers/mmc/core/host.c:681
vub300_disconnect+0x12d/0x170 drivers/mmc/host/vub300.c:2387
usb_unbind_interface+0x1dd/0x9e0 drivers/usb/core/driver.c:458
device_remove drivers/base/dd.c:618 [inline]
device_remove+0x12a/0x180 drivers/base/dd.c:610
__device_release_driver drivers/base/dd.c:1349 [inline]
device_release_driver_internal+0x44e/0x620 drivers/base/dd.c:1372
bus_remove_device+0x2bc/0x560 drivers/base/bus.c:664
device_del+0x376/0x9b0 drivers/base/core.c:3965
usb_disable_device+0x367/0x810 drivers/usb/core/message.c:1478
usb_disconnect+0x2e2/0x9a0 drivers/usb/core/hub.c:2345
hub_port_connect drivers/usb/core/hub.c:5415 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5715 [inline]
port_event drivers/usb/core/hub.c:5879 [inline]
hub_event+0x1bb1/0x4420 drivers/usb/core/hub.c:5961
process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
process_scheduled_works kernel/workqueue.c:3405 [inline]
worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
kthread+0x373/0x450 kernel/kthread.c:436
ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
Showing all locks held in the system:
locks held by khungtaskd/30: 1, last CPU#0:
#0: ffffffff8ede9480 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline]
#0: ffffffff8ede9480 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:840 [inline]
#0: ffffffff8ede9480 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x3d/0x184 kernel/locking/lockdep.c:6793
locks held by kworker/1:1/46: 5, on CPU#1:
#0: ffff888023e88d40 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x12b1/0x1940 kernel/workqueue.c:3297
#1: ffffc90000b77d08 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x988/0x1940 kernel/workqueue.c:3298
#2: ffff88802b9791d8 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:1104 [inline]
#2: ffff88802b9791d8 (&dev->mutex){....}-{4:4}, at: hub_event+0x1bb/0x4420 drivers/usb/core/hub.c:5907
#3: ffff888023b091d8 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:1104 [inline]
#3: ffff888023b091d8 (&dev->mutex){....}-{4:4}, at: __device_attach+0x7e/0x4d0 drivers/base/dd.c:1073
#4: ffff88802b8a9e60 (hcd->bandwidth_mutex){+.+.}-{4:4}, at: usb_set_configuration+0x23d/0x1c60 drivers/usb/core/message.c:2135
locks held by kworker/0:2/980: 2, on CPU#0:
#0: ffff88801c04a140 ((wq_completion)events_freezable){+.+.}-{0:0}, at: process_one_work+0x12b1/0x1940 kernel/workqueue.c:3297
#1: ffffc90004df7d08 ((work_completion)(&(&host->detect)->work)){+.+.}-{0:0}, at: process_one_work+0x988/0x1940 kernel/workqueue.c:3298
locks held by kworker/1:2/1210: 5, on CPU#1:
#0: ffff888023e88d40 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x12b1/0x1940 kernel/workqueue.c:3297
#1: ffffc90005537d08 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x988/0x1940 kernel/workqueue.c:3298
#2: ffff88802b85f1d8 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:1104 [inline]
#2: ffff88802b85f1d8 (&dev->mutex){....}-{4:4}, at: hub_event+0x1bb/0x4420 drivers/usb/core/hub.c:5907
#3: ffff88807a7fc1d8 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:1104 [inline]
#3: ffff88807a7fc1d8 (&dev->mutex){....}-{4:4}, at: usb_disconnect+0x10a/0x9a0 drivers/usb/core/hub.c:2336
#4: ffff8880272ad1a0 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:1104 [inline]
#4: ffff8880272ad1a0 (&dev->mutex){....}-{4:4}, at: __device_driver_lock drivers/base/dd.c:1171 [inline]
#4: ffff8880272ad1a0 (&dev->mutex){....}-{4:4}, at: device_release_driver_internal+0xb2/0x620 drivers/base/dd.c:1369
locks held by getty/5357: 2, on CPU#1:
#0: ffff888036cb90a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x24/0x80 drivers/tty/tty_ldisc.c:243
#1: ffffc900032332e8 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0x419/0x14e0 drivers/tty/n_tty.c:2211
locks held by syz-executor/5593: 2, on CPU#0:
#0: ffff888052ab00e8 (&type->s_umount_key#78){+.+.}-{4:4}, at: __super_lock fs/super.c:60 [inline]
#0: ffff888052ab00e8 (&type->s_umount_key#78){+.+.}-{4:4}, at: __super_lock_excl fs/super.c:75 [inline]
#0: ffff888052ab00e8 (&type->s_umount_key#78){+.+.}-{4:4}, at: deactivate_super fs/super.c:631 [inline]
#0: ffff888052ab00e8 (&type->s_umount_key#78){+.+.}-{4:4}, at: deactivate_super+0xe2/0x110 fs/super.c:628
#1: ffffffff8f275060 (nfsd_mutex){+.+.}-{4:4}, at: nfsd_shutdown_threads+0x5b/0xf0 fs/nfsd/nfssvc.c:576
locks held by kworker/0:4/5600: 5, on CPU#0:
#0: ffff888023e88d40 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x12b1/0x1940 kernel/workqueue.c:3297
#1: ffffc900035f7d08 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x988/0x1940 kernel/workqueue.c:3298
#2: ffff8880270fd1d8 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:1104 [inline]
#2: ffff8880270fd1d8 (&dev->mutex){....}-{4:4}, at: hub_event+0x1bb/0x4420 drivers/usb/core/hub.c:5907
#3: ffff8880771011d8 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:1104 [inline]
#3: ffff8880771011d8 (&dev->mutex){....}-{4:4}, at: __device_attach+0x7e/0x4d0 drivers/base/dd.c:1073
#4: ffff888050ee41a0 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:1104 [inline]
#4: ffff888050ee41a0 (&dev->mutex){....}-{4:4}, at: __device_attach+0x7e/0x4d0 drivers/base/dd.c:1073
locks held by kworker/0:5/5603: 5, on CPU#0:
#0: ffff888023e88d40 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x12b1/0x1940 kernel/workqueue.c:3297
#1: ffffc90003607d08 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x988/0x1940 kernel/workqueue.c:3298
#2: ffff88802b8131d8 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:1104 [inline]
#2: ffff88802b8131d8 (&dev->mutex){....}-{4:4}, at: hub_event+0x1bb/0x4420 drivers/usb/core/hub.c:5907
#3: ffff88802b810568 (&port_dev->status_lock){+.+.}-{4:4}, at: usb_lock_port drivers/usb/core/hub.c:3260 [inline]
#3: ffff88802b810568 (&port_dev->status_lock){+.+.}-{4:4}, at: hub_port_connect drivers/usb/core/hub.c:5472 [inline]
#3: ffff88802b810568 (&port_dev->status_lock){+.+.}-{4:4}, at: hub_port_connect_change drivers/usb/core/hub.c:5715 [inline]
#3: ffff88802b810568 (&port_dev->status_lock){+.+.}-{4:4}, at: port_event drivers/usb/core/hub.c:5879 [inline]
#3: ffff88802b810568 (&port_dev->status_lock){+.+.}-{4:4}, at: hub_event+0x2b3e/0x4420 drivers/usb/core/hub.c:5961
#4: ffff88802b795360 (hcd->address0_mutex){+.+.}-{4:4}, at: hub_port_connect drivers/usb/core/hub.c:5473 [inline]
#4: ffff88802b795360 (hcd->address0_mutex){+.+.}-{4:4}, at: hub_port_connect_change drivers/usb/core/hub.c:5715 [inline]
#4: ffff88802b795360 (hcd->address0_mutex){+.+.}-{4:4}, at: port_event drivers/usb/core/hub.c:5879 [inline]
#4: ffff88802b795360 (hcd->address0_mutex){+.+.}-{4:4}, at: hub_event+0x2b67/0x4420 drivers/usb/core/hub.c:5961
locks held by syz.2.866/8371: 3, on CPU#1:
#0: ffff88802b6475f0 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x2aa/0x380 fs/file.c:1259
#1: ffff888050d6e460 (sb_writers#15){.+.+}-{0:0}, at: ksys_write+0x12a/0x250 fs/read_write.c:739
#2: ffffffff8f275060 (nfsd_mutex){+.+.}-{4:4}, at: write_ports+0xa5/0xcc0 fs/nfsd/nfsctl.c:860
locks held by syz.3.1202/9434: 1, on CPU#1:
#0: ffff888027328ea0 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_do_close+0x26/0xb0 net/bluetooth/hci_core.c:497
locks held by syz.4.1208/9449: 1, on CPU#1:
#0: ffff888030678ea0 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_do_close+0x26/0xb0 net/bluetooth/hci_core.c:497
locks held by syz.6.1207/9452: 3, on CPU#1:
#0: ffff888079124ea0 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_do_close+0x26/0xb0 net/bluetooth/hci_core.c:497
#1: ffff8880791240b8 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x37e/0x13c0 net/bluetooth/hci_sync.c:5501
#2: ffffffff8edf4f28 (rcu_state.exp_mutex){+.+.}-{4:4}, at: exp_funnel_lock+0x27f/0x3c0 kernel/rcu/tree_exp.h:311
locks held by syz.5.1209/9453: 2, on CPU#0:
#0: ffff888077f9cea0 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_do_close+0x26/0xb0 net/bluetooth/hci_core.c:497
#1: ffffffff8edf4f28 (rcu_state.exp_mutex){+.+.}-{4:4}, at: exp_funnel_lock+0x19e/0x3c0 kernel/rcu/tree_exp.h:343
locks held by syz.1.1210/9455: 1, on CPU#0:
#0: ffff88802c534ea0 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_do_close+0x26/0xb0 net/bluetooth/hci_core.c:497
=============================================
NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 30 Comm: khungtaskd Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
nmi_cpu_backtrace.cold+0x12d/0x151 lib/nmi_backtrace.c:123
nmi_trigger_cpumask_backtrace+0x21f/0x2a0 lib/nmi_backtrace.c:66
trigger_all_cpu_backtrace include/linux/nmi.h:164 [inline]
__sys_info lib/sys_info.c:157 [inline]
sys_info+0x141/0x190 lib/sys_info.c:165
check_hung_uninterruptible_tasks kernel/hung_task.c:353 [inline]
watchdog+0xcb1/0x1030 kernel/hung_task.c:561
kthread+0x373/0x450 kernel/kthread.c:436
ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 5906 Comm: kworker/u8:10 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
Workqueue: events_unbound nsim_dev_trap_report_work
RIP: 0010:unwind_get_return_address+0x7a/0xa0 arch/x86/kernel/unwind_orc.c:386
Code: 48 8b 7b 48 e8 67 d4 18 00 85 c0 74 cf 48 b8 00 00 00 00 00 fc ff df 48 89 ea 48 c1 ea 03 80 3c 02 00 75 1c 48 8b 43 48 5b 5d <e9> 01 d6 0a 0a e8 2c d1 c2 00 eb a0 48 89 ef e8 52 d1 c2 00 eb c0
RSP: 0018:ffffc9000436f690 EFLAGS: 00000246
RAX: ffffffff8175cb0a RBX: ffffc9000436f698 RCX: ffffc9000436f5ec
RDX: 1ffff9200086dedc RSI: ffffffff8e38aca9 RDI: ffffffff8175cb0a
RBP: ffffc9000436f728 R08: 0000000000000001 R09: 0000000000000007
R10: 0000000000000200 R11: 000000000000ae23 R12: ffffffff81f4b450
R13: ffffc9000436f758 R14: 0000000000000000 R15: ffff8880301f2580
FS: 0000000000000000(0000) GS:ffff888123cc6000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffd6b2e9ffc CR3: 000000000eb94000 CR4: 00000000003526f0
Call Trace:
<TASK>
arch_stack_walk+0xa6/0xf0 arch/x86/kernel/stacktrace.c:26
stack_trace_save+0x8e/0xc0 kernel/stacktrace.c:122
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415
kasan_kmalloc include/linux/kasan.h:263 [inline]
__do_kmalloc_node mm/slub.c:5334 [inline]
__kmalloc_node_track_caller_noprof+0x333/0x830 mm/slub.c:5471
kmalloc_reserve+0xe8/0x350 net/core/skbuff.c:637
__alloc_skb+0x185/0x710 net/core/skbuff.c:715
alloc_skb include/linux/skbuff.h:1384 [inline]
nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:819 [inline]
nsim_dev_trap_report drivers/net/netdevsim/dev.c:876 [inline]
nsim_dev_trap_report_work+0x2af/0xd20 drivers/net/netdevsim/dev.c:922
process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
process_scheduled_works kernel/workqueue.c:3405 [inline]
worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
kthread+0x373/0x450 kernel/kthread.c:436
ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
Reply: Based on the analysis of the provided kernel bug report and source code, here is the assessment of the bug:
**Bug Mechanism:**
The bug is a deadlock (hung task) in the `vub300` USB SDIO host controller driver.
When a USB device is disconnected, the USB subsystem calls `vub300_disconnect()`. This function sets `vub300->interface = NULL` and then calls `mmc_remove_host()`. The `mmc_remove_host()` function attempts to cancel the delayed `detect` work (which runs `mmc_rescan()`) and waits for it to finish if it is currently running.
If `mmc_rescan()` is running concurrently, it may have issued an MMC request (e.g., `mmc_send_io_op_cond()`) which gets queued to the driver's worker thread `vub300_cmndwork_thread()`.
However, `vub300_cmndwork_thread()` starts with the following check:
```c
if (!vub300->interface) {
kref_put(&vub300->kref, vub300_delete);
return;
}
```
If `vub300_disconnect()` has already set `vub300->interface` to `NULL`, the worker thread simply returns and drops the request without ever calling `mmc_request_done()`. As a result, `mmc_rescan()` waits indefinitely in `mmc_wait_for_req_done()` for the completion of the dropped request. Consequently, `vub300_disconnect()` also waits indefinitely in `mmc_remove_host()`.
**Security Impact:**
* **Exploitable:** No. This is a pure deadlock. The waiting thread (`mmc_rescan`) uses an uninterruptible wait (`wait_for_completion`), meaning it cannot be killed by signals. Therefore, the stack frame where the MMC request is allocated is never freed or reused, preventing any use-after-free or memory corruption scenarios.
* **Denial Of Service:** Yes. The deadlock causes `vub300_disconnect()` to hang indefinitely, which blocks the `usb_hub_wq` workqueue. This prevents the system from processing any further USB hub events, meaning no other USB devices can be enumerated or disconnected, effectively causing a DoS for the USB subsystem.
* **Peripheral Trigger:** Yes. The bug can be triggered by physically plugging in a USB device that binds to the `vub300` driver and then unplugging it at the right time (or by a malicious USB device simulating a disconnect).
* **Accessible From Unprivileged Processes / User Namespaces:** No. Unprivileged users cannot trigger USB device disconnects via software (e.g., unbinding the driver via sysfs requires root privileges). Triggering it requires physical access to plug/unplug the device (covered by Peripheral Trigger) or root access to emulate it (e.g., via `/dev/vhci` which Syzkaller uses, but is restricted in production).
|
| 6/2 |
2026/08/21 02:45 |
llm |
expert |
0m
Model:
Tokens:
input: 13296
output: 45
thoughts: 411
Thoughts: **Analyzing a Suspected MMC Host Hang**
Okay, so I've got these two hung task reports β looks like `kworker/0:2:980` and `kworker/1:2:1210` are both blocked for over 143 seconds. The first one, `mmc_rescan`, is stuck deep inside the MMC stack, specifically in `mmc_wait_for_req_done`. That's a classic sign of a blocking operation waiting for a request completion. The other one, associated with a USB hub event (`usb_hub_wq`), seems to be in a function `vub300_disconnect`.
My immediate thought is, what's happening here? `vub300_disconnect` is trying to shut down the MMC host, which involves canceling delayed work using `cancel_delayed_work_sync`. But, if `mmc_rescan` is in flight, waiting on a request, and `vub300_disconnect` unceremoniously yanks the rug out from under it⦠that request isn't ever going to complete.
So, `mmc_rescan` is just going to sit there, forever waiting. My hypothesis is that the disconnect is interrupting the request. I need to look at the `vub300_disconnect` function in the driver code (`drivers/mmc/host/vub300.c`) to confirm my suspicion. Let's see how that disconnect is implemented and if it's got a proper shutdown sequence. I'm guessing there's a race condition there, with the MMC host being disabled before the ongoing operation completes.
|
| 7/2 |
2026/08/21 02:45 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:drivers/mmc/host/vub300.c Name:vub300_disconnect]
Results: map[SourceCode:2373: static void vub300_disconnect(struct usb_interface *interface)
2374: { /* NOT irq */
2375: struct vub300_mmc_host *vub300 = usb_get_intfdata(interface);
2376: if (!vub300 || !vub300->mmc) {
2377: return;
2378: } else {
2379: struct mmc_host *mmc = vub300->mmc;
2380: if (!vub300->mmc) {
2381: return;
2382: } else {
2383: int ifnum = interface_to_InterfaceNumber(interface);
2384: usb_set_intfdata(interface, NULL);
2385: /* prevent more I/O from starting */
2386: vub300->interface = NULL;
2387: mmc_remove_host(mmc);
2388: kref_put(&vub300->kref, vub300_delete);
2389: pr_info("USB vub300 remote SDIO host controller[%d]"
2390: " now disconnected", ifnum);
2391: return;
2392: }
2393: }
2394: }
SourceFile:drivers/mmc/host/vub300.c]
|
| 8/2 |
2026/08/21 02:45 |
llm |
expert |
0m
Model:
Tokens:
input: 14516
output: 45
thoughts: 175
Thoughts: **Debugging a Disconnect in the VUB300 MMC Driver**
Okay, so I'm diving into this `vub300_disconnect` function. It looks like it's calling `mmc_remove_host(mmc)` which is standard practice. Now, `mmc_remove_host` triggers `mmc_stop_host`, and that's where things get interesting. It cancels the `detect` delayed work. That `detect` work is essentially the `mmc_rescan` function. But here's the kicker: `mmc_rescan` is currently *blocked* inside `mmc_wait_for_req_done`. That's not good. We have a deadlock situation here, I reckon.
The million-dollar question is, *why* is `mmc_wait_for_req_done` blocked? Because the underlying request isn't completing. We need to figure out who's supposed to complete that request. With the VUB300, my memory tells me these requests are usually handled by some thread, like a `vub300_cmndwork_thread` or something along those lines. I need to confirm that. I'm going to jump straight to the source and examine the `vub300_request` function in `drivers/mmc/host/vub300.c`. Let's see how the requests are actually processed. I'm hoping to spot a clue as to why that request isn't finishing. Time to dig in...
|
| 9/2 |
2026/08/21 02:45 |
tool |
codesearch-definition-source |
0m
Error:
Args: map[ContextFile:drivers/mmc/host/vub300.c Name:vub300_request]
Results: map[SourceCode: SourceFile:]
|
| 10/2 |
2026/08/21 02:45 |
llm |
expert |
0m
Model:
Tokens:
input: 15094
output: 33
thoughts: 24
Thoughts: Here's my analysis of the `drivers/mmc/host/vub300.c` file, from a driver developer's perspective:
**Diving into the VUB300 MMC Host Driver**
Okay, let's get down to brass tacks. I'm taking a look at `drivers/mmc/host/vub300.c`. This tells me we're dealing with the MMC (MultiMediaCard) host controller for the VUB300 platform, presumably a specific SoC or embedded system. The naming convention is pretty standard, so I have a basic understanding of what I'm in for. I'm going to quickly skim the file, looking for key function definitions and data structures to understand the core functionality. I'm interested in how it initializes the hardware, manages commands and data transfers (especially the DMA setup if any), and how it handles interrupts. I'll be looking for clues on power management integration and any specific workarounds or quirks related to this particular VUB300 implementation. I'm expecting to see functions for things like `vub300_probe`, `vub300_remove`, `vub300_request`, `vub300_set_ios`, and likely interrupt handlers. The goal is to get a handle on the control flow and understand the critical sections of code that interact directly with the MMC hardware, and how that is presented to the core MMC subsystem.
|
| 11/2 |
2026/08/21 02:45 |
tool |
codesearch-file-index |
0m
Args: map[SourceFile:drivers/mmc/host/vub300.c]
Results: map[Entities:[map[Kind:function Name:__add_offloaded_reg_to_fifo] map[Kind:function Name:__check_disable_offload_processing] map[Kind:function Name:__check_firmware_irqpoll_timeout] map[Kind:function Name:__check_firmware_rom_wait_states] map[Kind:function Name:__check_force_1_bit_data_xfers] map[Kind:function Name:__check_force_max_req_size] map[Kind:function Name:__check_force_polling_for_irqs] map[Kind:function Name:__check_limit_speed_to_24_MHz] map[Kind:function Name:__check_pad_input_to_usb_pkt] map[Kind:function Name:__command_read_data] map[Kind:function Name:__command_write_data] map[Kind:function Name:__do_poll] map[Kind:function Name:__download_offload_pseudocode] map[Kind:function Name:__set_clock_speed] map[Kind:function Name:__vub300_command_response] map[Kind:function Name:__vub300_irqpoll_response] map[Kind:function Name:add_offloaded_reg] map[Kind:function Name:check_vub300_port_status] map[Kind:function Name:command_out_completed] map[Kind:function Name:command_res_completed] map[Kind:function Name:construct_request_response] map[Kind:function Name:download_offload_pseudocode] map[Kind:function Name:examine_cyclic_buffer] map[Kind:function Name:interface_to_InterfaceNumber] map[Kind:function Name:irqpoll_out_completed] map[Kind:function Name:irqpoll_res_completed] map[Kind:function Name:new_system_port_status] map[Kind:function Name:roundup_to_multiple_of_64] map[Kind:function Name:satisfy_request_from_offloaded_data] map[Kind:function Name:send_command] map[Kind:function Name:send_irqpoll] map[Kind:function Name:snoop_block_size_and_bus_width] map[Kind:function Name:vub300_cmndwork_thread] map[Kind:function Name:vub300_deadwork_thread] map[Kind:function Name:vub300_delete] map[Kind:function Name:vub300_disconnect] map[Kind:function Name:vub300_enable_sdio_irq] map[Kind:function Name:vub300_exit] map[Kind:function Name:vub300_inactivity_timer_expired] map[Kind:function Name:vub300_init] map[Kind:function Name:vub300_mmc_get_ro] map[Kind:function Name:vub300_mmc_request] map[Kind:function Name:vub300_mmc_set_ios] map[Kind:function Name:vub300_pollwork_thread] map[Kind:function Name:vub300_post_reset] map[Kind:function Name:vub300_pre_reset] map[Kind:function Name:vub300_probe] map[Kind:function Name:vub300_queue_cmnd_work] map[Kind:function Name:vub300_queue_dead_work] map[Kind:function Name:vub300_queue_poll_work] map[Kind:function Name:vub300_response_error] map[Kind:function Name:vub300_resume] map[Kind:function Name:vub300_sg_timed_out] map[Kind:function Name:vub300_suspend] map[Kind:function Name:vub300_usb_bulk_msg] map[Kind:function Name:vub300_usb_bulk_msg_completion] map[Kind:struct Name:host_controller_info] map[Kind:struct Name:offload_interrupt_function_register] map[Kind:struct Name:offload_registers_access] map[Kind:struct Name:sd_command_header] map[Kind:struct Name:sd_common_header] map[Kind:struct Name:sd_error_header] map[Kind:struct Name:sd_interrupt_header] map[Kind:struct Name:sd_irqpoll_header] map[Kind:struct Name:sd_offloaded_interrupt] map[Kind:struct Name:sd_offloaded_piggyback] map[Kind:struct Name:sd_register_header] map[Kind:struct Name:sd_response_header] map[Kind:struct Name:sd_status_header] map[Kind:struct Name:sdio_register] map[Kind:struct Name:vub300_mmc_host] map[Kind:union Name:sd_command] map[Kind:union Name:sd_response] map[Kind:global_variable Name:__UNIQUE_ID_addressable_vub300_init_968] map[Kind:global_variable Name:__UNIQUE_ID_modinfo_942] map[Kind:global_variable Name:__UNIQUE_ID_modinfo_943] map[Kind:global_variable Name:__UNIQUE_ID_modinfo_944] map[Kind:global_variable Name:__UNIQUE_ID_modinfo_945] map[Kind:global_variable Name:__UNIQUE_ID_modinfo_946] map[Kind:global_variable Name:__UNIQUE_ID_modinfo_947] map[Kind:global_variable Name:__UNIQUE_ID_modinfo_948] map[Kind:global_variable Name:__UNIQUE_ID_modinfo_949] map[Kind:global_variable Name:__UNIQUE_ID_modinfo_950] map[Kind:global_variable Name:__UNIQUE_ID_modinfo_951] map[Kind:global_variable Name:__UNIQUE_ID_modinfo_952] map[Kind:global_variable Name:__UNIQUE_ID_modinfo_953] map[Kind:global_variable Name:__UNIQUE_ID_modinfo_954] map[Kind:global_variable Name:__UNIQUE_ID_modinfo_955] map[Kind:global_variable Name:__UNIQUE_ID_modinfo_956] map[Kind:global_variable Name:__UNIQUE_ID_modinfo_957] map[Kind:global_variable Name:__UNIQUE_ID_modinfo_969] map[Kind:global_variable Name:__UNIQUE_ID_modinfo_970] map[Kind:global_variable Name:__UNIQUE_ID_modinfo_971] map[Kind:global_variable Name:__UNIQUE_ID_modinfo_972] map[Kind:global_variable Name:__exitcall_vub300_exit] map[Kind:global_variable Name:__mod_device_table__kmod_vub300__usb__vub300_table] map[Kind:global_variable Name:__param_disable_offload_processing] map[Kind:global_variable Name:__param_firmware_irqpoll_timeout] map[Kind:global_variable Name:__param_firmware_rom_wait_states] map[Kind:global_variable Name:__param_force_1_bit_data_xfers] map[Kind:global_variable Name:__param_force_max_req_size] map[Kind:global_variable Name:__param_force_polling_for_irqs] map[Kind:global_variable Name:__param_limit_speed_to_24_MHz] map[Kind:global_variable Name:__param_pad_input_to_usb_pkt] map[Kind:global_variable Name:__param_str_disable_offload_processing] map[Kind:global_variable Name:__param_str_firmware_irqpoll_timeout] map[Kind:global_variable Name:__param_str_firmware_rom_wait_states] map[Kind:global_variable Name:__param_str_force_1_bit_data_xfers] map[Kind:global_variable Name:__param_str_force_max_req_size] map[Kind:global_variable Name:__param_str_force_polling_for_irqs] map[Kind:global_variable Name:__param_str_limit_speed_to_24_MHz] map[Kind:global_variable Name:__param_str_pad_input_to_usb_pkt] map[Kind:global_variable Name:firmware_irqpoll_timeout] map[Kind:global_variable Name:firmware_rom_wait_states] map[Kind:global_variable Name:force_max_req_size] map[Kind:global_variable Name:vub300_driver] map[Kind:global_variable Name:vub300_mmc_ops] map[Kind:global_variable Name:vub300_table] map[Kind:enum Name:SD_RESPONSE_TYPE]]]
|
| 12/2 |
2026/08/21 02:45 |
llm |
expert |
0m
Model:
Tokens:
input: 17997
output: 48
thoughts: 17
Thoughts: Okay, let's dive into this `vub300_mmc_request` function. I need to understand what this is doing. Clearly, this is related to MMC (MultiMediaCard) requests within the VUB300 system. My initial thought is to figure out the context. Is this a driver, a hardware abstraction layer, or something else entirely? I need to understand its place within the MMC subsystem.
I'm thinking about the structure of an MMC request. What kind of data is being handled? Is it read, write, or command? What are the key elements of the request struct, and how are they being populated here? I expect to see things like the command index, arguments, data buffers (if applicable), and flags indicating the nature of the transaction. The details of the request structure are critical to its function.
Next, what are the potential sources of this request? Is it initiated by user space through some device node, or is it a lower-level function triggered by another part of the kernel? This will influence how I interpret the function's responsibility and potential error handling.
Finally, I'll need to examine the function's interaction with the MMC hardware. How does it communicate with the MMC controller? Are there calls to other driver functions or direct register writes? Looking at any error codes or return values will be key to understanding the control flow and fault tolerance of the code. Ultimately, I want to piece together the entire request lifecycle as it relates to this specific function.
|
| 13/2 |
2026/08/21 02:45 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:drivers/mmc/host/vub300.c Name:vub300_mmc_request]
Results: map[SourceCode:1908: static void vub300_mmc_request(struct mmc_host *mmc, struct mmc_request *req)
1909: { /* NOT irq */
1910: struct mmc_command *cmd = req->cmd;
1911: struct vub300_mmc_host *vub300 = mmc_priv(mmc);
1912: if (!vub300->interface) {
1913: cmd->error = -ESHUTDOWN;
1914: mmc_request_done(mmc, req);
1915: return;
1916: } else {
1917: struct mmc_data *data = req->data;
1918: if (!vub300->card_powered) {
1919: cmd->error = -ENOMEDIUM;
1920: mmc_request_done(mmc, req);
1921: return;
1922: }
1923: if (!vub300->card_present) {
1924: cmd->error = -ENOMEDIUM;
1925: mmc_request_done(mmc, req);
1926: return;
1927: }
1928: if (vub300->usb_transport_fail) {
1929: cmd->error = vub300->usb_transport_fail;
1930: mmc_request_done(mmc, req);
1931: return;
1932: }
1933: if (!vub300->interface) {
1934: cmd->error = -ENODEV;
1935: mmc_request_done(mmc, req);
1936: return;
1937: }
1938: kref_get(&vub300->kref);
1939: mutex_lock(&vub300->cmd_mutex);
1940: mod_timer(&vub300->inactivity_timer, jiffies + HZ);
1941: /*
1942: * for performance we have to return immediately
1943: * if the requested data has been offloaded
1944: */
1945: if (cmd->opcode == 52 &&
1946: satisfy_request_from_offloaded_data(vub300, cmd)) {
1947: cmd->error = 0;
1948: mutex_unlock(&vub300->cmd_mutex);
1949: kref_put(&vub300->kref, vub300_delete);
1950: mmc_request_done(mmc, req);
1951: return;
1952: } else {
1953: vub300->cmd = cmd;
1954: vub300->req = req;
1955: vub300->data = data;
1956: if (data)
1957: vub300->datasize = data->blksz * data->blocks;
1958: else
1959: vub300->datasize = 0;
1960: vub300_queue_cmnd_work(vub300);
1961: mutex_unlock(&vub300->cmd_mutex);
1962: kref_put(&vub300->kref, vub300_delete);
1963: /*
1964: * the kernel lock diagnostics complain
1965: * if the cmd_mutex * is "passed on"
1966: * to the cmndwork thread,
1967: * so we must release it now
1968: * and re-acquire it in the cmndwork thread
1969: */
1970: }
1971: }
1972: }
SourceFile:drivers/mmc/host/vub300.c]
|
| 14/2 |
2026/08/21 02:45 |
llm |
expert |
0m
Model:
Tokens:
input: 19480
output: 49
thoughts: 53
Thoughts: Here's my analysis of what's going on:
**Deconstructing the Command Work Queue**
Okay, so `vub300_queue_cmnd_work` is the key function here. It's responsible for queuing up a `cmndwork` structure. And that `cmndwork`, in turn, is associated with a specific thread, identified as `vub300_cmndwork_thread`. My immediate focus shifts to understanding what `vub300_cmndwork_thread` *does*. It's likely the worker thread that's going to actually *process* the commands represented by these `cmndwork` structures. I need to dig into `vub300_cmndwork_thread` to see the specifics of the command execution and resource management within this queueing and processing framework.
|
| 15/2 |
2026/08/21 02:45 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:drivers/mmc/host/vub300.c Name:vub300_cmndwork_thread]
Results: map[SourceCode:1736: /* this thread runs only when there is an upper level command req outstanding */
1737: static void vub300_cmndwork_thread(struct work_struct *work)
1738: {
1739: struct vub300_mmc_host *vub300 =
1740: container_of(work, struct vub300_mmc_host, cmndwork);
1741: if (!vub300->interface) {
1742: kref_put(&vub300->kref, vub300_delete);
1743: return;
1744: } else {
1745: struct mmc_request *req = vub300->req;
1746: struct mmc_command *cmd = vub300->cmd;
1747: struct mmc_data *data = vub300->data;
1748: bool reset_device;
1749: int data_length;
1750: mutex_lock(&vub300->cmd_mutex);
1751: init_completion(&vub300->command_complete);
1752: if (likely(vub300->vub_name[0]) || !vub300->mmc->card) {
1753: /*
1754: * the name of the EMPTY Pseudo firmware file
1755: * is used as a flag to indicate that the file
1756: * has been already downloaded to the VUB300 chip
1757: */
1758: } else if (0 == vub300->mmc->card->sdio_funcs) {
1759: strscpy(vub300->vub_name, "SD memory device",
1760: sizeof(vub300->vub_name));
1761: } else {
1762: download_offload_pseudocode(vub300);
1763: }
1764: send_command(vub300);
1765: if (!data)
1766: data_length = 0;
1767: else if (MMC_DATA_READ & data->flags)
1768: data_length = __command_read_data(vub300, cmd, data);
1769: else
1770: data_length = __command_write_data(vub300, cmd, data);
1771: reset_device = __vub300_command_response(vub300, cmd,
1772: data, data_length);
1773: vub300->req = NULL;
1774: vub300->cmd = NULL;
1775: vub300->data = NULL;
1776: if (cmd->error) {
1777: if (cmd->error == -ENOMEDIUM)
1778: check_vub300_port_status(vub300);
1779: mutex_unlock(&vub300->cmd_mutex);
1780: if (reset_device) {
1781: int result;
1782:
1783: result = usb_lock_device_for_reset(vub300->udev,
1784: vub300->interface);
1785: if (result == 0) {
1786: result = usb_reset_device(vub300->udev);
1787: usb_unlock_device(vub300->udev);
1788: }
1789: }
1790: mmc_request_done(vub300->mmc, req);
1791: kref_put(&vub300->kref, vub300_delete);
1792: return;
1793: } else {
1794: construct_request_response(vub300, cmd);
1795: vub300->resp_len = 0;
1796: mutex_unlock(&vub300->cmd_mutex);
1797: kref_put(&vub300->kref, vub300_delete);
1798: mmc_request_done(vub300->mmc, req);
1799: return;
1800: }
1801: }
1802: }
SourceFile:drivers/mmc/host/vub300.c]
|
| 16/2 |
2026/08/21 02:45 |
llm |
expert |
0m
Model:
Tokens:
input: 21007
output: 48
thoughts: 4204
Thoughts: **Analysis of a USB SDIO Host Controller Deadlock Vulnerability**
Okay, so I'm looking at this code and, right off the bat, I see a potential race condition and a pretty nasty deadlock in a USB SDIO host controller driver, the `vub300`. It boils down to how it handles device disconnects during MMC requests. Specifically, it appears that if a USB device is disconnected at the *wrong* time β while a request is pending β things get stuck, and the request is left hanging, causing a deadlock.
The core of the problem lies in the `vub300_cmndwork_thread`. If the `vub300->interface` is `NULL` when this thread runs, it just returns. That seems like a design decision, but it *won't* clean up its mess. But `vub300->interface` is set to null in `vub300_disconnect` which is called when a device is unplugged or the driver is unbound. It's a critical oversight because that request is not completed and the corresponding `mmc_request_done` isn't called. The queued request is hanging, and the caller is waiting on completion of it, so it will continue to wait forever.
I've traced this issue through `mmc_rescan` calling `mmc_wait_for_req_done`, which waits on completion of the request. Simultaneously, `vub300_disconnect` is running, attempting to remove the host and waiting for `mmc_rescan` to finish. But `mmc_rescan` is waiting for `vub300_cmndwork_thread` and that thread is waiting on `!vub300->interface`. I'm seeing a classic deadlock scenario unfold here: two threads waiting for each other, and neither is making progress. The system's stuck in a loop.
Now, I'm thinking about the exploitability. It's not memory corruption; it's a denial of service (DoS) caused by a hung task and resource leak. While the system might eventually recover, or, in more drastic situations, panic, it's certainly not ideal. An unprivileged user can trigger this bug; it appears they just need to yank out the USB device at the right moment. The syzkaller reports and trace confirm a peripheral trigger where a USB device is disconnected while `mmc_rescan` is running. This means, someone with physical access can cause this by unplugging the device. Or, a malicious USB device could be designed to simulate a disconnect.
I've also checked other parts of the driver to see if the request gets dropped elsewhere and it confirms that it's dropped if `vub300->interface` is set to null.
Let's quickly check what happens if `vub300_disconnect` gets called before `vub300_cmndwork_thread`. I can see there is a mutex in `vub300_cmndwork_thread`, but `vub300_disconnect` doesn't take it and it's free to run. So it will set `vub300->interface = NULL` and set `vub300->req` before it is ever processed. This will be reached in either thread.
The NMI backtrace from the second bug report is a red herring. It's a consequence, not the cause, likely a kworker process allocating an skb, and doesn't shed more light on the deadlock directly.
There's no memory corruption because the driver uses kernel stack, and no dangling pointers. I've also checked for other places where `req` might be dropped, and I've confirmed `vub300->req` is only set if there is a pending request, as well as if `vub300_cmndwork_thread` is the only place.
So, the fix is straightforward: In `vub300_cmndwork_thread`, when `!vub300->interface`, the driver *must* call `mmc_request_done` to complete the request with an error, so the threads can be unblocked, and the resource isn't leaked. This will prevent the system from getting into a deadlock.
|
| 17/2 |
2026/08/21 02:46 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:drivers/mmc/host/vub300.c Name:vub300_deadwork_thread]
Results: map[SourceCode: 709: static void vub300_deadwork_thread(struct work_struct *work)
710: { /* NOT irq */
711: struct vub300_mmc_host *vub300 =
712: container_of(work, struct vub300_mmc_host, deadwork);
713: if (!vub300->interface) {
714: kref_put(&vub300->kref, vub300_delete);
715: return;
716: }
717: mutex_lock(&vub300->cmd_mutex);
718: if (vub300->cmd) {
719: /*
720: * a command got in as the inactivity
721: * timer expired - so we just let the
722: * processing of the command show if
723: * the device is dead
724: */
725: } else if (vub300->card_present) {
726: check_vub300_port_status(vub300);
727: } else if (vub300->mmc && vub300->mmc->card) {
728: /*
729: * the MMC core must not have responded
730: * to the previous indication - lets
731: * hope that it eventually does so we
732: * will just ignore this for now
733: */
734: } else {
735: check_vub300_port_status(vub300);
736: }
737: mod_timer(&vub300->inactivity_timer, jiffies + HZ);
738: mutex_unlock(&vub300->cmd_mutex);
739: kref_put(&vub300->kref, vub300_delete);
740: }
SourceFile:drivers/mmc/host/vub300.c]
|
| 18/2 |
2026/08/21 02:46 |
llm |
expert |
0m
Model:
Tokens:
input: 26775
output: 48
thoughts: 48
Thoughts: Here's my take on those thoughts:
**Concerning `vub300_deadwork_thread` and Interface Checks**
Okay, so looking at `vub300_deadwork_thread`, it's not actually processing any requests, which is good. It seems to just be focused on checking the port status. The crucial `if (!vub300->interface) return;` check is there, which is what I'd expect. Since it's only looking at the hardware's availability, and gracefully exiting if the interface is null, I'm not too worried about potential issues with how it handles the interface. That particular bit of code seems reasonable in its context.
|
| 19/2 |
2026/08/21 02:46 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:drivers/mmc/host/vub300.c Name:vub300_pollwork_thread]
Results: map[SourceCode: 675: /* this thread runs only when the driver
676: * is trying to poll the device for an IRQ
677: */
678: static void vub300_pollwork_thread(struct work_struct *work)
679: { /* NOT irq */
680: struct vub300_mmc_host *vub300 = container_of(work,
681: struct vub300_mmc_host, pollwork.work);
682: if (!vub300->interface) {
683: kref_put(&vub300->kref, vub300_delete);
684: return;
685: }
686: mutex_lock(&vub300->cmd_mutex);
687: if (vub300->cmd) {
688: vub300_queue_poll_work(vub300, 1);
689: } else if (!vub300->card_present) {
690: /* no need to do anything */
691: } else { /* vub300->card_present */
692: mutex_lock(&vub300->irq_mutex);
693: if (!vub300->irq_enabled) {
694: mutex_unlock(&vub300->irq_mutex);
695: } else if (vub300->irqs_queued) {
696: vub300->irqs_queued -= 1;
697: mmc_signal_sdio_irq(vub300->mmc);
698: mod_timer(&vub300->inactivity_timer, jiffies + HZ);
699: mutex_unlock(&vub300->irq_mutex);
700: } else { /* NOT vub300->irqs_queued */
701: mutex_unlock(&vub300->irq_mutex);
702: __do_poll(vub300);
703: }
704: }
705: mutex_unlock(&vub300->cmd_mutex);
706: kref_put(&vub300->kref, vub300_delete);
707: }
SourceFile:drivers/mmc/host/vub300.c]
|
| 20/2 |
2026/08/21 02:46 |
llm |
expert |
0m
Model:
Tokens:
input: 27707
output: 66
thoughts: 509
Thoughts: **My Analysis of the VUB300 Deadlock**
Okay, so `vub300_pollwork_thread` bails out if `vub300->interface` is null, that's straightforward, it's polling for IRQs. But the core problem seems to be a deadlock in `vub300_cmndwork_thread` when `vub300->interface` is null. This is definitely a deadlock, so at least we can rule out memory corruption vulnerabilities here. The impact is a Denial of Service (DoS), manifested as a hung task. It looks like a peripheral device, likely USB, can trigger this. Importantly, unprivileged processes and user namespaces are not affected, which is good.
I need to confirm there aren't any other implications, let me think. What about dropped requests and timeouts? If we *did* have a timeout implemented, and the request was dropped, would there be a use-after-free situation? If `mmc_wait_for_req_done` had timed out, `mmc_rescan` would proceed. Then `mmc_rescan` might free the request, which would have been on the stack. Later, `vub300_cmndwork_thread` might try to access `vub300->req`, and that pointer would point to freed stack memory. However, the timeout mechanism relies on `wait_for_completion`, which *doesn't* time out. So the stack frame is never freed, and therefore, no use-after-free. I think we're safe there.
Wait, though, what if the device is physically removed? `vub300_disconnect` is called, which then triggers `mmc_remove_host`. Now, `mmc_remove_host` waits for `mmc_rescan` to complete. The problem is `mmc_rescan` is stuck, waiting for `mmc_wait_for_req_done`! So `mmc_remove_host` just hangs. The USB subsystem is waiting for `vub300_disconnect` to complete. This blocks the `usb_hub_wq` workqueue which handles *all* USB hub events. This is bad. This means no other USB devices can be enumerated or disconnected, which is a major Denial of Service, I need to focus on this.
Okay, let's nail this down.
Exploitable: False.
DenialOfService: True.
Unprivileged: False.
UserNamespace: False.
VMGuestTrigger: False.
VMHostTrigger: False.
EthernetNetworkTrigger: False.
OtherRemoteTrigger: False.
PeripheralTrigger: True.
FilesystemTrigger: False.
|
| 21/2 |
2026/08/21 02:46 |
tool |
set-results |
0m
Args: map[DenialOfService:true Exploitable:false FilesystemTrigger:false NetworkTrigger:false PeripheralTrigger:true RemoteTrigger:false Unprivileged:false UserNamespace:false VMGuestTrigger:false VMHostTrigger:false]
Results: map[DenialOfService:true Exploitable:false FilesystemTrigger:false NetworkTrigger:false PeripheralTrigger:true RemoteTrigger:false Unprivileged:false UserNamespace:false VMGuestTrigger:false VMHostTrigger:false]
|
| 22/2 |
2026/08/21 02:46 |
llm |
expert |
0m
Model:
Tokens:
input: 28938
output: 679
thoughts: 346
Thoughts: **My Analysis of the USB Deadlock**
Okay, the results are in. Time to draft the final response. My findings point to a nasty deadlock situation, specifically within the `vub300` driver. Here's the core of it: it's all about how the driver handles device disconnection.
When a USB device gets yanked out, `vub300_disconnect` sets `vub300->interface` to `NULL`, then calls `mmc_remove_host`. Now, `mmc_remove_host` is supposed to wait until any pending `mmc_rescan` work is done. Here's where it goes south: if `mmc_rescan` has a queued request destined for `vub300_cmndwork_thread`, that thread will eventually run. But inside `vub300_cmndwork_thread`, it immediately bails if `!vub300->interface`. The problem is that the request never gets properly completed (`mmc_request_done`). This leaves `mmc_rescan` hanging indefinitely in `mmc_wait_for_req_done`, which in turn locks up `vub300_disconnect` inside `mmc_remove_host`. This also blocks the `usb_hub_wq` workqueue. The unfortunate consequence is that no new USB devices can be connected or disconnected. It's a classic Denial of Service.
On the plus side, it's not a memory corruption vulnerability. The waiting thread (`mmc_rescan`) uses an uninterruptible wait (`wait_for_completion`), so its stack isn't freed or reused. So, while it's a denial of service, it's not a memory safety issue.
The exploitability is pretty straightforward: it can be triggered by physically plugging and unplugging a malicious or glitchy USB device. It's a classic Peripheral Trigger scenario. Importantly, this isn't something that can be exploited remotely by an unprivileged process or from within a user namespace. You can't trigger USB disconnects from within one unless you have some form of physical access, which, as stated, makes it a Peripheral Trigger.
|
| 23/1 |
2026/08/21 02:47 |
action |
format-explanation |
0m
Results: map[Explanation:Based on the analysis of the provided kernel bug report and source code, here is
the assessment of the bug:
**Bug Mechanism:**
The bug is a deadlock (hung task) in the `vub300` USB SDIO host controller
driver.
When a USB device is disconnected, the USB subsystem calls
`vub300_disconnect()`. This function sets `vub300->interface = NULL` and then
calls `mmc_remove_host()`. The `mmc_remove_host()` function attempts to cancel
the delayed `detect` work (which runs `mmc_rescan()`) and waits for it to finish
if it is currently running.
If `mmc_rescan()` is running concurrently, it may have issued an MMC request
(e.g., `mmc_send_io_op_cond()`) which gets queued to the driver's worker thread
`vub300_cmndwork_thread()`.
However, `vub300_cmndwork_thread()` starts with the following check:
```c
if (!vub300->interface) {
kref_put(&vub300->kref, vub300_delete);
return;
}
```
If `vub300_disconnect()` has already set `vub300->interface` to `NULL`, the
worker thread simply returns and drops the request without ever calling
`mmc_request_done()`. As a result, `mmc_rescan()` waits indefinitely in
`mmc_wait_for_req_done()` for the completion of the dropped request.
Consequently, `vub300_disconnect()` also waits indefinitely in
`mmc_remove_host()`.
**Security Impact:**
* **Exploitable:** No. This is a pure deadlock. The waiting thread
(`mmc_rescan`) uses an uninterruptible wait (`wait_for_completion`), meaning it
cannot be killed by signals. Therefore, the stack frame where the MMC request is
allocated is never freed or reused, preventing any use-after-free or memory
corruption scenarios.
* **Denial Of Service:** Yes. The deadlock causes `vub300_disconnect()` to hang
indefinitely, which blocks the `usb_hub_wq` workqueue. This prevents the system
from processing any further USB hub events, meaning no other USB devices can be
enumerated or disconnected, effectively causing a DoS for the USB subsystem.
* **Peripheral Trigger:** Yes. The bug can be triggered by physically plugging
in a USB device that binds to the `vub300` driver and then unplugging it at the
right time (or by a malicious USB device simulating a disconnect).
* **Accessible From Unprivileged Processes / User Namespaces:** No. Unprivileged
users cannot trigger USB device disconnects via software (e.g., unbinding the
driver via sysfs requires root privileges). Triggering it requires physical
access to plug/unplug the device (covered by Peripheral Trigger) or root access
to emulate it (e.g., via `/dev/vhci` which Syzkaller uses, but is restricted in
production).]
|