syzbot


KCSAN: data-race in mon_reader_add / usb_hcd_submit_urb

Status: moderation: reported on 2024/03/15 22:45
Subsystems: usb
[Documentation on labels]
Reported-by: syzbot+b058302c4be61d8c6bf2@syzkaller.appspotmail.com
First crash: 31d, last: 31d

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

write to 0xffff888101eac088 of 4 bytes by task 14887 on cpu 1:
 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+0x323/0x3a0 fs/char_dev.c:414
 do_dentry_open+0x63c/0xbe0 fs/open.c:955
 vfs_open+0x4a/0x60 fs/open.c:1089
 do_open fs/namei.c:3642 [inline]
 path_openat+0x18ba/0x1d80 fs/namei.c:3799
 do_filp_open+0xf7/0x200 fs/namei.c:3826
 do_sys_openat2+0xab/0x120 fs/open.c:1406
 do_sys_open fs/open.c:1421 [inline]
 __do_sys_openat fs/open.c:1437 [inline]
 __se_sys_openat fs/open.c:1432 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1432
 do_syscall_64+0xd3/0x1d0
 entry_SYSCALL_64_after_hwframe+0x6d/0x75

read to 0xffff888101eac088 of 4 bytes by task 5637 on cpu 0:
 usbmon_urb_submit include/linux/usb/hcd.h:723 [inline]
 usb_hcd_submit_urb+0x86/0x1510 drivers/usb/core/hcd.c:1520
 usb_submit_urb+0xb12/0xbc0 drivers/usb/core/urb.c:581
 usb_start_wait_urb+0x91/0x190 drivers/usb/core/message.c:59
 usb_internal_control_msg drivers/usb/core/message.c:103 [inline]
 usb_control_msg+0x182/0x240 drivers/usb/core/message.c:154
 get_port_status drivers/usb/core/hub.c:604 [inline]
 hub_ext_port_status+0xb4/0x380 drivers/usb/core/hub.c:621
 usb_hub_port_status drivers/usb/core/hub.c:643 [inline]
 port_event drivers/usb/core/hub.c:5676 [inline]
 hub_event+0x535/0x2900 drivers/usb/core/hub.c:5865
 process_one_work kernel/workqueue.c:3254 [inline]
 process_scheduled_works+0x465/0x990 kernel/workqueue.c:3335
 worker_thread+0x526/0x730 kernel/workqueue.c:3416
 kthread+0x1d1/0x210 kernel/kthread.c:388
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243

value changed: 0x00000000 -> 0x00000001

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 5637 Comm: kworker/0:9 Tainted: G        W          6.8.0-syzkaller-09791-ge5eb28f6d1af #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024
Workqueue: usb_hub_wq hub_event
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/03/15 22:44 upstream e5eb28f6d1af d615901c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mon_reader_add / usb_hcd_submit_urb
* Struck through repros no longer work on HEAD.