================================================================== BUG: KASAN: use-after-free in v4l2_open+0x32d/0x340 drivers/media/v4l2-core/v4l2-dev.c:432 Read of size 4 at addr ffff8880611189b0 by task v4l_id/5288 CPU: 1 PID: 5288 Comm: v4l_id Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/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:0x7fc634e06407 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:00007fffc59ccc20 EFLAGS: 00000202 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fc634d18880 RCX: 00007fc634e06407 RDX: 0000000000000000 RSI: 00007fffc59cdf1c RDI: ffffffffffffff9c RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000000 R13: 00007fffc59cce70 R14: 00007fc635594000 R15: 0000563f0d3a24d8 The buggy address belongs to the page: page:ffffea0001844600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x61118 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 5193, ts 119233923794, free_ts 119082980911 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x24f6/0x2670 mm/page_alloc.c:4192 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501 stack_depot_save+0x356/0x460 lib/stackdepot.c:302 kasan_save_stack mm/kasan/common.c:40 [inline] kasan_set_track+0x62/0x70 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1710 [inline] slab_free_freelist_hook+0xec/0x170 mm/slub.c:1736 slab_free mm/slub.c:3504 [inline] kmem_cache_free+0x8f/0x210 mm/slub.c:3520 packet_rcv+0x157/0x1260 net/packet/af_packet.c:2243 dev_queue_xmit_nit+0xa48/0xae0 net/core/dev.c:2386 xmit_one net/core/dev.c:3657 [inline] dev_hard_start_xmit+0x140/0x7d0 net/core/dev.c:3678 sch_direct_xmit+0x24d/0x4a0 net/sched/sch_generic.c:345 __dev_xmit_skb net/core/dev.c:3897 [inline] __dev_queue_xmit+0x1694/0x2e50 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+0xc77/0x10e0 net/ipv4/ip_output.c:228 NF_HOOK_COND include/linux/netfilter.h:291 [inline] ip_output+0x2ba/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+0x1207/0x1ce0 net/ipv4/ip_output.c:538 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+0x42f/0x460 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_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc+0xc6/0xe0 mm/kasan/common.c:522 kmalloc_reserve net/core/skbuff.c:356 [inline] __alloc_skb+0x22c/0x750 net/core/skbuff.c:427 alloc_skb include/linux/skbuff.h:1162 [inline] _sctp_make_chunk+0x5b/0x430 net/sctp/sm_make_chunk.c:1444 sctp_make_control net/sctp/sm_make_chunk.c:1491 [inline] sctp_make_sack+0x174/0xe30 net/sctp/sm_make_chunk.c:786 sctp_gen_sack net/sctp/sm_sideeffect.c:206 [inline] sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1362 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1199 [inline] sctp_do_sm+0x2735/0x5610 net/sctp/sm_sideeffect.c:1170 sctp_assoc_bh_rcv+0x3ee/0x630 net/sctp/associola.c:1054 sctp_rcv+0x11a9/0x1690 net/sctp/input.c:258 sctp6_rcv+0x35/0x60 net/sctp/ipv6.c:1111 ip6_protocol_deliver_rcu+0x97b/0x1360 net/ipv6/ip6_input.c:425 ip6_input_finish+0xa2/0x130 net/ipv6/ip6_input.c:466 NF_HOOK+0x303/0x390 include/linux/netfilter.h:302 NF_HOOK+0x303/0x390 include/linux/netfilter.h:302 __netif_receive_skb_one_core net/core/dev.c:5551 [inline] __netif_receive_skb+0xcc/0x290 net/core/dev.c:5665 Memory state around the buggy address: ffff888061118880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888061118900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888061118980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888061118a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888061118a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================