em28xx 3-1:0.132: Closing input extension ================================================================== BUG: KASAN: slab-use-after-free in media_device_unregister drivers/media/mc/mc-device.c:833 [inline] BUG: KASAN: slab-use-after-free in media_device_unregister+0x59d/0x610 drivers/media/mc/mc-device.c:811 Read of size 8 at addr ffff888076c4c210 by task kworker/0:8/5957 CPU: 0 UID: 0 PID: 5957 Comm: kworker/0:8 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026 Workqueue: usb_hub_wq hub_event Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x13d/0x4b0 mm/kasan/report.c:482 kasan_report+0xdf/0x1d0 mm/kasan/report.c:595 media_device_unregister drivers/media/mc/mc-device.c:833 [inline] media_device_unregister+0x59d/0x610 drivers/media/mc/mc-device.c:811 em28xx_unregister_media_device+0x4e/0xe0 drivers/media/usb/em28xx/em28xx-cards.c:3714 em28xx_release_resources+0x79/0x1b0 drivers/media/usb/em28xx/em28xx-cards.c:3735 em28xx_usb_disconnect.cold+0x17d/0x253 drivers/media/usb/em28xx/em28xx-cards.c:4427 usb_unbind_interface+0x1dd/0x9e0 drivers/usb/core/driver.c:458 device_remove drivers/base/dd.c:621 [inline] device_remove+0x12a/0x180 drivers/base/dd.c:613 __device_release_driver drivers/base/dd.c:1332 [inline] device_release_driver_internal+0x44e/0x620 drivers/base/dd.c:1355 bus_remove_device+0x2bc/0x560 drivers/base/bus.c:657 device_del+0x376/0x9b0 drivers/base/core.c:3880 usb_disable_device+0x367/0x810 drivers/usb/core/message.c:1476 usb_disconnect+0x2e2/0x9a0 drivers/usb/core/hub.c:2345 hub_port_connect drivers/usb/core/hub.c:5407 [inline] hub_port_connect_change drivers/usb/core/hub.c:5707 [inline] port_event drivers/usb/core/hub.c:5871 [inline] hub_event+0x1d0c/0x4af0 drivers/usb/core/hub.c:5953 process_one_work+0xa0e/0x1980 kernel/workqueue.c:3302 process_scheduled_works kernel/workqueue.c:3385 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3466 kthread+0x370/0x450 kernel/kthread.c:436 ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 798: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415 kmalloc_noprof include/linux/slab.h:950 [inline] kzalloc_noprof include/linux/slab.h:1188 [inline] em28xx_v4l2_init.cold+0x94/0x3a40 drivers/media/usb/em28xx/em28xx-video.c:2707 em28xx_init_extension+0x13a/0x200 drivers/media/usb/em28xx/em28xx-core.c:1248 request_module_async+0x61/0x80 drivers/media/usb/em28xx/em28xx-cards.c:3660 process_one_work+0xa0e/0x1980 kernel/workqueue.c:3302 process_scheduled_works kernel/workqueue.c:3385 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3466 kthread+0x370/0x450 kernel/kthread.c:436 ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Freed by task 798: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2689 [inline] slab_free mm/slub.c:6246 [inline] kfree+0x223/0x6c0 mm/slub.c:6561 kref_put.isra.0+0x53/0x75 include/linux/kref.h:65 em28xx_v4l2_init.cold+0x280/0x3a40 drivers/media/usb/em28xx/em28xx-video.c:3078 em28xx_init_extension+0x13a/0x200 drivers/media/usb/em28xx/em28xx-core.c:1248 request_module_async+0x61/0x80 drivers/media/usb/em28xx/em28xx-cards.c:3660 process_one_work+0xa0e/0x1980 kernel/workqueue.c:3302 process_scheduled_works kernel/workqueue.c:3385 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3466 kthread+0x370/0x450 kernel/kthread.c:436 ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff888076c4c000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 528 bytes inside of freed 8192-byte region [ffff888076c4c000, ffff888076c4e000) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x76c48 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88813fe87280 dead000000000100 dead000000000122 raw: 0000000000000000 0000000800020002 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88813fe87280 dead000000000100 dead000000000122 head: 0000000000000000 0000000800020002 00000000f5000000 0000000000000000 head: 00fff00000000003 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 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5466, tgid 5466 (S40network), ts 36760501096, free_ts 36702393686 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x153/0x170 mm/page_alloc.c:1850 prep_new_page mm/page_alloc.c:1858 [inline] get_page_from_freelist+0x11a6/0x33b0 mm/page_alloc.c:3938 __alloc_frozen_pages_noprof+0x27c/0x2bc0 mm/page_alloc.c:5218 alloc_slab_page mm/slub.c:3278 [inline] allocate_slab mm/slub.c:3467 [inline] new_slab+0xa6/0x6c0 mm/slub.c:3525 refill_objects+0x277/0x420 mm/slub.c:7251 refill_sheaf mm/slub.c:2816 [inline] __pcs_replace_empty_main+0x375/0x650 mm/slub.c:4651 alloc_from_pcs mm/slub.c:4749 [inline] slab_alloc_node mm/slub.c:4883 [inline] __kmalloc_cache_noprof+0x493/0x6f0 mm/slub.c:5410 kmalloc_noprof include/linux/slab.h:950 [inline] kzalloc_noprof include/linux/slab.h:1188 [inline] tomoyo_print_bprm security/tomoyo/audit.c:26 [inline] tomoyo_init_log+0xc4f/0x20c0 security/tomoyo/audit.c:264 tomoyo_supervisor+0x506/0x1340 security/tomoyo/common.c:2232 tomoyo_audit_path_log security/tomoyo/file.c:169 [inline] tomoyo_execute_permission+0x38e/0x4b0 security/tomoyo/file.c:624 tomoyo_find_next_domain+0x38d/0x2010 security/tomoyo/domain.c:763 tomoyo_bprm_check_security security/tomoyo/tomoyo.c:102 [inline] tomoyo_bprm_check_security+0x12d/0x1d0 security/tomoyo/tomoyo.c:92 security_bprm_check+0x87/0x1e0 security/security.c:820 search_binary_handler fs/exec.c:1654 [inline] exec_binprm fs/exec.c:1696 [inline] bprm_execve fs/exec.c:1748 [inline] bprm_execve+0x845/0x1650 fs/exec.c:1724 do_execveat_common.isra.0+0x4a5/0x580 fs/exec.c:1846 __do_sys_execve fs/exec.c:1930 [inline] __se_sys_execve fs/exec.c:1924 [inline] __x64_sys_execve+0x93/0xd0 fs/exec.c:1924 page last free pid 5464 tgid 5464 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1394 [inline] __free_frozen_pages+0x747/0x1040 mm/page_alloc.c:2935 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x47/0xf0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:350 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4569 [inline] slab_alloc_node mm/slub.c:4898 [inline] kmem_cache_alloc_noprof+0x241/0x6e0 mm/slub.c:4905 new_handle fs/jbd2/transaction.c:457 [inline] jbd2__journal_start+0x194/0x6a0 fs/jbd2/transaction.c:485 __ext4_journal_start_sb+0x36d/0x670 fs/ext4/ext4_jbd2.c:114 __ext4_journal_start fs/ext4/ext4_jbd2.h:242 [inline] ext4_dirty_inode+0xa1/0x130 fs/ext4/inode.c:6584 __mark_inode_dirty+0x1f3/0x1720 fs/fs-writeback.c:2621 generic_update_time fs/inode.c:2192 [inline] touch_atime+0x642/0x7a0 fs/inode.c:2267 file_accessed include/linux/fs.h:2271 [inline] filemap_read+0xe21/0x10a0 mm/filemap.c:2877 generic_file_read_iter+0x344/0x450 mm/filemap.c:2997 ext4_file_read_iter+0x1dd/0x6c0 fs/ext4/file.c:147 __kernel_read+0x397/0xac0 fs/read_write.c:532 integrity_kernel_read+0x7e/0xb0 security/integrity/iint.c:28 ima_calc_file_hash_tfm+0x25e/0x350 security/integrity/ima/ima_crypto.c:222 Memory state around the buggy address: ffff888076c4c100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888076c4c180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888076c4c200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888076c4c280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888076c4c300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================