syzbot


KMSAN: kernel-usb-infoleak in usbnet_write_cmd (3)

Status: fixed on 2022/03/08 16:11
Reported-by: syzbot+003c0a286b9af5412510@syzkaller.appspotmail.com
Fix commit: d668769eb9c5 net: mcs7830: handle usb read errors properly
First crash: 215d, last: 170d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: kernel-usb-infoleak in usbnet_write_cmd (2) 4 579d 603d 0/23 auto-closed as invalid on 2021/05/05 22:17
upstream KMSAN: kernel-usb-infoleak in usbnet_write_cmd 1 1132d 1102d 0/23 auto-closed as invalid on 2019/10/30 07:33
Patch testing requests:
Created Duration User Patch Repo Result
2022/01/06 22:17 15m paskripkin@gmail.com patch https://github.com/google/kmsan.git master OK

Sample crash report:
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: syz
usb 1-1: Manufacturer: syz
usb 1-1: SerialNumber: syz
usb 1-1: config 0 descriptor??
=====================================================
BUG: KMSAN: kernel-usb-infoleak in usb_submit_urb+0x6c1/0x2aa0 drivers/usb/core/urb.c:430
 usb_submit_urb+0x6c1/0x2aa0 drivers/usb/core/urb.c:430
 usb_start_wait_urb+0x153/0x4b0 drivers/usb/core/message.c:58
 usb_internal_control_msg drivers/usb/core/message.c:102 [inline]
 usb_control_msg+0x487/0x7c0 drivers/usb/core/message.c:153
 __usbnet_write_cmd drivers/net/usb/usbnet.c:2050 [inline]
 usbnet_write_cmd+0x3d3/0x480 drivers/net/usb/usbnet.c:2088
 mcs7830_set_reg drivers/net/usb/mcs7830.c:117 [inline]
 mcs7830_hif_set_mac_address drivers/net/usb/mcs7830.c:138 [inline]
 mcs7830_apply_base_config+0xd5/0x8a0 drivers/net/usb/mcs7830.c:387
 mcs7830_bind+0x753/0xb70 drivers/net/usb/mcs7830.c:492
 usbnet_probe+0x1284/0x4140 drivers/net/usb/usbnet.c:1747
 usb_probe_interface+0xf19/0x1600 drivers/usb/core/driver.c:396
 really_probe+0x67d/0x1510 drivers/base/dd.c:596
 __driver_probe_device+0x3e9/0x530 drivers/base/dd.c:751
 driver_probe_device drivers/base/dd.c:781 [inline]
 __device_attach_driver+0x79f/0x1120 drivers/base/dd.c:898
 bus_for_each_drv+0x2d6/0x3f0 drivers/base/bus.c:427
 __device_attach+0x593/0x8e0 drivers/base/dd.c:969
 device_initial_probe+0x4a/0x60 drivers/base/dd.c:1016
 bus_probe_device+0x17b/0x3e0 drivers/base/bus.c:487
 device_add+0x1d3e/0x2400 drivers/base/core.c:3394
 usb_set_configuration+0x37e9/0x3ed0 drivers/usb/core/message.c:2170
 usb_generic_driver_probe+0x13c/0x300 drivers/usb/core/generic.c:238
 usb_probe_device+0x309/0x570 drivers/usb/core/driver.c:293
 really_probe+0x67d/0x1510 drivers/base/dd.c:596
 __driver_probe_device+0x3e9/0x530 drivers/base/dd.c:751
 driver_probe_device drivers/base/dd.c:781 [inline]
 __device_attach_driver+0x79f/0x1120 drivers/base/dd.c:898
 bus_for_each_drv+0x2d6/0x3f0 drivers/base/bus.c:427
 __device_attach+0x593/0x8e0 drivers/base/dd.c:969
 device_initial_probe+0x4a/0x60 drivers/base/dd.c:1016
 bus_probe_device+0x17b/0x3e0 drivers/base/bus.c:487
 device_add+0x1d3e/0x2400 drivers/base/core.c:3394
 usb_new_device+0x1b8e/0x2950 drivers/usb/core/hub.c:2563
 hub_port_connect drivers/usb/core/hub.c:5353 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5497 [inline]
 port_event drivers/usb/core/hub.c:5643 [inline]
 hub_event+0x5ad2/0x8910 drivers/usb/core/hub.c:5725
 process_one_work+0xdb9/0x1820 kernel/workqueue.c:2298
 worker_thread+0x10bc/0x21f0 kernel/workqueue.c:2445
 kthread+0x721/0x850 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30

Uninit was stored to memory at:
 kmemdup+0x107/0x140 mm/util.c:130
 __usbnet_write_cmd drivers/net/usb/usbnet.c:2039 [inline]
 usbnet_write_cmd+0x1a0/0x480 drivers/net/usb/usbnet.c:2088
 mcs7830_set_reg drivers/net/usb/mcs7830.c:117 [inline]
 mcs7830_hif_set_mac_address drivers/net/usb/mcs7830.c:138 [inline]
 mcs7830_apply_base_config+0xd5/0x8a0 drivers/net/usb/mcs7830.c:387
 mcs7830_bind+0x753/0xb70 drivers/net/usb/mcs7830.c:492
 usbnet_probe+0x1284/0x4140 drivers/net/usb/usbnet.c:1747
 usb_probe_interface+0xf19/0x1600 drivers/usb/core/driver.c:396
 really_probe+0x67d/0x1510 drivers/base/dd.c:596
 __driver_probe_device+0x3e9/0x530 drivers/base/dd.c:751
 driver_probe_device drivers/base/dd.c:781 [inline]
 __device_attach_driver+0x79f/0x1120 drivers/base/dd.c:898
 bus_for_each_drv+0x2d6/0x3f0 drivers/base/bus.c:427
 __device_attach+0x593/0x8e0 drivers/base/dd.c:969
 device_initial_probe+0x4a/0x60 drivers/base/dd.c:1016
 bus_probe_device+0x17b/0x3e0 drivers/base/bus.c:487
 device_add+0x1d3e/0x2400 drivers/base/core.c:3394
 usb_set_configuration+0x37e9/0x3ed0 drivers/usb/core/message.c:2170
 usb_generic_driver_probe+0x13c/0x300 drivers/usb/core/generic.c:238
 usb_probe_device+0x309/0x570 drivers/usb/core/driver.c:293
 really_probe+0x67d/0x1510 drivers/base/dd.c:596
 __driver_probe_device+0x3e9/0x530 drivers/base/dd.c:751
 driver_probe_device drivers/base/dd.c:781 [inline]
 __device_attach_driver+0x79f/0x1120 drivers/base/dd.c:898
 bus_for_each_drv+0x2d6/0x3f0 drivers/base/bus.c:427
 __device_attach+0x593/0x8e0 drivers/base/dd.c:969
 device_initial_probe+0x4a/0x60 drivers/base/dd.c:1016
 bus_probe_device+0x17b/0x3e0 drivers/base/bus.c:487
 device_add+0x1d3e/0x2400 drivers/base/core.c:3394
 usb_new_device+0x1b8e/0x2950 drivers/usb/core/hub.c:2563
 hub_port_connect drivers/usb/core/hub.c:5353 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5497 [inline]
 port_event drivers/usb/core/hub.c:5643 [inline]
 hub_event+0x5ad2/0x8910 drivers/usb/core/hub.c:5725
 process_one_work+0xdb9/0x1820 kernel/workqueue.c:2298
 worker_thread+0x10bc/0x21f0 kernel/workqueue.c:2445
 kthread+0x721/0x850 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30

Uninit was stored to memory at:
 __dev_addr_set include/linux/netdevice.h:4655 [inline]
 eth_hw_addr_set include/linux/etherdevice.h:319 [inline]
 mcs7830_bind+0x230/0xb70 drivers/net/usb/mcs7830.c:488
 usbnet_probe+0x1284/0x4140 drivers/net/usb/usbnet.c:1747
 usb_probe_interface+0xf19/0x1600 drivers/usb/core/driver.c:396
 really_probe+0x67d/0x1510 drivers/base/dd.c:596
 __driver_probe_device+0x3e9/0x530 drivers/base/dd.c:751
 driver_probe_device drivers/base/dd.c:781 [inline]
 __device_attach_driver+0x79f/0x1120 drivers/base/dd.c:898
 bus_for_each_drv+0x2d6/0x3f0 drivers/base/bus.c:427
 __device_attach+0x593/0x8e0 drivers/base/dd.c:969
 device_initial_probe+0x4a/0x60 drivers/base/dd.c:1016
 bus_probe_device+0x17b/0x3e0 drivers/base/bus.c:487
 device_add+0x1d3e/0x2400 drivers/base/core.c:3394
 usb_set_configuration+0x37e9/0x3ed0 drivers/usb/core/message.c:2170
 usb_generic_driver_probe+0x13c/0x300 drivers/usb/core/generic.c:238
 usb_probe_device+0x309/0x570 drivers/usb/core/driver.c:293
 really_probe+0x67d/0x1510 drivers/base/dd.c:596
 __driver_probe_device+0x3e9/0x530 drivers/base/dd.c:751
 driver_probe_device drivers/base/dd.c:781 [inline]
 __device_attach_driver+0x79f/0x1120 drivers/base/dd.c:898
 bus_for_each_drv+0x2d6/0x3f0 drivers/base/bus.c:427
 __device_attach+0x593/0x8e0 drivers/base/dd.c:969
 device_initial_probe+0x4a/0x60 drivers/base/dd.c:1016
 bus_probe_device+0x17b/0x3e0 drivers/base/bus.c:487
 device_add+0x1d3e/0x2400 drivers/base/core.c:3394
 usb_new_device+0x1b8e/0x2950 drivers/usb/core/hub.c:2563
 hub_port_connect drivers/usb/core/hub.c:5353 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5497 [inline]
 port_event drivers/usb/core/hub.c:5643 [inline]
 hub_event+0x5ad2/0x8910 drivers/usb/core/hub.c:5725
 process_one_work+0xdb9/0x1820 kernel/workqueue.c:2298
 worker_thread+0x10bc/0x21f0 kernel/workqueue.c:2445
 kthread+0x721/0x850 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30

Local variable addr created at:
 mcs7830_bind+0x9b/0xb70 drivers/net/usb/mcs7830.c:476
 usbnet_probe+0x1284/0x4140 drivers/net/usb/usbnet.c:1747

Bytes 0-3 of 6 are uninitialized
Memory access of size 6 starts at ffff88811d26f2b0

CPU: 1 PID: 19 Comm: kworker/1:0 Not tainted 5.16.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: usb_hub_wq hub_event
=====================================================

Crashes (256):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kmsan-gce 2022/01/04 18:11 https://github.com/google/kmsan.git master 81c325bbf94e 0a2584dd .config log report syz C KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/18 14:35 https://github.com/google/kmsan.git master 85cfd6e539bd 3cd800e4 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/18 08:50 https://github.com/google/kmsan.git master 85cfd6e539bd 3cd800e4 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/18 03:22 https://github.com/google/kmsan.git master 85cfd6e539bd 3cd800e4 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/17 20:05 https://github.com/google/kmsan.git master 85cfd6e539bd 3cd800e4 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/17 13:11 https://github.com/google/kmsan.git master 85cfd6e539bd 2bea8a27 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/17 10:01 https://github.com/google/kmsan.git master 85cfd6e539bd 2bea8a27 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/17 07:14 https://github.com/google/kmsan.git master 85cfd6e539bd 2bea8a27 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/17 03:17 https://github.com/google/kmsan.git master 85cfd6e539bd 2bea8a27 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/17 03:08 https://github.com/google/kmsan.git master 85cfd6e539bd 2bea8a27 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/16 22:25 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/16 20:00 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/16 17:16 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/16 13:15 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/16 11:51 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/16 07:26 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/16 01:45 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/16 00:09 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/15 17:25 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/15 15:54 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/15 09:25 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/15 03:30 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/15 02:10 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/15 00:41 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/14 07:24 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/14 05:39 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/14 04:15 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/14 02:02 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/13 17:46 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/13 14:16 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/13 13:05 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/13 05:10 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/13 01:52 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/12 23:46 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/12 22:04 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/12 19:56 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/12 14:42 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/12 13:38 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/12 12:11 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/12 10:17 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/12 06:34 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/12 04:13 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/12 03:52 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/11 21:58 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/11 17:03 https://github.com/google/kmsan.git master 85cfd6e539bd 0b33604d .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/11 11:52 https://github.com/google/kmsan.git master 85cfd6e539bd 0b33604d .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/11 00:02 https://github.com/google/kmsan.git master 85cfd6e539bd 0b33604d .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/10 17:54 https://github.com/google/kmsan.git master 85cfd6e539bd 0b33604d .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/02/10 08:17 https://github.com/google/kmsan.git master 85cfd6e539bd 0b33604d .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce 2022/01/04 16:57 https://github.com/google/kmsan.git master 81c325bbf94e 0a2584dd .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce-386 2022/02/14 22:54 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd
ci-upstream-kmsan-gce-386 2022/02/14 09:44 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config log report info KMSAN: kernel-usb-infoleak in usbnet_write_cmd