syzbot


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

Status: upstream: reported on 2024/11/07 11:23
Subsystems: usb
[Documentation on labels]
Reported-by: syzbot+c683dd44ac477cf58d36@syzkaller.appspotmail.com
First crash: 28d, last: 13d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [usb?] KCSAN: data-race in mon_reader_del / usb_hcd_submit_urb (4) 0 (1) 2024/11/07 11:23
Similar bugs (3)
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 128d 128d 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 208d 212d 0/28 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 589d 589d 0/28 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 0xffff88810015c088 of 4 bytes by task 13874 on cpu 0:
 mon_stop drivers/usb/mon/mon_main.c:174 [inline]
 mon_reader_del+0x20a/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
 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:329 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0xa8/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 0xffff88810015c088 of 4 bytes by task 24 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]
 port_event drivers/usb/core/hub.c:5714 [inline]
 hub_event+0x538/0x2910 drivers/usb/core/hub.c:5903
 process_one_work kernel/workqueue.c:3229 [inline]
 process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3310
 worker_thread+0x51d/0x6f0 kernel/workqueue.c:3391
 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: 24 Comm: kworker/1:0 Not tainted 6.12.0-syzkaller-07749-g28eb75e178d3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
Workqueue: usb_hub_wq hub_event
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/22 14:23 upstream 28eb75e178d3 4b25d554 .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
2024/11/07 07:17 upstream 7758b206117d df3dc63b .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.