================================================================== BUG: KASAN: use-after-free in v4l2_open+0x32d/0x340 drivers/media/v4l2-core/v4l2-dev.c:432 Read of size 4 at addr ffff88805fa189b0 by task v4l_id/5345 CPU: 1 PID: 5345 Comm: v4l_id Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 v4l2_open+0x32d/0x340 drivers/media/v4l2-core/v4l2-dev.c:432 chrdev_open+0x585/0x5f0 fs/char_dev.c:414 do_dentry_open+0x7f7/0xf90 fs/open.c:826 do_open fs/namei.c:3616 [inline] path_openat+0x2718/0x2fb0 fs/namei.c:3750 do_filp_open+0x1df/0x400 fs/namei.c:3777 do_sys_openat2+0x14b/0x500 fs/open.c:1255 do_sys_open fs/open.c:1271 [inline] __do_sys_openat fs/open.c:1287 [inline] __se_sys_openat fs/open.c:1282 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1282 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f2bea8a8407 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:00007fffa6fe4920 EFLAGS: 00000202 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f2bea7ba880 RCX: 00007f2bea8a8407 RDX: 0000000000000000 RSI: 00007fffa6fe4f1c RDI: ffffffffffffff9c RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000000 R13: 00007fffa6fe4b70 R14: 00007f2beb036000 R15: 0000561c1465f4d8 The buggy address belongs to the page: page:ffffea00017e8600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5fa18 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x102800(GFP_NOWAIT|__GFP_NOWARN|__GFP_HARDWALL), pid 5344, ts 104457985473, free_ts 104427954338 create_dummy_stack mm/page_owner.c:59 [inline] register_dummy_stack+0x95/0xf0 mm/page_owner.c:65 init_page_owner+0x25/0x750 mm/page_owner.c:83 kernel_init_freeable+0x3d0/0x560 init/main.c:1626 kernel_init+0x19/0x1b0 init/main.c:1519 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page+0x8f/0x2a0 mm/page_alloc.c:3396 free_nonslab_page+0xde/0x150 mm/slub.c:3540 em28xx_free_v4l2 drivers/media/usb/em28xx/em28xx-video.c:2128 [inline] kref_put include/linux/kref.h:65 [inline] em28xx_v4l2_init+0x155a/0x2cd0 drivers/media/usb/em28xx/em28xx-video.c:2917 em28xx_init_extension+0x118/0x1c0 drivers/media/usb/em28xx/em28xx-core.c:1126 process_one_work+0x867/0xff0 kernel/workqueue.c:2310 process_scheduled_works kernel/workqueue.c:2373 [inline] worker_thread+0xe01/0x12a0 kernel/workqueue.c:2462 kthread+0x42e/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Memory state around the buggy address: ffff88805fa18880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88805fa18900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88805fa18980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88805fa18a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88805fa18a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================