syzbot


KCSAN: data-race in mon_reader_del / usb_hcd_submit_urb (3)

Status: auto-obsoleted due to no activity on 2024/09/03 21:44
Subsystems: usb
[Documentation on labels]
Reported-by: syzbot+759b7fb83426c4cce452@syzkaller.appspotmail.com
First crash: 43d, last: 43d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in mon_reader_del / usb_hcd_submit_urb (2) usb 2 123d 128d 0/27 auto-obsoleted due to no activity on 2024/06/15 17:54
upstream KCSAN: data-race in mon_reader_del / usb_hcd_submit_urb usb 1 504d 504d 0/27 auto-obsoleted due to no activity on 2023/06/01 00:30

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

write to 0xffff8881011cd088 of 4 bytes by task 12855 on cpu 0:
 mon_stop drivers/usb/mon/mon_main.c:166 [inline]
 mon_reader_del+0x1ba/0x260 drivers/usb/mon/mon_main.c:73
 mon_bin_release+0x6c/0x130 drivers/usb/mon/mon_bin.c:793
 __fput+0x192/0x6f0 fs/file_table.c:422
 ____fput+0x15/0x20 fs/file_table.c:450
 task_work_run+0x13a/0x1a0 kernel/task_work.c:228
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0xbe/0x130 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 0xffff8881011cd088 of 4 bytes by task 12875 on cpu 1:
 usbmon_urb_submit include/linux/usb/hcd.h:723 [inline]
 usb_hcd_submit_urb+0x86/0x1510 drivers/usb/core/hcd.c:1518
 usb_submit_urb+0xa80/0xb70 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+0xbf/0x480 drivers/usb/core/hub.c:621
 usb_hub_port_status drivers/usb/core/hub.c:671 [inline]
 hub_activate+0x4c8/0xf30 drivers/usb/core/hub.c:1181
 hub_resume+0x48/0x1e0 drivers/usb/core/hub.c:4005
 usb_resume_interface drivers/usb/core/driver.c:1379 [inline]
 usb_resume_both+0x3ed/0x5b0 drivers/usb/core/driver.c:1539
 usb_runtime_resume+0x21/0x30 drivers/usb/core/driver.c:1993
 __rpm_callback+0x299/0x720 drivers/base/power/runtime.c:394
 rpm_callback drivers/base/power/runtime.c:448 [inline]
 rpm_resume+0x8e6/0xd00 drivers/base/power/runtime.c:914
 __pm_runtime_resume+0xdc/0x100 drivers/base/power/runtime.c:1172
 pm_runtime_resume_and_get include/linux/pm_runtime.h:430 [inline]
 usb_autoresume_device+0x25/0xd0 drivers/usb/core/driver.c:1727
 usbdev_open+0xfe/0x480 drivers/usb/core/devio.c:1055
 chrdev_open+0x323/0x3a0 fs/char_dev.c:414
 do_dentry_open+0x647/0xa50 fs/open.c:959
 vfs_open+0x3b/0x1f0 fs/open.c:1089
 do_open fs/namei.c:3727 [inline]
 path_openat+0x1a26/0x1f10 fs/namei.c:3886
 do_filp_open+0xf7/0x200 fs/namei.c:3913
 do_sys_openat2+0xab/0x120 fs/open.c:1416
 do_sys_open fs/open.c:1431 [inline]
 __do_sys_openat fs/open.c:1447 [inline]
 __se_sys_openat fs/open.c:1442 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1442
 x64_sys_call+0x1ac/0x2e00 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

value changed: 0x00000001 -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 12875 Comm: syz.4.2883 Not tainted 6.11.0-rc1-syzkaller-00044-g22f546873149 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/30 21:43 upstream 22f546873149 6fde257d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mon_reader_del / usb_hcd_submit_urb
* Struck through repros no longer work on HEAD.