bisecting fixing commit since 7a7fd0de4a9804299793e564a555a49c1fc924cb building syzkaller on 92ead2966b78ac6b2d6a0a464cc15c6ee6f853c6 testing commit 7a7fd0de4a9804299793e564a555a49c1fc924cb with gcc (GCC) 10.2.1 20210217 kernel signature: 74bce822fd4794bfcdf5332ddb1ac763b48e7fc50c7ac65c757919a80859e464 run #0: crashed: KASAN: use-after-free Read in em28xx_close_extension run #1: crashed: KASAN: use-after-free Read in em28xx_close_extension run #2: crashed: KASAN: use-after-free Read in em28xx_init_extension run #3: crashed: BUG: corrupted list in em28xx_init_extension run #4: crashed: BUG: corrupted list in em28xx_init_extension run #5: crashed: KASAN: use-after-free Read in em28xx_init_extension run #6: crashed: KASAN: slab-out-of-bounds Read in em28xx_init_extension run #7: crashed: KASAN: use-after-free Read in em28xx_close_extension run #8: crashed: BUG: corrupted list in em28xx_init_extension run #9: crashed: KASAN: slab-out-of-bounds Read in em28xx_init_extension run #10: crashed: KASAN: slab-out-of-bounds Read in em28xx_init_extension run #11: crashed: KASAN: slab-out-of-bounds Read in em28xx_init_extension run #12: crashed: KASAN: use-after-free Read in em28xx_init_extension run #13: crashed: BUG: corrupted list in em28xx_init_extension run #14: crashed: KASAN: use-after-free Read in em28xx_init_extension run #15: crashed: KASAN: use-after-free Read in em28xx_close_extension run #16: crashed: KASAN: slab-out-of-bounds Read in em28xx_close_extension run #17: crashed: BUG: corrupted list in em28xx_close_extension run #18: crashed: BUG: corrupted list in em28xx_close_extension run #19: crashed: KASAN: use-after-free Read in em28xx_init_extension testing current HEAD 1678e493d530e7977cce34e59a86bb86f3c5631e testing commit 1678e493d530e7977cce34e59a86bb86f3c5631e with gcc (GCC) 10.2.1 20210217 kernel signature: cfe6c53022e265a7ae53f116ed38b371882ac6d4c89c657c67c06a69fedbd80f run #0: crashed: KASAN: use-after-free Read in em28xx_close_extension run #1: crashed: BUG: corrupted list in em28xx_close_extension run #2: crashed: BUG: corrupted list in em28xx_init_extension run #3: crashed: BUG: corrupted list in em28xx_init_extension run #4: crashed: KASAN: use-after-free Read in em28xx_init_extension run #5: crashed: KASAN: slab-out-of-bounds Read in em28xx_init_extension run #6: crashed: KASAN: use-after-free Read in em28xx_init_extension run #7: crashed: KASAN: use-after-free Read in em28xx_close_extension run #8: crashed: KASAN: use-after-free Read in em28xx_close_extension run #9: crashed: KASAN: use-after-free Read in em28xx_close_extension revisions tested: 2, total time: 21m3.559658802s (build: 13m39.181889348s, test: 6m49.462886201s) the crash still happens on HEAD commit msg: Merge tag 'lto-v5.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux crash: KASAN: use-after-free Read in em28xx_close_extension ================================================================== BUG: KASAN: use-after-free in __list_del_entry_valid+0xe0/0xf0 lib/list_debug.c:51 Read of size 8 at addr ffff888023a9c250 by task kworker/0:1/7 CPU: 0 PID: 7 Comm: kworker/0:1 Not tainted 5.12.0-rc5-syzkaller #0 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:79 [inline] dump_stack+0x93/0xc2 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:232 __kasan_report mm/kasan/report.c:399 [inline] kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:416 __list_del_entry_valid+0xe0/0xf0 lib/list_debug.c:51 __list_del_entry include/linux/list.h:132 [inline] list_del include/linux/list.h:146 [inline] em28xx_close_extension+0xd8/0x260 drivers/media/usb/em28xx/em28xx-core.c:1146 em28xx_usb_disconnect.cold+0x13c/0x211 drivers/media/usb/em28xx/em28xx-cards.c:4136 usb_unbind_interface+0x183/0x7e0 drivers/usb/core/driver.c:458 __device_release_driver+0x32f/0x660 drivers/base/dd.c:1156 device_release_driver_internal drivers/base/dd.c:1187 [inline] device_release_driver+0x21/0x30 drivers/base/dd.c:1210 bus_remove_device+0x298/0x550 drivers/base/bus.c:533 device_del+0x494/0xc10 drivers/base/core.c:3421 usb_disable_device+0x29c/0x660 drivers/usb/core/message.c:1413 usb_disconnect.cold+0x20c/0x681 drivers/usb/core/hub.c:2218 hub_port_connect drivers/usb/core/hub.c:5074 [inline] hub_port_connect_change drivers/usb/core/hub.c:5363 [inline] port_event drivers/usb/core/hub.c:5509 [inline] hub_event+0xb22/0x36b0 drivers/usb/core/hub.c:5591 process_one_work+0x84c/0x13b0 kernel/workqueue.c:2275 process_scheduled_works kernel/workqueue.c:2337 [inline] worker_thread+0x733/0xf80 kernel/workqueue.c:2423 kthread+0x36f/0x450 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 The buggy address belongs to the page: page:00000000cf31c036 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x0 pfn:0x23a9c flags: 0xfff00000000000() raw: 00fff00000000000 ffffea0000edcc08 ffff88813fffb910 0000000000000000 raw: 0000000000000000 0000000000000002 00000000ffffff7f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888023a9c100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888023a9c180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888023a9c200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888023a9c280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888023a9c300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================