================================================================== BUG: KASAN: use-after-free in v4l2_open+0x398/0x3a0 drivers/media/v4l2-core/v4l2-dev.c:444 Read of size 4 at addr ffff888037aac9d0 by task v4l_id/7132 CPU: 1 UID: 0 PID: 7132 Comm: v4l_id Not tainted syzkaller #0 PREEMPT_{RT,(full)} Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description+0x55/0x1e0 mm/kasan/report.c:378 print_report+0x58/0x70 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 v4l2_open+0x398/0x3a0 drivers/media/v4l2-core/v4l2-dev.c:444 chrdev_open+0x4d0/0x5f0 fs/char_dev.c:411 do_dentry_open+0x83d/0x13e0 fs/open.c:947 vfs_open+0x3b/0x350 fs/open.c:1079 do_open fs/namei.c:4699 [inline] path_openat+0x2e43/0x38a0 fs/namei.c:4858 do_file_open+0x23e/0x4a0 fs/namei.c:4887 do_sys_openat2+0x113/0x200 fs/open.c:1364 do_sys_open fs/open.c:1370 [inline] __do_sys_openat fs/open.c:1386 [inline] __se_sys_openat fs/open.c:1381 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1381 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fbeb530a407 Code: 48 89 fa 4c 89 df e8 38 aa 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff RSP: 002b:00007ffcfe837250 EFLAGS: 00000202 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fbeb521c880 RCX: 00007fbeb530a407 RDX: 0000000000000000 RSI: 00007ffcfe837f1b RDI: ffffffffffffff9c RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000000 R13: 00007ffcfe8374a0 R14: 00007fbeb5aa0000 R15: 00005626461d44d8 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888037aad000 pfn:0x37aac flags: 0x80000000000000(node=0|zone=1) raw: 0080000000000000 ffffea0000d79f08 ffff8880b8642e40 0000000000000000 raw: ffff888037aad000 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_ZERO|__GFP_COMP), pid 6744, tgid 6744 (kworker/0:7), ts 202137608966, free_ts 202428907700 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1861 prep_new_page mm/page_alloc.c:1869 [inline] get_page_from_freelist+0x27d6/0x2850 mm/page_alloc.c:3949 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5292 alloc_pages_mpol+0xd1/0x380 mm/mempolicy.c:2490 ___kmalloc_large_node+0x4e/0x120 mm/slub.c:5249 __kmalloc_large_noprof+0x1a/0x90 mm/slub.c:5270 kmalloc_noprof include/linux/slab.h:947 [inline] kzalloc_noprof include/linux/slab.h:1188 [inline] em28xx_v4l2_init+0xe0/0x3320 drivers/media/usb/em28xx/em28xx-video.c:2707 em28xx_init_extension+0x120/0x1c0 drivers/media/usb/em28xx/em28xx-core.c:1248 process_one_work+0x9a3/0x1710 kernel/workqueue.c:3312 process_scheduled_works kernel/workqueue.c:3403 [inline] worker_thread+0xba8/0x11e0 kernel/workqueue.c:3489 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 page last free pid 6744 tgid 6744 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1405 [inline] __free_frozen_pages+0x1075/0x11b0 mm/page_alloc.c:2946 em28xx_free_v4l2 drivers/media/usb/em28xx/em28xx-video.c:2287 [inline] kref_put include/linux/kref.h:65 [inline] em28xx_v4l2_init+0x18e9/0x3320 drivers/media/usb/em28xx/em28xx-video.c:3078 em28xx_init_extension+0x120/0x1c0 drivers/media/usb/em28xx/em28xx-core.c:1248 process_one_work+0x9a3/0x1710 kernel/workqueue.c:3312 process_scheduled_works kernel/workqueue.c:3403 [inline] worker_thread+0xba8/0x11e0 kernel/workqueue.c:3489 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff888037aac880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888037aac900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888037aac980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888037aaca00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888037aaca80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================