syzbot


KCSAN: data-race in __usb_hcd_giveback_urb / mon_reader_add

Status: moderation: reported on 2025/01/31 09:19
Subsystems: usb
[Documentation on labels]
Reported-by: syzbot+1d299ce049fb6eb35054@syzkaller.appspotmail.com
First crash: 4d21h, last: 4d21h

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

write to 0xffff888102ebf088 of 4 bytes by task 14212 on cpu 0:
 mon_reader_add+0xc7/0x1f0 drivers/usb/mon/mon_main.c:47
 mon_bin_open+0x32b/0x3b0 drivers/usb/mon/mon_bin.c:720
 chrdev_open+0x2f9/0x370 fs/char_dev.c:414
 do_dentry_open+0x621/0xa20 fs/open.c:955
 vfs_open+0x38/0x1e0 fs/open.c:1085
 do_open fs/namei.c:3830 [inline]
 path_openat+0x1ae0/0x1fc0 fs/namei.c:3989
 do_filp_open+0x107/0x230 fs/namei.c:4016
 do_sys_openat2+0xab/0x120 fs/open.c:1427
 do_sys_open fs/open.c:1442 [inline]
 __do_sys_openat fs/open.c:1458 [inline]
 __se_sys_openat fs/open.c:1453 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1453
 x64_sys_call+0x2b30/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:258
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888102ebf088 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:3236 [inline]
 process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3317
 bh_worker+0x21f/0x370 kernel/workqueue.c:3577
 workqueue_softirq_action+0xaa/0xc0 kernel/workqueue.c:3604
 tasklet_hi_action+0xe/0x30 kernel/softirq.c:842
 handle_softirqs+0xbf/0x280 kernel/softirq.c:561
 run_ksoftirqd+0x1c/0x30 kernel/softirq.c:950
 smpboot_thread_fn+0x31c/0x4c0 kernel/smpboot.c:164
 kthread+0x4ae/0x520 kernel/kthread.c:464
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:148
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

value changed: 0x00000000 -> 0x00000001

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 23 Comm: ksoftirqd/1 Not tainted 6.13.0-syzkaller-09760-g69e858e0b8b2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/01/31 09:18 upstream 69e858e0b8b2 4c6ac32f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __usb_hcd_giveback_urb / mon_reader_add
* Struck through repros no longer work on HEAD.