em28xx 3-1:64.138: Closing input extension em28xx 3-1:64.138: 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 ffff888032e6c258 by task kworker/0:6/10115 CPU: 0 PID: 10115 Comm: kworker/0:6 Not tainted 5.13.0-rc4-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+0xa5/0xe6 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report.cold+0x7c/0xd8 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:1181 device_release_driver_internal drivers/base/dd.c:1212 [inline] device_release_driver+0x21/0x30 drivers/base/dd.c:1235 bus_remove_device+0x298/0x550 drivers/base/bus.c:533 device_del+0x494/0xc10 drivers/base/core.c:3512 usb_disable_device+0x29c/0x660 drivers/usb/core/message.c:1413 usb_disconnect.cold+0x20c/0x681 drivers/usb/core/hub.c:2219 hub_port_connect drivers/usb/core/hub.c:5127 [inline] hub_port_connect_change drivers/usb/core/hub.c:5416 [inline] port_event drivers/usb/core/hub.c:5562 [inline] hub_event+0xb22/0x36d0 drivers/usb/core/hub.c:5644 process_one_work+0x84c/0x13b0 kernel/workqueue.c:2276 process_scheduled_works kernel/workqueue.c:2338 [inline] worker_thread+0x733/0xf80 kernel/workqueue.c:2424 kthread+0x36f/0x450 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 The buggy address belongs to the page: page:ffffea0000cb9b00 refcount:1 mapcount:-512 mapping:0000000000000000 index:0x0 pfn:0x32e6c flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000100 dead000000000122 0000000000000000 raw: 0000000000000000 ffff888017fb1600 00000001fffffdff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x400dc0(GFP_KERNEL_ACCOUNT|__GFP_ZERO), pid 4861, ts 77150632872, free_ts 76950073615 prep_new_page mm/page_alloc.c:2358 [inline] get_page_from_freelist+0x1033/0x2b60 mm/page_alloc.c:3994 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5200 __pte_alloc_one include/asm-generic/pgalloc.h:63 [inline] pte_alloc_one+0x11/0x190 arch/x86/mm/pgtable.c:33 __pte_alloc+0x15/0x240 mm/memory.c:440 copy_pte_range mm/memory.c:947 [inline] copy_pmd_range mm/memory.c:1064 [inline] copy_pud_range mm/memory.c:1101 [inline] copy_p4d_range mm/memory.c:1125 [inline] copy_page_range+0x11f1/0x31e0 mm/memory.c:1198 dup_mmap kernel/fork.c:598 [inline] dup_mm+0x7cc/0x1090 kernel/fork.c:1374 copy_mm kernel/fork.c:1426 [inline] copy_process+0x58a9/0x67c0 kernel/fork.c:2116 kernel_clone+0xb8/0x7f0 kernel/fork.c:2503 __do_sys_clone+0xaf/0xf0 kernel/fork.c:2620 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1298 [inline] __free_pages_ok+0x476/0xce0 mm/page_alloc.c:1572 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:1181 device_release_driver_internal drivers/base/dd.c:1212 [inline] device_release_driver+0x21/0x30 drivers/base/dd.c:1235 bus_remove_device+0x298/0x550 drivers/base/bus.c:533 device_del+0x494/0xc10 drivers/base/core.c:3512 usb_disable_device+0x29c/0x660 drivers/usb/core/message.c:1413 usb_disconnect.cold+0x20c/0x681 drivers/usb/core/hub.c:2219 hub_port_connect drivers/usb/core/hub.c:5127 [inline] hub_port_connect_change drivers/usb/core/hub.c:5416 [inline] port_event drivers/usb/core/hub.c:5562 [inline] hub_event+0xb22/0x36d0 drivers/usb/core/hub.c:5644 process_one_work+0x84c/0x13b0 kernel/workqueue.c:2276 process_scheduled_works kernel/workqueue.c:2338 [inline] worker_thread+0x733/0xf80 kernel/workqueue.c:2424 kthread+0x36f/0x450 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Memory state around the buggy address: ffff888032e6c100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888032e6c180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888032e6c200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888032e6c280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888032e6c300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================