syzbot


KMSAN: uninit-value in i2c_w

Status: fixed on 2019/10/15 23:40
Subsystems: usb media
[Documentation on labels]
Reported-by: syzbot+397fd082ce5143e2f67d@syzkaller.appspotmail.com
Fix commit: 4843a543fad3 media: gspca: zero usb_buf on error
First crash: 1839d, last: 1839d
Discussions (20)
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
[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 i2c_w 0 (1) 2019/06/05 00:12
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in i2c_w (2) media usb C 3 1693d 1681d 15/27 fixed on 2020/02/18 14:31
Last patch testing requests (1)
Created Duration User Patch Repo Result
2019/08/15 08:26 21m hverkuil@xs4all.nl patch https://github.com/google/kmsan.git master OK

Sample crash report:
usb 1-1: New USB device found, idVendor=06a2, idProduct=6810, bcdDevice=1b.af
usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
usb 1-1: string descriptor 0 read error: -71
gspca_main: gspca_topro-2.14.0 probing 06a2:6810
gspca_topro: reg_w err -71
==================================================================
BUG: KMSAN: uninit-value in i2c_w+0xb7a/0xd70 drivers/media/usb/gspca/topro.c:1043
CPU: 1 PID: 3338 Comm: kworker/1:2 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
 i2c_w+0xb7a/0xd70 drivers/media/usb/gspca/topro.c:1043
 probe_6810 drivers/media/usb/gspca/topro.c:1126 [inline]
 sd_init+0xc05/0x7ca0 drivers/media/usb/gspca/topro.c:4081
 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 (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/06/04 03:02 https://github.com/google/kmsan.git master f75e4cfea97f ce07a7ae .config console log report syz C ci-upstream-kmsan-gce
2019/06/04 01:11 https://github.com/google/kmsan.git master f75e4cfea97f ce07a7ae .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.