syzbot


KMSAN: uninit-value in read_sensor_register

Status: fixed on 2019/10/15 23:40
Subsystems: media usb
[Documentation on labels]
Reported-by: syzbot+06ddf1788cfd048c5e82@syzkaller.appspotmail.com
Fix commit: 4843a543fad3 media: gspca: zero usb_buf on error
First crash: 2011d, last: 1880d
Discussions (21)
Title Replies (including bot) Last reply
[PATCH 5.2 000/313] 5.2.19-stable review 324 (324) 2020/06/23 22:07
[PATCH 4.19 000/211] 4.19.77-stable review 227 (227) 2019/11/12 00:25
[PATCH 5.3 000/344] 5.3.4-stable review 360 (360) 2019/11/11 06:01
Re: KMSAN: uninit-value in read_sensor_register 1 (1) 2019/10/08 09:56
[PATCH 4.14 000/185] 4.14.147-stable review 191 (191) 2019/10/05 00:10
[PATCH 4.9 000/129] 4.9.195-stable review 135 (135) 2019/10/04 22:56
[PATCH 4.4 00/99] 4.4.195-stable review 105 (105) 2019/10/04 22:55
[PATCH AUTOSEL 5.2 001/185] ALSA: hda: Flush interrupts on disabling 191 (191) 2019/10/02 19:16
[PATCH AUTOSEL 5.3 001/203] ALSA: hda: Flush interrupts on disabling 217 (217) 2019/10/02 14:35
[PATCH AUTOSEL 4.4 01/44] ALSA: hda: Flush interrupts on disabling 44 (44) 2019/09/22 19:01
[PATCH AUTOSEL 4.9 01/60] ALSA: hda: Flush interrupts on disabling 60 (60) 2019/09/22 18:59
[PATCH AUTOSEL 4.14 01/89] ALSA: hda: Flush interrupts on disabling 89 (89) 2019/09/22 18:57
[PATCH AUTOSEL 4.19 001/128] ALSA: hda: Flush interrupts on disabling 128 (128) 2019/09/22 18:54
[PATCHv2] gspca: zero usb_buf on error 1 (1) 2019/08/16 06:38
[PATCH] gspca: zero usb_buf on error 3 (3) 2019/08/16 05:48
Reminder: 35 open syzbot bugs in media subsystem 1 (1) 2019/07/24 01:39
Reminder: 67 open syzbot bugs in usb subsystem 1 (1) 2019/07/24 01:35
Reminder: 47 open syzbot bugs in usb subsystem 1 (1) 2019/07/09 19:01
Reminder: 28 open syzbot bugs in media subsystem 1 (1) 2019/06/27 03:53
Reminder: 42 open syzbot bugs in usb subsystem 1 (1) 2019/06/25 03:44
KMSAN: uninit-value in read_sensor_register 0 (1) 2019/06/07 21:53
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in read_sensor_register (2) media usb C 44 1862d 1879d 15/28 fixed on 2020/02/18 14:31
Last patch testing requests (1)
Created Duration User Patch Repo Result
2019/08/15 08:27 20m hverkuil@xs4all.nl patch https://github.com/google/kmsan.git master OK

Sample crash report:
usb 1-1: config 0 has an invalid interface number: 110 but max is 0
usb 1-1: config 0 has no interface number 0
usb 1-1: New USB device found, idVendor=0ac8, idProduct=c301, bcdDevice= 1.4a
usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
usb 1-1: config 0 descriptor??
gspca_main: vc032x-2.14.0 probing 0ac8:c301
gspca_vc032x: reg_w err -71
==================================================================
BUG: KMSAN: uninit-value in read_sensor_register+0x732/0x26a0 drivers/media/usb/gspca/vc032x.c:2975
CPU: 1 PID: 33 Comm: kworker/1:1 Not tainted 5.1.0+ #1
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+0x130/0x2a0 mm/kmsan/kmsan.c:622
 __msan_warning+0x75/0xe0 mm/kmsan/kmsan_instr.c:310
 read_sensor_register+0x732/0x26a0 drivers/media/usb/gspca/vc032x.c:2975
 vc032x_probe_sensor drivers/media/usb/gspca/vc032x.c:3036 [inline]
 sd_init+0x2f94/0x5330 drivers/media/usb/gspca/vc032x.c:3167
 gspca_dev_probe2+0xee0/0x2240 drivers/media/usb/gspca/gspca.c:1546
 gspca_dev_probe+0x346/0x3b0 drivers/media/usb/gspca/gspca.c:1619
 sd_probe+0x8d/0xa0 drivers/media/usb/gspca/gl860/gl860.c:523
 usb_probe_interface+0xd66/0x1320 drivers/usb/core/driver.c:361
 really_probe+0xdae/0x1d80 drivers/base/dd.c:513
 driver_probe_device+0x1b3/0x4f0 drivers/base/dd.c:671
 __device_attach_driver+0x5b8/0x790 drivers/base/dd.c:778
 bus_for_each_drv+0x28e/0x3b0 drivers/base/bus.c:454
 __device_attach+0x454/0x730 drivers/base/dd.c:844
 device_initial_probe+0x4a/0x60 drivers/base/dd.c:891
 bus_probe_device+0x137/0x390 drivers/base/bus.c:514
 device_add+0x288d/0x30e0 drivers/base/core.c:2106
 usb_set_configuration+0x30dc/0x3750 drivers/usb/core/message.c:2027
 generic_probe+0xe7/0x280 drivers/usb/core/generic.c:210
 usb_probe_device+0x14c/0x200 drivers/usb/core/driver.c:266
 really_probe+0xdae/0x1d80 drivers/base/dd.c:513
 driver_probe_device+0x1b3/0x4f0 drivers/base/dd.c:671
 __device_attach_driver+0x5b8/0x790 drivers/base/dd.c:778
 bus_for_each_drv+0x28e/0x3b0 drivers/base/bus.c:454
 __device_attach+0x454/0x730 drivers/base/dd.c:844
 device_initial_probe+0x4a/0x60 drivers/base/dd.c:891
 bus_probe_device+0x137/0x390 drivers/base/bus.c:514
 device_add+0x288d/0x30e0 drivers/base/core.c:2106
 usb_new_device+0x23e5/0x2ff0 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+0x48d1/0x7290 drivers/usb/core/hub.c:5432
 process_one_work+0x1572/0x1f00 kernel/workqueue.c:2269
 worker_thread+0x111b/0x2460 kernel/workqueue.c:2415
 kthread+0x4b5/0x4f0 kernel/kthread.c:254
 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:208 [inline]
 kmsan_internal_poison_shadow+0x92/0x150 mm/kmsan/kmsan.c:162
 kmsan_kmalloc+0xa4/0x130 mm/kmsan/kmsan_hooks.c:175
 kmem_cache_alloc_trace+0x503/0xae0 mm/slub.c:2801
 kmalloc include/linux/slab.h:547 [inline]
 gspca_dev_probe2+0x30c/0x2240 drivers/media/usb/gspca/gspca.c:1480
 gspca_dev_probe+0x346/0x3b0 drivers/media/usb/gspca/gspca.c:1619
 sd_probe+0x8d/0xa0 drivers/media/usb/gspca/gl860/gl860.c:523
 usb_probe_interface+0xd66/0x1320 drivers/usb/core/driver.c:361
 really_probe+0xdae/0x1d80 drivers/base/dd.c:513
 driver_probe_device+0x1b3/0x4f0 drivers/base/dd.c:671
 __device_attach_driver+0x5b8/0x790 drivers/base/dd.c:778
 bus_for_each_drv+0x28e/0x3b0 drivers/base/bus.c:454
 __device_attach+0x454/0x730 drivers/base/dd.c:844
 device_initial_probe+0x4a/0x60 drivers/base/dd.c:891
 bus_probe_device+0x137/0x390 drivers/base/bus.c:514
 device_add+0x288d/0x30e0 drivers/base/core.c:2106
 usb_set_configuration+0x30dc/0x3750 drivers/usb/core/message.c:2027
 generic_probe+0xe7/0x280 drivers/usb/core/generic.c:210
 usb_probe_device+0x14c/0x200 drivers/usb/core/driver.c:266
 really_probe+0xdae/0x1d80 drivers/base/dd.c:513
 driver_probe_device+0x1b3/0x4f0 drivers/base/dd.c:671
 __device_attach_driver+0x5b8/0x790 drivers/base/dd.c:778
 bus_for_each_drv+0x28e/0x3b0 drivers/base/bus.c:454
 __device_attach+0x454/0x730 drivers/base/dd.c:844
 device_initial_probe+0x4a/0x60 drivers/base/dd.c:891
 bus_probe_device+0x137/0x390 drivers/base/bus.c:514
 device_add+0x288d/0x30e0 drivers/base/core.c:2106
 usb_new_device+0x23e5/0x2ff0 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+0x48d1/0x7290 drivers/usb/core/hub.c:5432
 process_one_work+0x1572/0x1f00 kernel/workqueue.c:2269
 worker_thread+0x111b/0x2460 kernel/workqueue.c:2415
 kthread+0x4b5/0x4f0 kernel/kthread.c:254
 ret_from_fork+0x35/0x40 arch/x86/entry/entry_64.S:355
==================================================================

Crashes (25):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/06/06 14:22 https://github.com/google/kmsan.git master f75e4cfea97f a547defc .config console log report syz C ci-upstream-kmsan-gce
2019/10/15 20:25 https://github.com/google/kmsan.git master c24534505750 b5268b89 .config console log report ci-upstream-kmsan-gce
2019/10/15 11:09 https://github.com/google/kmsan.git master c24534505750 b5268b89 .config console log report ci-upstream-kmsan-gce
2019/10/15 01:21 https://github.com/google/kmsan.git master c24534505750 05ad7292 .config console log report ci-upstream-kmsan-gce
2019/10/14 21:52 https://github.com/google/kmsan.git master c24534505750 05ad7292 .config console log report ci-upstream-kmsan-gce
2019/10/14 17:20 https://github.com/google/kmsan.git master a1a7d049fdec 05ad7292 .config console log report ci-upstream-kmsan-gce
2019/10/14 15:36 https://github.com/google/kmsan.git master a1a7d049fdec 05ad7292 .config console log report ci-upstream-kmsan-gce
2019/10/14 08:59 https://github.com/google/kmsan.git master fa1690255288 2f661ec4 .config console log report ci-upstream-kmsan-gce
2019/10/14 04:40 https://github.com/google/kmsan.git master fa1690255288 2f661ec4 .config console log report ci-upstream-kmsan-gce
2019/10/14 03:11 https://github.com/google/kmsan.git master fa1690255288 2f661ec4 .config console log report ci-upstream-kmsan-gce
2019/10/13 09:13 https://github.com/google/kmsan.git master fa1690255288 2f661ec4 .config console log report ci-upstream-kmsan-gce
2019/10/13 05:44 https://github.com/google/kmsan.git master fa1690255288 426631dd .config console log report ci-upstream-kmsan-gce
2019/10/13 05:20 https://github.com/google/kmsan.git master fa1690255288 426631dd .config console log report ci-upstream-kmsan-gce
2019/10/13 04:12 https://github.com/google/kmsan.git master fa1690255288 426631dd .config console log report ci-upstream-kmsan-gce
2019/10/13 03:18 https://github.com/google/kmsan.git master fa1690255288 426631dd .config console log report ci-upstream-kmsan-gce
2019/10/13 02:15 https://github.com/google/kmsan.git master fa1690255288 426631dd .config console log report ci-upstream-kmsan-gce
2019/10/07 06:59 https://github.com/google/kmsan.git master 1e76a3e537c3 f3f7d9c8 .config console log report ci-upstream-kmsan-gce
2019/10/04 23:31 https://github.com/google/kmsan.git master 1e76a3e537c3 f3f7d9c8 .config console log report ci-upstream-kmsan-gce
2019/10/02 18:48 https://github.com/google/kmsan.git master 1e76a3e537c3 2e29b534 .config console log report ci-upstream-kmsan-gce
2019/09/29 10:01 https://github.com/google/kmsan.git master 124037e07586 c1ad5441 .config console log report ci-upstream-kmsan-gce
2019/09/26 01:45 https://github.com/google/kmsan.git master cebbfdbcf2b7 a3355dba .config console log report ci-upstream-kmsan-gce
2019/09/13 04:37 https://github.com/google/kmsan.git master a8390a90e991 40fa42bc .config console log report ci-upstream-kmsan-gce
2019/07/31 04:03 https://github.com/google/kmsan.git master beaab8a31e0d 7c7ded69 .config console log report ci-upstream-kmsan-gce
2019/06/25 21:55 https://github.com/google/kmsan.git master 6e0b7ebbe9bc 0a8d1a96 .config console log report ci-upstream-kmsan-gce
2019/06/06 13:03 https://github.com/google/kmsan.git master f75e4cfea97f a547defc .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.