================================================================== BUG: KASAN: use-after-free in v4l2_fh_init drivers/media/v4l2-core/v4l2-fh.c:25 [inline] BUG: KASAN: use-after-free in v4l2_fh_open+0xc6/0x430 drivers/media/v4l2-core/v4l2-fh.c:63 Read of size 8 at addr ffff88804cd3c900 by task v4l_id/6559 CPU: 0 PID: 6559 Comm: v4l_id Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/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_fh_init drivers/media/v4l2-core/v4l2-fh.c:25 [inline] v4l2_fh_open+0xc6/0x430 drivers/media/v4l2-core/v4l2-fh.c:63 em28xx_v4l2_open+0x152/0x990 drivers/media/usb/em28xx/em28xx-video.c:2163 v4l2_open+0x20b/0x360 drivers/media/v4l2-core/v4l2-dev.c:427 chrdev_open+0x5c5/0x6a0 fs/char_dev.c:414 do_dentry_open+0x7ff/0xf80 fs/open.c:826 do_open fs/namei.c:3616 [inline] path_openat+0x26f5/0x2fa0 fs/namei.c:3750 do_filp_open+0x1e2/0x410 fs/namei.c:3777 do_sys_openat2+0x150/0x4b0 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:0x7f5c93d45407 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:00007fff8d6eaf40 EFLAGS: 00000202 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f5c93c57880 RCX: 00007f5c93d45407 RDX: 0000000000000000 RSI: 00007fff8d6ecf1b RDI: ffffffffffffff9c RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000000 R13: 00007fff8d6eb190 R14: 00007f5c944d3000 R15: 0000564cd1db74d8 The buggy address belongs to the page: page:ffffea0001334f00 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4cd3c flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001251908 ffff8880b91409f0 0000000000000000 raw: 0000000000000000 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 0x102a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_HARDWALL), pid 6560, ts 137207428956, free_ts 137207434031 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1bbd/0x1ca0 mm/page_alloc.c:4192 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501 stack_depot_save+0x342/0x440 lib/stackdepot.c:302 kasan_save_stack mm/kasan/common.c:40 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] __kasan_slab_alloc+0xb3/0xd0 mm/kasan/common.c:467 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519 slab_alloc_node mm/slub.c:3225 [inline] slab_alloc mm/slub.c:3233 [inline] kmem_cache_alloc+0x100/0x290 mm/slub.c:3238 skb_clone+0x1bd/0x350 net/core/skbuff.c:1523 dev_queue_xmit_nit+0x2cc/0xb00 net/core/dev.c:2354 xmit_one net/core/dev.c:3657 [inline] dev_hard_start_xmit+0x13e/0x7e0 net/core/dev.c:3678 sch_direct_xmit+0x25a/0x4b0 net/sched/sch_generic.c:345 __dev_xmit_skb net/core/dev.c:3897 [inline] __dev_queue_xmit+0x179f/0x2f80 net/core/dev.c:4266 neigh_hh_output include/net/neighbour.h:493 [inline] neigh_output include/net/neighbour.h:507 [inline] ip_finish_output2+0xc87/0x10a0 net/ipv4/ip_output.c:228 NF_HOOK_COND include/linux/netfilter.h:291 [inline] ip_output+0x2c0/0x3e0 net/ipv4/ip_output.c:434 dst_output include/net/dst.h:452 [inline] ip_local_out net/ipv4/ip_output.c:126 [inline] __ip_queue_xmit+0x11c1/0x1c00 net/ipv4/ip_output.c:538 __tcp_transmit_skb+0x1d11/0x3200 net/ipv4/tcp_output.c:1404 tcp_transmit_skb net/ipv4/tcp_output.c:1422 [inline] __tcp_retransmit_skb+0x92c/0x1290 net/ipv4/tcp_output.c:3278 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 stack_depot_save+0x418/0x440 lib/stackdepot.c:335 kasan_save_stack mm/kasan/common.c:40 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] __kasan_slab_alloc+0xb3/0xd0 mm/kasan/common.c:467 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519 slab_alloc_node mm/slub.c:3225 [inline] slab_alloc mm/slub.c:3233 [inline] kmem_cache_alloc+0x100/0x290 mm/slub.c:3238 skb_clone+0x1bd/0x350 net/core/skbuff.c:1523 dev_queue_xmit_nit+0x2cc/0xb00 net/core/dev.c:2354 xmit_one net/core/dev.c:3657 [inline] dev_hard_start_xmit+0x13e/0x7e0 net/core/dev.c:3678 sch_direct_xmit+0x25a/0x4b0 net/sched/sch_generic.c:345 __dev_xmit_skb net/core/dev.c:3897 [inline] __dev_queue_xmit+0x179f/0x2f80 net/core/dev.c:4266 neigh_hh_output include/net/neighbour.h:493 [inline] neigh_output include/net/neighbour.h:507 [inline] ip_finish_output2+0xc87/0x10a0 net/ipv4/ip_output.c:228 NF_HOOK_COND include/linux/netfilter.h:291 [inline] ip_output+0x2c0/0x3e0 net/ipv4/ip_output.c:434 dst_output include/net/dst.h:452 [inline] ip_local_out net/ipv4/ip_output.c:126 [inline] __ip_queue_xmit+0x11c1/0x1c00 net/ipv4/ip_output.c:538 __tcp_transmit_skb+0x1d11/0x3200 net/ipv4/tcp_output.c:1404 tcp_transmit_skb net/ipv4/tcp_output.c:1422 [inline] __tcp_retransmit_skb+0x92c/0x1290 net/ipv4/tcp_output.c:3278 Memory state around the buggy address: ffff88804cd3c800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88804cd3c880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88804cd3c900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88804cd3c980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88804cd3ca00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================