em28xx 2-1:0.132: Closing input extension
==================================================================
BUG: KASAN: slab-use-after-free in media_device_unregister+0x141/0x450
Read of size 8 at addr ffff8881112d8210 by task kworker/0:4/5669

CPU: 0 UID: 0 PID: 5669 Comm: kworker/0:4 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Workqueue: usb_hub_wq hub_event
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150
 print_address_description+0x55/0x1e0
 print_report+0x58/0x70
 kasan_report+0x117/0x150
 media_device_unregister+0x141/0x450
 em28xx_release_resources+0xac/0x240
 em28xx_usb_disconnect+0x19f/0x2f0
 usb_unbind_interface+0x26e/0x910
 device_release_driver_internal+0x4d9/0x870
 bus_remove_device+0x455/0x570
 device_del+0x527/0x8f0
 usb_disable_device+0x3d4/0x8d0
 usb_disconnect+0x32f/0x990
 hub_event+0x1cc9/0x4f30
 process_scheduled_works+0xb5d/0x1860
 worker_thread+0xa53/0xfc0
 kthread+0x388/0x470
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30
 </TASK>

Allocated by task 7882:
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kmalloc_cache_noprof+0x31c/0x660
 em28xx_v4l2_init+0x10b/0x2eb0
 em28xx_init_extension+0x120/0x1c0
 process_scheduled_works+0xb5d/0x1860
 worker_thread+0xa53/0xfc0
 kthread+0x388/0x470
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30

Freed by task 7882:
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x46/0x50
 __kasan_slab_free+0x5c/0x80
 kfree+0x1c5/0x640
 em28xx_v4l2_init+0x1685/0x2eb0
 em28xx_init_extension+0x120/0x1c0
 process_scheduled_works+0xb5d/0x1860
 worker_thread+0xa53/0xfc0
 kthread+0x388/0x470
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30

The buggy address belongs to the object at ffff8881112d8000
 which belongs to the cache kmalloc-8k of size 8192
The buggy address is located 528 bytes inside of
 freed 8192-byte region [ffff8881112d8000, ffff8881112da000)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1112d8
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x17ff00000000040(head|node=0|zone=2|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 017ff00000000040 ffff888100042280 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800020002 00000000f5000000 0000000000000000
head: 017ff00000000040 ffff888100042280 dead000000000100 dead000000000122
head: 0000000000000000 0000000800020002 00000000f5000000 0000000000000000
head: 017ff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 26, tgid 26 (kworker/u9:0), ts 407529454356, free_ts 407519084127
 post_alloc_hook+0x1f9/0x250
 get_page_from_freelist+0x24ba/0x2540
 __alloc_frozen_pages_noprof+0x18d/0x380
 allocate_slab+0x77/0x660
 refill_objects+0x339/0x3d0
 __pcs_replace_empty_main+0x321/0x720
 __kmalloc_noprof+0x474/0x760
 __sta_info_alloc+0x93/0x2630
 ieee80211_ibss_add_sta+0x5b7/0x870
 ieee80211_ibss_rx_queued_mgmt+0x155e/0x2cb0
 ieee80211_iface_work+0x845/0x1380
 cfg80211_wiphy_work+0x2cf/0x460
 process_scheduled_works+0xb5d/0x1860
 worker_thread+0xa53/0xfc0
 kthread+0x388/0x470
 ret_from_fork+0x514/0xb70
page last free pid 5048 tgid 5048 stack trace:
 __free_frozen_pages+0xbbe/0xd20
 __slab_free+0x274/0x2c0
 qlist_free_all+0x99/0x100
 kasan_quarantine_reduce+0x148/0x160
 __kasan_slab_alloc+0x22/0x80
 kmem_cache_alloc_node_noprof+0x384/0x690
 __alloc_skb+0x1d0/0x7d0
 alloc_skb_with_frags+0xc8/0x760
 sock_alloc_send_pskb+0x878/0x990
 unix_dgram_sendmsg+0x460/0x18d0
 __sys_sendto+0x672/0x710
 __x64_sys_sendto+0xde/0x100
 do_syscall_64+0x15f/0xf80
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff8881112d8100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8881112d8180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8881112d8200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                         ^
 ffff8881112d8280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8881112d8300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
