bisecting fixing commit since e4e453434a199cdfa1e1e5cc723d8736f522354a building syzkaller on 1ba81399e2d03b53a7e631c4ab05f25af1fb1911 testing commit e4e453434a199cdfa1e1e5cc723d8736f522354a with gcc (GCC) 10.2.1 20210217 kernel signature: 4ba07996195e9b19fa1c08929f5d14c27eb42286a7e441e4e5c4d18253efaf14 all runs: crashed: KASAN: use-after-free Read in v4l2_fh_init testing current HEAD 40226a3d96ef8ab8980f032681c8bfd46d63874e testing commit 40226a3d96ef8ab8980f032681c8bfd46d63874e with gcc (GCC) 10.2.1 20210217 kernel signature: 14f4ce03a6d5ef08a118f6a806331b4ebcd2d9f494e8c81fa1364457b8d69cd9 run #0: crashed: KASAN: use-after-free Read in v4l2_fh_init run #1: crashed: KASAN: use-after-free Read in v4l2_fh_init run #2: crashed: KASAN: use-after-free Read in v4l2_fh_init run #3: crashed: KASAN: use-after-free Read in v4l2_fh_init run #4: crashed: KASAN: use-after-free Read in v4l2_fh_init run #5: crashed: KASAN: use-after-free Read in em28xx_close_extension run #6: crashed: KASAN: use-after-free Read in em28xx_close_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: 22m54.460413464s (build: 14m43.883668572s, test: 7m32.503024s) the crash still happens on HEAD commit msg: Merge tag 'vboxsf-v5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hansg/linux crash: KASAN: use-after-free Read in em28xx_close_extension em28xx 4-1:0.179: Closing input extension em28xx 4-1:0.179: Freeing device ================================================================== BUG: KASAN: use-after-free in __list_del_entry_valid+0xcc/0xf0 lib/list_debug.c:42 Read of size 8 at addr ffff888044368258 by task kworker/1:3/4873 CPU: 1 PID: 4873 Comm: kworker/1:3 Not tainted 5.14.0-rc1-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:88 [inline] dump_stack_lvl+0x57/0x7d lib/dump_stack.c:105 print_address_description.constprop.0.cold+0x6c/0x309 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:436 __list_del_entry_valid+0xcc/0xf0 lib/list_debug.c:42 __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:4140 usb_unbind_interface+0x183/0x7e0 drivers/usb/core/driver.c:458 __device_release_driver+0x32f/0x660 drivers/base/dd.c:1201 device_release_driver_internal drivers/base/dd.c:1232 [inline] device_release_driver+0x21/0x30 drivers/base/dd.c:1255 bus_remove_device+0x295/0x550 drivers/base/bus.c:529 device_del+0x494/0xc10 drivers/base/core.c:3540 usb_disable_device+0x29c/0x660 drivers/usb/core/message.c:1419 usb_disconnect.cold+0x209/0x67e drivers/usb/core/hub.c:2221 hub_port_connect drivers/usb/core/hub.c:5151 [inline] hub_port_connect_change drivers/usb/core/hub.c:5440 [inline] port_event drivers/usb/core/hub.c:5586 [inline] hub_event+0xb22/0x36c0 drivers/usb/core/hub.c:5668 process_one_work+0x84c/0x13d0 kernel/workqueue.c:2276 process_scheduled_works kernel/workqueue.c:2338 [inline] worker_thread+0x74b/0x1040 kernel/workqueue.c:2424 kthread+0x38b/0x460 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the page: page:ffffea000110da00 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x44368 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea000113b308 ffff8880b9f3b248 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 2, migratetype Unmovable, gfp_mask 0x40dc0(GFP_KERNEL|__GFP_COMP|__GFP_ZERO), pid 4873, ts 69329143202, free_ts 71481590641 prep_new_page mm/page_alloc.c:2433 [inline] get_page_from_freelist+0xa6f/0x2f50 mm/page_alloc.c:4166 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5374 kmalloc_order+0x34/0xf0 mm/slab_common.c:955 kmalloc_order_trace+0x14/0x120 mm/slab_common.c:971 kmalloc_large include/linux/slab.h:520 [inline] kmalloc include/linux/slab.h:584 [inline] kzalloc include/linux/slab.h:721 [inline] em28xx_usb_probe+0x177/0xf90 drivers/media/usb/em28xx/em28xx-cards.c:3855 usb_probe_interface+0x274/0x6a0 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:517 [inline] really_probe+0x1b9/0xb70 drivers/base/dd.c:595 __driver_probe_device+0x2a6/0x460 drivers/base/dd.c:747 driver_probe_device+0x44/0x110 drivers/base/dd.c:777 __device_attach_driver+0x185/0x250 drivers/base/dd.c:894 bus_for_each_drv+0x11e/0x1a0 drivers/base/bus.c:427 __device_attach+0x1db/0x410 drivers/base/dd.c:965 bus_probe_device+0x19d/0x250 drivers/base/bus.c:487 device_add+0xa2f/0x1e00 drivers/base/core.c:3352 usb_set_configuration+0x9fc/0x1750 drivers/usb/core/message.c:2170 usb_generic_driver_probe+0x74/0xa0 drivers/usb/core/generic.c:238 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1343 [inline] free_pcp_prepare+0x2c5/0x780 mm/page_alloc.c:1394 free_unref_page_prepare mm/page_alloc.c:3329 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3408 em28xx_ir_fini.cold+0x72/0x115 drivers/media/usb/em28xx/em28xx-input.c:875 em28xx_close_extension+0xa4/0x260 drivers/media/usb/em28xx/em28xx-core.c:1143 em28xx_usb_disconnect.cold+0x13c/0x211 drivers/media/usb/em28xx/em28xx-cards.c:4140 usb_unbind_interface+0x183/0x7e0 drivers/usb/core/driver.c:458 __device_release_driver+0x32f/0x660 drivers/base/dd.c:1201 device_release_driver_internal drivers/base/dd.c:1232 [inline] device_release_driver+0x21/0x30 drivers/base/dd.c:1255 bus_remove_device+0x295/0x550 drivers/base/bus.c:529 device_del+0x494/0xc10 drivers/base/core.c:3540 usb_disable_device+0x29c/0x660 drivers/usb/core/message.c:1419 usb_disconnect.cold+0x209/0x67e drivers/usb/core/hub.c:2221 hub_port_connect drivers/usb/core/hub.c:5151 [inline] hub_port_connect_change drivers/usb/core/hub.c:5440 [inline] port_event drivers/usb/core/hub.c:5586 [inline] hub_event+0xb22/0x36c0 drivers/usb/core/hub.c:5668 process_one_work+0x84c/0x13d0 kernel/workqueue.c:2276 process_scheduled_works kernel/workqueue.c:2338 [inline] worker_thread+0x74b/0x1040 kernel/workqueue.c:2424 kthread+0x38b/0x460 kernel/kthread.c:319 Memory state around the buggy address: ffff888044368100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888044368180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888044368200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888044368280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888044368300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================