syzbot


KASAN: slab-out-of-bounds Read in au0828_rc_unregister (2)

Status: fixed on 2019/08/05 13:45
Subsystems: media
[Documentation on labels]
Reported-by: syzbot+357d86bcb4cca1a2f572@syzkaller.appspotmail.com
Fix commit: 6d0d1ff9ff21 media: au0828: fix null dereference in error path
First crash: 1797d, last: 1786d
Duplicate bugs (1)
duplicates (1):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
BUG: unable to handle kernel paging request in au0828_usb_disconnect kernel 42 1731d 1813d 0/26 closed as dup on 2019/08/21 17:11
Discussions (6)
Title Replies (including bot) Last reply
[PATCH 4.9 000/223] 4.9.187-stable review 231 (231) 2019/08/28 03:02
[PATCH 5.2 00/20] 5.2.6-stable review 32 (32) 2019/08/07 02:38
[PATCH 4.19 00/32] 4.19.64-stable review 43 (43) 2019/08/06 23:16
[PATCH 4.14 00/25] 4.14.136-stable review 32 (32) 2019/08/03 15:59
[PATCH] media: au0828: fix null dereference in error path 1 (1) 2019/05/19 19:48
KASAN: slab-out-of-bounds Read in au0828_rc_unregister (2) 0 (1) 2019/05/15 16:17
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in au0828_rc_unregister 1 1798d 1798d 0/26 closed as invalid on 2019/05/14 15:36

Sample crash report:
usb 6-1: selecting invalid altsetting 5
au0828: Failure setting usb interface0 to as5
au0828: au0828_usb_probe() au0828_analog_register failed to register on V4L2
==================================================================
BUG: KASAN: slab-out-of-bounds in au0828_rc_unregister+0x9a/0xb0 drivers/media/usb/au0828/au0828-input.c:353
Read of size 8 at addr ffff8881d2fbf308 by task kworker/1:3/5644

CPU: 1 PID: 5644 Comm: kworker/1:3 Not tainted 5.1.0-rc3+ #8
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+0xca/0x13e lib/dump_stack.c:113
 print_address_description+0x67/0x231 mm/kasan/report.c:187
 kasan_report.cold+0x1a/0x35 mm/kasan/report.c:317
 au0828_rc_unregister+0x9a/0xb0 drivers/media/usb/au0828/au0828-input.c:353
 au0828_usb_disconnect+0x6a/0x130 drivers/media/usb/au0828/au0828-core.c:189
 au0828_usb_probe.cold+0x111/0x16e drivers/media/usb/au0828/au0828-core.c:661
 usb_probe_interface+0x30d/0x7b0 drivers/usb/core/driver.c:361
 really_probe+0x296/0x680 drivers/base/dd.c:509
 driver_probe_device+0xf9/0x200 drivers/base/dd.c:671
 __device_attach_driver+0x1c4/0x230 drivers/base/dd.c:778
 bus_for_each_drv+0x15e/0x1e0 drivers/base/bus.c:454
 __device_attach+0x21e/0x360 drivers/base/dd.c:844
 bus_probe_device+0x1ec/0x2a0 drivers/base/bus.c:514
 device_add+0xaf4/0x1700 drivers/base/core.c:2106
 usb_set_configuration+0xdf2/0x1670 drivers/usb/core/message.c:2023
 generic_probe+0x9d/0xd5 drivers/usb/core/generic.c:210
 usb_probe_device+0xa8/0x110 drivers/usb/core/driver.c:266
 really_probe+0x296/0x680 drivers/base/dd.c:509
 driver_probe_device+0xf9/0x200 drivers/base/dd.c:671
 __device_attach_driver+0x1c4/0x230 drivers/base/dd.c:778
 bus_for_each_drv+0x15e/0x1e0 drivers/base/bus.c:454
 __device_attach+0x21e/0x360 drivers/base/dd.c:844
 bus_probe_device+0x1ec/0x2a0 drivers/base/bus.c:514
 device_add+0xaf4/0x1700 drivers/base/core.c:2106
 usb_new_device.cold+0x8b8/0x1030 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+0x1ac9/0x35a0 drivers/usb/core/hub.c:5432
 process_one_work+0x90a/0x1580 kernel/workqueue.c:2269
 worker_thread+0x96/0xe20 kernel/workqueue.c:2415
 kthread+0x30e/0x420 kernel/kthread.c:253
 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352

The buggy address belongs to the page:
page:ffffea00074bef00 count:1 mapcount:0 mapping:0000000000000000 index:0x0 compound_mapcount: 0
flags: 0x200000000010000(head)
raw: 0200000000010000 dead000000000100 dead000000000200 0000000000000000
raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8881d2fbf200: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
 ffff8881d2fbf280: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
>ffff8881d2fbf300: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
                      ^
 ffff8881d2fbf380: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
 ffff8881d2fbf400: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
==================================================================

Crashes (11):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/05/26 07:23 https://github.com/google/kasan.git usb-fuzzer 43151d6c3fce 85c57315 .config console log report ci2-upstream-usb
2019/05/23 18:51 https://github.com/google/kasan.git usb-fuzzer 43151d6c3fce 0dadcd9d .config console log report ci2-upstream-usb
2019/05/21 14:37 https://github.com/google/kasan.git usb-fuzzer 43151d6c3fce 8285069f .config console log report ci2-upstream-usb
2019/05/21 09:23 https://github.com/google/kasan.git usb-fuzzer 43151d6c3fce 8285069f .config console log report ci2-upstream-usb
2019/05/19 11:38 https://github.com/google/kasan.git usb-fuzzer 43151d6c3fce 5a4461b0 .config console log report ci2-upstream-usb
2019/05/18 12:10 https://github.com/google/kasan.git usb-fuzzer 43151d6c3fce 5a4461b0 .config console log report ci2-upstream-usb
2019/05/17 13:02 https://github.com/google/kasan.git usb-fuzzer 43151d6c3fce 2755003a .config console log report ci2-upstream-usb
2019/05/16 10:33 https://github.com/google/kasan.git usb-fuzzer 43151d6c3fce 051c49fe .config console log report ci2-upstream-usb
2019/05/16 06:33 https://github.com/google/kasan.git usb-fuzzer 43151d6c3fce 051c49fe .config console log report ci2-upstream-usb
2019/05/16 00:01 https://github.com/google/kasan.git usb-fuzzer 43151d6c3fce 27b25dbc .config console log report ci2-upstream-usb
2019/05/15 14:41 https://github.com/google/kasan.git usb-fuzzer 43151d6c3fce bd4e3ac7 .config console log report ci2-upstream-usb
* Struck through repros no longer work on HEAD.