syzbot


KCSAN: data-race in __usb_hcd_giveback_urb / mon_reader_del

Status: moderation: reported on 2024/11/20 23:49
Subsystems: usb
[Documentation on labels]
Reported-by: syzbot+18079e8398e66af13287@syzkaller.appspotmail.com
First crash: 7h30m, last: 7h30m

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __usb_hcd_giveback_urb / mon_reader_del

write to 0xffff88810216b088 of 4 bytes by task 20067 on cpu 0:
 mon_stop drivers/usb/mon/mon_main.c:166 [inline]
 mon_reader_del+0x1bd/0x260 drivers/usb/mon/mon_main.c:73
 mon_bin_release+0x66/0x120 drivers/usb/mon/mon_bin.c:793
 __fput+0x17a/0x6d0 fs/file_table.c:450
 ____fput+0x1c/0x30 fs/file_table.c:478
 task_work_run+0x13a/0x1a0 kernel/task_work.c:239
 exit_task_work include/linux/task_work.h:43 [inline]
 do_exit+0x5dd/0x17f0 kernel/exit.c:938
 do_group_exit+0x102/0x150 kernel/exit.c:1087
 get_signal+0xeb9/0x1000 kernel/signal.c:3016
 arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:337
 exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0x62/0x120 kernel/entry/common.c:218
 do_syscall_64+0xd6/0x1c0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88810216b088 of 4 bytes by interrupt on cpu 1:
 usbmon_urb_complete include/linux/usb/hcd.h:737 [inline]
 __usb_hcd_giveback_urb+0x13d/0x370 drivers/usb/core/hcd.c:1635
 usb_giveback_urb_bh+0x170/0x280 drivers/usb/core/hcd.c:1684
 process_one_work kernel/workqueue.c:3229 [inline]
 process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3310
 bh_worker+0x21f/0x370 kernel/workqueue.c:3570
 workqueue_softirq_action+0xaa/0xc0 kernel/workqueue.c:3597
 tasklet_action+0xb/0x30 kernel/softirq.c:829
 handle_softirqs+0xbf/0x280 kernel/softirq.c:554
 run_ksoftirqd+0x1c/0x30 kernel/softirq.c:943
 smpboot_thread_fn+0x31c/0x4c0 kernel/smpboot.c:164
 kthread+0x1d1/0x210 kernel/kthread.c:389
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

value changed: 0x00000001 -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 23 Comm: ksoftirqd/1 Not tainted 6.12.0-syzkaller-01892-g8f7c8b88bda4 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/20 23:48 upstream 8f7c8b88bda4 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __usb_hcd_giveback_urb / mon_reader_del
* Struck through repros no longer work on HEAD.