syzbot


KMSAN: kernel-usb-infoleak in ttusb_dec_send_command

Status: fixed on 2019/10/15 23:40
Subsystems: usb
[Documentation on labels]
Reported-by: syzbot+0522702e9d67142379f1@syzkaller.appspotmail.com
Fix commit: a10feaf8c464 media: ttusb-dec: Fix info-leak in ttusb_dec_send_command()
First crash: 1978d, last: 1946d
Discussions (15)
Title Replies (including bot) Last reply
[PATCH 5.2 000/313] 5.2.19-stable review 324 (324) 2020/06/23 22:07
[PATCH 3.16 00/72] 3.16.79-rc1 review 87 (87) 2019/12/14 18:44
[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
[PATCH] media: ttusb-dec: Fix info-leak in ttusb_dec_send_command() 1 (1) 2019/07/31 15:19
KMSAN: kernel-usb-infoleak in ttusb_dec_send_command 0 (1) 2019/07/30 09:38

Sample crash report:
usb 1-1: config 0 interface 70 altsetting 0 endpoint 0x3 has an invalid bInterval 0, changing to 10
usb 1-1: New USB device found, idVendor=0b48, idProduct=1008, bcdDevice=69.06
usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
usb 1-1: config 0 descriptor??
==================================================================
BUG: KMSAN: kernel-usb-infoleak in usb_submit_urb+0x7ef/0x1f50 drivers/usb/core/urb.c:405
CPU: 1 PID: 3095 Comm: kworker/1:2 Not tainted 5.2.0-rc4+ #10
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+0x162/0x2d0 mm/kmsan/kmsan_report.c:109
 kmsan_internal_check_memory+0x974/0xa80 mm/kmsan/kmsan.c:573
 kmsan_handle_urb+0x28/0x40 mm/kmsan/kmsan_hooks.c:617
 usb_submit_urb+0x7ef/0x1f50 drivers/usb/core/urb.c:405
 usb_start_wait_urb+0x143/0x410 drivers/usb/core/message.c:58
 usb_bulk_msg+0x811/0x920 drivers/usb/core/message.c:257
 ttusb_dec_send_command+0x47d/0xd50 drivers/media/usb/ttusb-dec/ttusb_dec.c:345
 ttusb_dec_get_stb_state drivers/media/usb/ttusb-dec/ttusb_dec.c:393 [inline]
 ttusb_dec_init_stb drivers/media/usb/ttusb-dec/ttusb_dec.c:1421 [inline]
 ttusb_dec_probe+0xe31/0x4df0 drivers/media/usb/ttusb-dec/ttusb_dec.c:1680
 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
 worker_thread+0x111b/0x2460 kernel/workqueue.c:2415
 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:200 [inline]
 kmsan_internal_poison_shadow+0x53/0xa0 mm/kmsan/kmsan.c:159
 kmsan_kmalloc+0xa4/0x130 mm/kmsan/kmsan_hooks.c:178
 kmem_cache_alloc_trace+0x503/0xae0 mm/slub.c:2793
 kmalloc include/linux/slab.h:547 [inline]
 ttusb_dec_send_command+0x155/0xd50 drivers/media/usb/ttusb-dec/ttusb_dec.c:322
 ttusb_dec_get_stb_state drivers/media/usb/ttusb-dec/ttusb_dec.c:393 [inline]
 ttusb_dec_init_stb drivers/media/usb/ttusb-dec/ttusb_dec.c:1421 [inline]
 ttusb_dec_probe+0xe31/0x4df0 drivers/media/usb/ttusb-dec/ttusb_dec.c:1680
 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
 worker_thread+0x111b/0x2460 kernel/workqueue.c:2415
 kthread+0x4b5/0x4f0 kernel/kthread.c:256
 ret_from_fork+0x35/0x40 arch/x86/entry/entry_64.S:355

Bytes 4-63 of 64 are uninitialized
Memory access of size 64 starts at ffff8880ba4efac0
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/07/08 09:47 https://github.com/google/kmsan.git master f23a6010183e f62e1e85 .config console log report syz C ci-upstream-kmsan-gce
2019/08/09 03:38 https://github.com/google/kmsan.git master 61ccdad1fcdf ede31a9b .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.