syzbot


KMSAN: uninit-value in sr9800_bind

Status: fixed on 2019/11/04 14:50
Subsystems: usb
[Documentation on labels]
Reported-by: syzbot+f1842130bbcfb335bac1@syzkaller.appspotmail.com
Fix commit: 77b6d09f4ae6 net: usb: sr9800: fix uninitialized local variable
First crash: 1757d, last: 1677d
Discussions (18)
Title Replies (including bot) Last reply
[PATCH AUTOSEL 4.14 01/33] iommu/arm-smmu: Free context bitmap in the err path of arm_smmu_init_domain_context 37 (37) 2020/09/08 12:12
[PATCH 4.19 000/149] 4.19.82-stable review 169 (169) 2019/11/11 09:36
[PATCH 4.9 00/62] 4.9.199-stable review 72 (72) 2019/11/06 11:17
[PATCH 5.3 000/163] 5.3.9-stable review 174 (174) 2019/11/06 10:49
[PATCH 4.14 00/95] 4.14.152-stable review 102 (102) 2019/11/05 23:37
[PATCH 4.4 00/46] 4.4.199-stable review 52 (52) 2019/11/05 23:36
[PATCH AUTOSEL 4.4 01/17] iommu/arm-smmu: Free context bitmap in the err path of arm_smmu_init_domain_context 16 (16) 2019/10/26 13:23
[PATCH AUTOSEL 4.9 01/21] iommu/arm-smmu: Free context bitmap in the err path of arm_smmu_init_domain_context 20 (20) 2019/10/26 13:22
[PATCH AUTOSEL 4.19 01/59] tools: bpf: Use !building_out_of_srctree to determine srctree 59 (59) 2019/10/26 13:19
[PATCH AUTOSEL 5.3 01/99] tools: bpf: Use !building_out_of_srctree to determine srctree 98 (98) 2019/10/26 13:16
[PATCH AUTOSEL 4.19 01/37] PCI/ASPM: Do not initialize link state when aspm_disabled is set 37 (37) 2019/10/26 07:44
[PATCH AUTOSEL 5.3 01/33] net: ipv6: fix listify ip6_rcv_finish in case of forwarding 35 (35) 2019/10/25 15:49
[PATCH AUTOSEL 4.9 01/20] PCI/ASPM: Do not initialize link state when aspm_disabled is set 20 (20) 2019/10/25 15:32
[PATCH AUTOSEL 4.4 01/16] PCI/ASPM: Do not initialize link state when aspm_disabled is set 16 (16) 2019/10/25 13:58
[PATCH AUTOSEL 4.14 01/25] PCI/ASPM: Do not initialize link state when aspm_disabled is set 24 (24) 2019/10/25 13:57
[PATCH] net: usb: sr9800: fix uninitialized local variable 2 (2) 2019/10/16 04:02
Reminder: 67 active syzbot reports in usb subsystem 1 (1) 2019/10/04 03:38
KMSAN: uninit-value in sr9800_bind 0 (1) 2019/10/03 03:39

Sample crash report:
CoreChips 2-1:0.159 (unnamed net_device) (uninitialized): Error reading RX_CTL register:ffffffb9
CoreChips 2-1:0.159 (unnamed net_device) (uninitialized): Failed to enable software MII access
CoreChips 2-1:0.159 (unnamed net_device) (uninitialized): Failed to enable hardware MII access
=====================================================
BUG: KMSAN: uninit-value in usbnet_probe+0x10ae/0x3960 drivers/net/usb/usbnet.c:1722
CPU: 1 PID: 11159 Comm: kworker/1:4 Not tainted 5.3.0-rc7+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: usb_hub_wq hub_event
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x191/0x1f0 lib/dump_stack.c:113
 kmsan_report+0x13a/0x2b0 mm/kmsan/kmsan_report.c:108
 __msan_warning+0x73/0xe0 mm/kmsan/kmsan_instr.c:250
 sr_get_phyid drivers/net/usb/sr9800.c:380 [inline]
 sr9800_bind+0xd39/0x1b10 drivers/net/usb/sr9800.c:800
 usbnet_probe+0x10ae/0x3960 drivers/net/usb/usbnet.c:1722
 usb_probe_interface+0xd19/0x1310 drivers/usb/core/driver.c:361
 really_probe+0x1373/0x1dc0 drivers/base/dd.c:552
 driver_probe_device+0x1ba/0x510 drivers/base/dd.c:709
 __device_attach_driver+0x5b8/0x790 drivers/base/dd.c:816
 bus_for_each_drv+0x28e/0x3b0 drivers/base/bus.c:454
 __device_attach+0x489/0x750 drivers/base/dd.c:882
 device_initial_probe+0x4a/0x60 drivers/base/dd.c:929
 bus_probe_device+0x131/0x390 drivers/base/bus.c:514
 device_add+0x25b5/0x2df0 drivers/base/core.c:2165
 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+0x1373/0x1dc0 drivers/base/dd.c:552
 driver_probe_device+0x1ba/0x510 drivers/base/dd.c:709
 __device_attach_driver+0x5b8/0x790 drivers/base/dd.c:816
 bus_for_each_drv+0x28e/0x3b0 drivers/base/bus.c:454
 __device_attach+0x489/0x750 drivers/base/dd.c:882
 device_initial_probe+0x4a/0x60 drivers/base/dd.c:929
 bus_probe_device+0x131/0x390 drivers/base/bus.c:514
 device_add+0x25b5/0x2df0 drivers/base/core.c:2165
 usb_new_device+0x23e5/0x2fb0 drivers/usb/core/hub.c:2536
 hub_port_connect drivers/usb/core/hub.c:5098 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5213 [inline]
 port_event drivers/usb/core/hub.c:5359 [inline]
 hub_event+0x581d/0x72f0 drivers/usb/core/hub.c:5441
 process_one_work+0x1572/0x1ef0 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

Local variable description: ----res@sr_mdio_read
Variable was created at:
 sr_mdio_read+0x78/0x360 drivers/net/usb/sr9800.c:341
 sr_get_phyid drivers/net/usb/sr9800.c:379 [inline]
 sr9800_bind+0xce9/0x1b10 drivers/net/usb/sr9800.c:800
=====================================================

Crashes (27):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/09/28 10:24 https://github.com/google/kmsan.git master 124037e07586 d8074e0b .config console log report syz C ci-upstream-kmsan-gce
2019/10/26 04:11 https://github.com/google/kmsan.git master d86c15562d02 c2e837da .config console log report ci-upstream-kmsan-gce
2019/10/26 04:09 https://github.com/google/kmsan.git master d86c15562d02 c2e837da .config console log report ci-upstream-kmsan-gce
2019/10/25 05:47 https://github.com/google/kmsan.git master d86c15562d02 d01bb02a .config console log report ci-upstream-kmsan-gce
2019/10/22 03:11 https://github.com/google/kmsan.git master 3c8ca70889aa b24d2b8a .config console log report ci-upstream-kmsan-gce
2019/10/21 21:03 https://github.com/google/kmsan.git master 3c8ca70889aa b24d2b8a .config console log report ci-upstream-kmsan-gce
2019/10/21 17:47 https://github.com/google/kmsan.git master 3c8ca70889aa b24d2b8a .config console log report ci-upstream-kmsan-gce
2019/10/10 02:24 https://github.com/google/kmsan.git master dc327ecad3b0 c4b9981b .config console log report ci-upstream-kmsan-gce
2019/10/05 03:32 https://github.com/google/kmsan.git master 1e76a3e537c3 f3f7d9c8 .config console log report ci-upstream-kmsan-gce
2019/10/04 11:30 https://github.com/google/kmsan.git master 1e76a3e537c3 fc17ba49 .config console log report ci-upstream-kmsan-gce
2019/10/04 08:03 https://github.com/google/kmsan.git master 1e76a3e537c3 fc17ba49 .config console log report ci-upstream-kmsan-gce
2019/10/03 21:03 https://github.com/google/kmsan.git master 1e76a3e537c3 fc17ba49 .config console log report ci-upstream-kmsan-gce
2019/10/03 20:50 https://github.com/google/kmsan.git master 1e76a3e537c3 fc17ba49 .config console log report ci-upstream-kmsan-gce
2019/10/03 04:52 https://github.com/google/kmsan.git master 1e76a3e537c3 2e29b534 .config console log report ci-upstream-kmsan-gce
2019/10/01 23:11 https://github.com/google/kmsan.git master f5f9d3ce4686 b7a87a83 .config console log report ci-upstream-kmsan-gce
2019/09/30 08:11 https://github.com/google/kmsan.git master 124037e07586 c1ad5441 .config console log report ci-upstream-kmsan-gce
2019/09/30 01:57 https://github.com/google/kmsan.git master 124037e07586 c1ad5441 .config console log report ci-upstream-kmsan-gce
2019/09/29 06:30 https://github.com/google/kmsan.git master 124037e07586 eb6b9855 .config console log report ci-upstream-kmsan-gce
2019/09/28 08:16 https://github.com/google/kmsan.git master 124037e07586 d8074e0b .config console log report ci-upstream-kmsan-gce
2019/09/26 02:37 https://github.com/google/kmsan.git master cebbfdbcf2b7 a3355dba .config console log report ci-upstream-kmsan-gce
2019/09/25 23:57 https://github.com/google/kmsan.git master cebbfdbcf2b7 a3355dba .config console log report ci-upstream-kmsan-gce
2019/09/18 20:12 https://github.com/google/kmsan.git master cebbfdbcf2b7 c2dcd700 .config console log report ci-upstream-kmsan-gce
2019/09/17 22:33 https://github.com/google/kmsan.git master cebbfdbcf2b7 13dcda9b .config console log report ci-upstream-kmsan-gce
2019/09/09 11:59 https://github.com/google/kmsan.git master 014077b5cd62 a60cb4cd .config console log report ci-upstream-kmsan-gce
2019/08/14 23:12 https://github.com/google/kmsan.git master 61ccdad1fcdf 5576551b .config console log report ci-upstream-kmsan-gce
2019/08/14 23:06 https://github.com/google/kmsan.git master 61ccdad1fcdf 5576551b .config console log report ci-upstream-kmsan-gce
2019/08/07 02:54 https://github.com/google/kmsan.git master ae0c578a3cdf c6f01e54 .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.