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: 13d, 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 113d 113d 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 193d 198d 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 574d 574d 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 0xffff8881026af088 of 4 bytes by task 22112 on cpu 1:
 mon_stop drivers/usb/mon/mon_main.c:166 [inline]
 mon_reader_del+0x1bd/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:431
 ____fput+0x1c/0x30 fs/file_table.c:459
 task_work_run+0x13a/0x1a0 kernel/task_work.c:239
 exit_task_work include/linux/task_work.h:43 [inline]
 do_exit+0x5dd/0x17f0 kernel/exit.c:939
 do_group_exit+0x102/0x150 kernel/exit.c:1088
 get_signal+0xf2a/0x1070 kernel/signal.c:2917
 arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:337
 exit_to_user_mode_loop kernel/entry/common.c:111 [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+0x59/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 0xffff8881026af088 of 4 bytes by task 5308 on cpu 0:
 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: 0 UID: 0 PID: 5308 Comm: kworker/0:4 Tainted: G        W          6.12.0-rc6-syzkaller-00099-g7758b206117d #0
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/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/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.