syzbot


KCSAN: data-race in mon_reader_del / usb_hcd_submit_urb

Status: auto-obsoleted due to no activity on 2023/06/01 00:30
Subsystems: usb
[Documentation on labels]
First crash: 509d, last: 509d
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 (3) usb 1 48d 48d 0/28 auto-obsoleted due to no activity on 2024/09/03 21:44
upstream KCSAN: data-race in mon_reader_del / usb_hcd_submit_urb (2) usb 2 129d 133d 0/28 auto-obsoleted due to no activity on 2024/06/15 17:54

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

write to 0xffff8881011b6088 of 4 bytes by task 6871 on cpu 0:
 mon_stop drivers/usb/mon/mon_main.c:177 [inline]
 mon_reader_del+0x1b6/0x250 drivers/usb/mon/mon_main.c:73
 mon_bin_release+0x6c/0x120 drivers/usb/mon/mon_bin.c:790
 __fput+0x245/0x570 fs/file_table.c:321
 ____fput+0x15/0x20 fs/file_table.c:349
 task_work_run+0x123/0x160 kernel/task_work.c:179
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0xd1/0xe0 kernel/entry/common.c:171
 exit_to_user_mode_prepare+0x6c/0xb0 kernel/entry/common.c:204
 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline]
 syscall_exit_to_user_mode+0x26/0x140 kernel/entry/common.c:297
 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffff8881011b6088 of 4 bytes by task 6877 on cpu 1:
 usbmon_urb_submit include/linux/usb/hcd.h:704 [inline]
 usb_hcd_submit_urb+0x86/0x1510 drivers/usb/core/hcd.c:1541
 usb_submit_urb+0xbec/0xc90 drivers/usb/core/urb.c:596
 usb_start_wait_urb+0x91/0x190 drivers/usb/core/message.c:58
 usb_internal_control_msg drivers/usb/core/message.c:102 [inline]
 usb_control_msg+0x182/0x240 drivers/usb/core/message.c:153
 get_port_status drivers/usb/core/hub.c:584 [inline]
 hub_ext_port_status+0xb4/0x380 drivers/usb/core/hub.c:601
 usb_hub_port_status drivers/usb/core/hub.c:623 [inline]
 hub_activate+0x4c5/0xf30 drivers/usb/core/hub.c:1133
 hub_resume+0x48/0x1e0 drivers/usb/core/hub.c:3946
 usb_resume_interface drivers/usb/core/driver.c:1359 [inline]
 usb_resume_both+0x3ca/0x580 drivers/usb/core/driver.c:1519
 usb_runtime_resume+0x21/0x30 drivers/usb/core/driver.c:1977
 __rpm_callback+0x296/0x720 drivers/base/power/runtime.c:392
 rpm_callback drivers/base/power/runtime.c:446 [inline]
 rpm_resume+0x9a4/0xf80 drivers/base/power/runtime.c:912
 __pm_runtime_resume+0xdc/0x100 drivers/base/power/runtime.c:1170
 pm_runtime_get_sync include/linux/pm_runtime.h:429 [inline]
 usb_autoresume_device+0x23/0x60 drivers/usb/core/driver.c:1707
 usbdev_open+0xfe/0x480 drivers/usb/core/devio.c:1045
 chrdev_open+0x349/0x3c0 fs/char_dev.c:414
 do_dentry_open+0x5b3/0x930 fs/open.c:920
 vfs_open+0x47/0x50 fs/open.c:1051
 do_open fs/namei.c:3560 [inline]
 path_openat+0x17e6/0x1d00 fs/namei.c:3715
 do_filp_open+0xf6/0x200 fs/namei.c:3742
 do_sys_openat2+0xb5/0x2a0 fs/open.c:1356
 do_sys_open fs/open.c:1372 [inline]
 __do_sys_openat fs/open.c:1388 [inline]
 __se_sys_openat fs/open.c:1383 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1383
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x00000001 -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 6877 Comm: syz-executor.4 Not tainted 6.3.0-syzkaller-05127-g5c7ecada25d2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/04/27 00:26 upstream 5c7ecada25d2 19a3dabe .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.