syzbot


KCSAN: data-race in add_input_randomness / add_input_randomness

Status: auto-closed as invalid on 2020/07/31 12:53
Subsystems: kernel
[Documentation on labels]
First crash: 1405d, last: 1399d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in add_input_randomness / add_input_randomness (3) kernel 13 1117d 1235d 0/26 auto-closed as invalid on 2021/05/09 19:05
upstream KCSAN: data-race in add_input_randomness / add_input_randomness (2) kernel 3 1335d 1363d 0/26 auto-closed as invalid on 2020/10/04 07:48

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

write to 0xffffffff89c25474 of 1 bytes by interrupt on cpu 1:
 add_input_randomness+0x66/0x2c0 drivers/char/random.c:1210
 input_handle_event+0x637/0xd70 drivers/input/input.c:373
 input_event+0x7d/0xa0 drivers/input/input.c:441
 hidinput_hid_event+0xa91/0xba0 drivers/hid/hid-input.c:1392
 hid_process_event+0x2f3/0x3c0 drivers/hid/hid-core.c:1512
 hid_input_field drivers/hid/hid-core.c:1556 [inline]
 hid_report_raw_event+0x8b2/0xbd0 drivers/hid/hid-core.c:1765
 hid_input_report+0x2c9/0x330 drivers/hid/hid-core.c:1832
 hid_irq_in+0x2aa/0x3a0 drivers/hid/usbhid/hid-core.c:284
 __usb_hcd_giveback_urb+0x216/0x290 drivers/usb/core/hcd.c:1650
 usb_hcd_giveback_urb+0xae/0x200 drivers/usb/core/hcd.c:1716
 dummy_timer+0x513/0x2470 drivers/usb/gadget/udc/dummy_hcd.c:1967
 call_timer_fn+0x30/0x2a0 kernel/time/timer.c:1404
 expire_timers+0x116/0x290 kernel/time/timer.c:1449
 __run_timers+0x443/0x500 kernel/time/timer.c:1773
 run_timer_softirq+0x2e/0x60 kernel/time/timer.c:1786
 __do_softirq+0x198/0x360 kernel/softirq.c:292
 asm_call_on_stack+0xf/0x20 arch/x86/entry/entry_64.S:711
 __run_on_irqstack arch/x86/include/asm/irq_stack.h:22 [inline]
 run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:48 [inline]
 do_softirq_own_stack+0x5d/0x80 arch/x86/kernel/irq_64.c:77
 invoke_softirq kernel/softirq.c:387 [inline]
 __irq_exit_rcu+0x115/0x120 kernel/softirq.c:417
 sysvec_apic_timer_interrupt+0xd9/0xf0 arch/x86/kernel/apic/apic.c:1091
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:596
 native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:60
 arch_safe_halt arch/x86/include/asm/paravirt.h:150 [inline]
 acpi_safe_halt drivers/acpi/processor_idle.c:111 [inline]
 acpi_idle_do_entry drivers/acpi/processor_idle.c:525 [inline]
 acpi_idle_enter+0x319/0x650 drivers/acpi/processor_idle.c:651
 cpuidle_enter_state+0x245/0x5d0 drivers/cpuidle/cpuidle.c:234
 cpuidle_enter+0x3c/0x60 drivers/cpuidle/cpuidle.c:345
 call_cpuidle kernel/sched/idle.c:117 [inline]
 cpuidle_idle_call kernel/sched/idle.c:207 [inline]
 do_idle+0x1ce/0x320 kernel/sched/idle.c:269
 cpu_startup_entry+0x15/0x20 kernel/sched/idle.c:365
 start_secondary+0xe3/0x110 arch/x86/kernel/smpboot.c:268
 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243

read to 0xffffffff89c25474 of 1 bytes by interrupt on cpu 0:
 add_input_randomness+0x35/0x2c0 drivers/char/random.c:1207
 input_handle_event+0x6b3/0xd70 drivers/input/input.c:373
 input_event+0x7d/0xa0 drivers/input/input.c:441
 hidinput_hid_event+0xa4d/0xba0 drivers/hid/hid-input.c:1390
 hid_process_event+0x2f3/0x3c0 drivers/hid/hid-core.c:1512
 hid_input_field drivers/hid/hid-core.c:1556 [inline]
 hid_report_raw_event+0x8b2/0xbd0 drivers/hid/hid-core.c:1765
 hid_input_report+0x2c9/0x330 drivers/hid/hid-core.c:1832
 hid_irq_in+0x2aa/0x3a0 drivers/hid/usbhid/hid-core.c:284
 __usb_hcd_giveback_urb+0x216/0x290 drivers/usb/core/hcd.c:1650
 usb_hcd_giveback_urb+0xae/0x200 drivers/usb/core/hcd.c:1716
 dummy_timer+0x513/0x2470 drivers/usb/gadget/udc/dummy_hcd.c:1967
 call_timer_fn+0x30/0x2a0 kernel/time/timer.c:1404
 expire_timers+0x116/0x290 kernel/time/timer.c:1449
 __run_timers+0x443/0x500 kernel/time/timer.c:1773
 run_timer_softirq+0x2e/0x60 kernel/time/timer.c:1786
 __do_softirq+0x198/0x360 kernel/softirq.c:292
 asm_call_on_stack+0xf/0x20 arch/x86/entry/entry_64.S:711
 __run_on_irqstack arch/x86/include/asm/irq_stack.h:22 [inline]
 run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:48 [inline]
 do_softirq_own_stack+0x5d/0x80 arch/x86/kernel/irq_64.c:77
 invoke_softirq kernel/softirq.c:387 [inline]
 __irq_exit_rcu+0x115/0x120 kernel/softirq.c:417
 sysvec_apic_timer_interrupt+0xd9/0xf0 arch/x86/kernel/apic/apic.c:1091
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:596
 should_watch kernel/kcsan/core.c:260 [inline]
 check_access kernel/kcsan/core.c:581 [inline]
 __tsan_read1+0x14c/0x180 kernel/kcsan/core.c:774
 tomoyo_check_acl+0x6a/0x220 security/tomoyo/domain.c:173
 tomoyo_path_permission security/tomoyo/file.c:586 [inline]
 tomoyo_path_perm+0x22f/0x330 security/tomoyo/file.c:838
 tomoyo_inode_getattr+0x18/0x20 security/tomoyo/tomoyo.c:123
 security_inode_getattr+0x7f/0xd0 security/security.c:1278
 vfs_getattr fs/stat.c:121 [inline]
 vfs_statx+0x118/0x2b0 fs/stat.c:206
 vfs_lstat include/linux/fs.h:3301 [inline]
 __do_sys_newlstat fs/stat.c:374 [inline]
 __se_sys_newlstat+0x46/0x250 fs/stat.c:368
 __x64_sys_newlstat+0x2d/0x40 fs/stat.c:368
 do_syscall_64+0x71/0x120 arch/x86/entry/common.c:359
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 30356 Comm: systemd-udevd Not tainted 5.8.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/06/26 12:48 upstream 4a21185cda0f b202c7a8 .config console log report ci2-upstream-kcsan-gce
2020/06/20 12:31 upstream 672f9255a727 c655ec77 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.