syzbot


KMSAN: uninit-value in dummy_timer

Status: closed as invalid on 2019/10/08 12:18
Subsystems: usb
[Documentation on labels]
First crash: 2004d, last: 1942d

Sample crash report:
radio-si470x 1-1:0.128: non-zero urb status (-71)
usb 1-1:0.128: non-zero urb status (-71)
==================================================================
BUG: KMSAN: uninit-value in dummy_timer+0x8d3/0x6770 drivers/usb/gadget/udc/dummy_hcd.c:1821
CPU: 0 PID: 12 Comm: kworker/0:1 Not tainted 5.2.0+ #15
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: usb_hub_wq hub_event
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x191/0x1f0 lib/dump_stack.c:113
 kmsan_report+0x162/0x2d0 mm/kmsan/kmsan_report.c:109
 __msan_warning+0x75/0xe0 mm/kmsan/kmsan_instr.c:294
 dummy_timer+0x8d3/0x6770 drivers/usb/gadget/udc/dummy_hcd.c:1821
 call_timer_fn+0x222/0x520 kernel/time/timer.c:1322
 expire_timers kernel/time/timer.c:1366 [inline]
 __run_timers+0xcdc/0x11a0 kernel/time/timer.c:1685
 run_timer_softirq+0x2d/0x50 kernel/time/timer.c:1698
 __do_softirq+0x4ad/0x858 kernel/softirq.c:293
 invoke_softirq kernel/softirq.c:375 [inline]
 irq_exit+0x238/0x290 kernel/softirq.c:416
 exiting_irq+0xe/0x10 arch/x86/include/asm/apic.h:536
 smp_apic_timer_interrupt+0x48/0x70 arch/x86/kernel/apic/apic.c:1070
 apic_timer_interrupt+0x2e/0x40 arch/x86/entry/entry_64.S:813
 </IRQ>
RIP: 0010:__msan_instrument_asm_store+0xf9/0x150 mm/kmsan/kmsan_instr.c:75
Code: df 4c 89 f6 31 d2 e8 46 dc ff ff 65 ff 0d b3 65 03 7e 65 8b 05 ac 65 03 7e 85 c0 75 2e e8 5f b1 3b ff 4c 89 7d d0 ff 75 d0 9d <65> 48 8b 04 25 28 00 00 00 48 3b 45 e0 75 0b 48 83 c4 18 5b 41 5e
RSP: 0018:ffff88812807f598 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13
RAX: 0000000000000000 RBX: ffffffff8f6f7950 RCX: 0000000000000003
RDX: 0000000000000002 RSI: fffffdffffffffff RDI: ffffffff8f6f7958
RBP: ffff88812807f5c8 R08: 0000000000000000 R09: 0000778000000000
R10: ffffd0ffffffffff R11: 0000100000000000 R12: ffff88812d70dac0
R13: 0000000000000000 R14: 0000000000000008 R15: 0000000000000286
 arch_atomic64_cmpxchg arch/x86/include/asm/atomic64_64.h:180 [inline]
 atomic64_cmpxchg include/asm-generic/atomic-instrumented.h:1464 [inline]
 atomic_long_cmpxchg_release include/asm-generic/atomic-long.h:424 [inline]
 __mutex_unlock_fast kernel/locking/mutex.c:155 [inline]
 mutex_unlock+0x38/0x90 kernel/locking/mutex.c:711
 kernfs_drain fs/kernfs/dir.c:464 [inline]
 __kernfs_remove+0xa5d/0x11e0 fs/kernfs/dir.c:1319
 kernfs_remove_by_name_ns+0x115/0x1f0 fs/kernfs/dir.c:1512
 sysfs_remove_file_ns+0xc9/0xf0 fs/sysfs/file.c:469
 sysfs_remove_file include/linux/sysfs.h:519 [inline]
 device_remove_file drivers/base/core.c:1575 [inline]
 device_del+0xa0b/0x1c50 drivers/base/core.c:2272
 usb_disable_device+0x567/0x1150 drivers/usb/core/message.c:1241
 usb_disconnect+0x51e/0xd60 drivers/usb/core/hub.c:2197
 hub_port_connect drivers/usb/core/hub.c:4940 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5204 [inline]
 port_event drivers/usb/core/hub.c:5350 [inline]
 hub_event+0x4003/0x7320 drivers/usb/core/hub.c:5432
 process_one_work+0x1572/0x1f00 kernel/workqueue.c:2269
 process_scheduled_works kernel/workqueue.c:2331 [inline]
 worker_thread+0x189c/0x2460 kernel/workqueue.c:2417
 kthread+0x4b5/0x4f0 kernel/kthread.c:256
 ret_from_fork+0x35/0x40 arch/x86/entry/entry_64.S:355

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:187 [inline]
 kmsan_internal_chain_origin+0xcc/0x150 mm/kmsan/kmsan.c:345
 __msan_chain_origin+0x6b/0xe0 mm/kmsan/kmsan_instr.c:190
 dummy_urb_enqueue+0x604/0xe10 drivers/usb/gadget/udc/dummy_hcd.c:1252
 usb_hcd_submit_urb+0x672/0x38d0 drivers/usb/core/hcd.c:1656
 usb_submit_urb+0x1ef3/0x1f50 drivers/usb/core/urb.c:571
 si470x_int_in_callback+0x3f7/0x1010 drivers/media/radio/si470x/radio-si470x-usb.c:465
 __usb_hcd_giveback_urb+0x4a7/0x630 drivers/usb/core/hcd.c:1758
 usb_hcd_giveback_urb+0x189/0x670 drivers/usb/core/hcd.c:1823
 dummy_timer+0xab0/0x6770 drivers/usb/gadget/udc/dummy_hcd.c:1965
 call_timer_fn+0x222/0x520 kernel/time/timer.c:1322
 expire_timers kernel/time/timer.c:1366 [inline]
 __run_timers+0xcdc/0x11a0 kernel/time/timer.c:1685
 run_timer_softirq+0x2d/0x50 kernel/time/timer.c:1698
 __do_softirq+0x4ad/0x858 kernel/softirq.c:293
 invoke_softirq kernel/softirq.c:375 [inline]
 irq_exit+0x238/0x290 kernel/softirq.c:416
 exiting_irq+0xe/0x10 arch/x86/include/asm/apic.h:536
 smp_apic_timer_interrupt+0x48/0x70 arch/x86/kernel/apic/apic.c:1070
 apic_timer_interrupt+0x2e/0x40 arch/x86/entry/entry_64.S:813
 native_restore_fl arch/x86/include/asm/irqflags.h:41 [inline]
 console_unlock+0x1936/0x1cd0 arch/x86/include/asm/irqflags.h:84
 vprintk_emit+0x47a/0x8a0 kernel/printk/printk.c:1998
 vprintk_default+0x90/0xa0 kernel/printk/printk.c:2025
 vprintk_func+0x635/0x810 kernel/printk/printk_safe.c:386
 printk+0x180/0x1c3 kernel/printk/printk.c:2058
 really_probe+0x1b28/0x1d90 drivers/base/dd.c:577
 driver_probe_device+0x1ba/0x510 drivers/base/dd.c:670
 __device_attach_driver+0x5b8/0x790 drivers/base/dd.c:777
 bus_for_each_drv+0x28e/0x3b0 drivers/base/bus.c:454
 __device_attach+0x489/0x750 drivers/base/dd.c:843
 device_initial_probe+0x4a/0x60 drivers/base/dd.c:890
 bus_probe_device+0x131/0x390 drivers/base/bus.c:514
 device_add+0x25b5/0x2df0 drivers/base/core.c:2111
 usb_set_configuration+0x309f/0x3710 drivers/usb/core/message.c:2027
 generic_probe+0xe7/0x280 drivers/usb/core/generic.c:210
 usb_probe_device+0x146/0x200 drivers/usb/core/driver.c:266
 really_probe+0x1344/0x1d90 drivers/base/dd.c:513
 driver_probe_device+0x1ba/0x510 drivers/base/dd.c:670
 __device_attach_driver+0x5b8/0x790 drivers/base/dd.c:777
 bus_for_each_drv+0x28e/0x3b0 drivers/base/bus.c:454
 __device_attach+0x489/0x750 drivers/base/dd.c:843
 device_initial_probe+0x4a/0x60 drivers/base/dd.c:890
 bus_probe_device+0x131/0x390 drivers/base/bus.c:514
 device_add+0x25b5/0x2df0 drivers/base/core.c:2111
 usb_new_device+0x23e5/0x2fb0 drivers/usb/core/hub.c:2534
 hub_port_connect drivers/usb/core/hub.c:5089 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5204 [inline]
 port_event drivers/usb/core/hub.c:5350 [inline]
 hub_event+0x5853/0x7320 drivers/usb/core/hub.c:5432
 process_one_work+0x1572/0x1f00 kernel/workqueue.c:2269
 process_scheduled_works kernel/workqueue.c:2331 [inline]
 worker_thread+0x189c/0x2460 kernel/workqueue.c:2417
 kthread+0x4b5/0x4f0 kernel/kthread.c:256
 ret_from_fork+0x35/0x40 arch/x86/entry/entry_64.S:355

Uninit was created at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:187 [inline]
 kmsan_internal_poison_shadow+0x53/0xa0 mm/kmsan/kmsan.c:146
 kmsan_slab_free+0x8d/0x100 mm/kmsan/kmsan_hooks.c:195
 slab_free_freelist_hook mm/slub.c:1449 [inline]
 slab_free mm/slub.c:3019 [inline]
 kfree+0x4b2/0x2960 mm/slub.c:3975
 si470x_usb_driver_probe+0xa6f/0x31d0 drivers/media/radio/si470x/radio-si470x-usb.c:764
 usb_probe_interface+0xd19/0x1310 drivers/usb/core/driver.c:361
 really_probe+0x1344/0x1d90 drivers/base/dd.c:513
 driver_probe_device+0x1ba/0x510 drivers/base/dd.c:670
 __device_attach_driver+0x5b8/0x790 drivers/base/dd.c:777
 bus_for_each_drv+0x28e/0x3b0 drivers/base/bus.c:454
 __device_attach+0x489/0x750 drivers/base/dd.c:843
 device_initial_probe+0x4a/0x60 drivers/base/dd.c:890
 bus_probe_device+0x131/0x390 drivers/base/bus.c:514
 device_add+0x25b5/0x2df0 drivers/base/core.c:2111
 usb_set_configuration+0x309f/0x3710 drivers/usb/core/message.c:2027
 generic_probe+0xe7/0x280 drivers/usb/core/generic.c:210
 usb_probe_device+0x146/0x200 drivers/usb/core/driver.c:266
 really_probe+0x1344/0x1d90 drivers/base/dd.c:513
 driver_probe_device+0x1ba/0x510 drivers/base/dd.c:670
 __device_attach_driver+0x5b8/0x790 drivers/base/dd.c:777
 bus_for_each_drv+0x28e/0x3b0 drivers/base/bus.c:454
 __device_attach+0x489/0x750 drivers/base/dd.c:843
 device_initial_probe+0x4a/0x60 drivers/base/dd.c:890
 bus_probe_device+0x131/0x390 drivers/base/bus.c:514
 device_add+0x25b5/0x2df0 drivers/base/core.c:2111
 usb_new_device+0x23e5/0x2fb0 drivers/usb/core/hub.c:2534
 hub_port_connect drivers/usb/core/hub.c:5089 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5204 [inline]
 port_event drivers/usb/core/hub.c:5350 [inline]
 hub_event+0x5853/0x7320 drivers/usb/core/hub.c:5432
 process_one_work+0x1572/0x1f00 kernel/workqueue.c:2269
 process_scheduled_works kernel/workqueue.c:2331 [inline]
 worker_thread+0x189c/0x2460 kernel/workqueue.c:2417
 kthread+0x4b5/0x4f0 kernel/kthread.c:256
 ret_from_fork+0x35/0x40 arch/x86/entry/entry_64.S:355
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/08/05 04:50 https://github.com/google/kmsan.git master beaab8a31e0d 6affd8e8 .config console log report syz C ci-upstream-kmsan-gce
2019/08/04 00:12 https://github.com/google/kmsan.git master beaab8a31e0d 6affd8e8 .config console log report syz C ci-upstream-kmsan-gce
2019/10/05 20:28 https://github.com/google/kmsan.git master 1e76a3e537c3 f3f7d9c8 .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.