================================================================== BUG: KASAN: slab-use-after-free in v4l2_fh_init+0x27d/0x2c0 drivers/media/v4l2-core/v4l2-fh.c:25 Read of size 8 at addr ffff88810a700738 by task v4l_id/21385 CPU: 1 UID: 0 PID: 21385 Comm: v4l_id Not tainted syzkaller #0 PREEMPT(voluntary) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 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+0x156/0x4c9 mm/kasan/report.c:482 kasan_report+0xdf/0x1a0 mm/kasan/report.c:595 v4l2_fh_init+0x27d/0x2c0 drivers/media/v4l2-core/v4l2-fh.c:25 v4l2_fh_open+0x64/0xa0 drivers/media/v4l2-core/v4l2-fh.c:64 em28xx_v4l2_open+0x11e/0x570 drivers/media/usb/em28xx/em28xx-video.c:2153 v4l2_open+0x1d2/0x490 drivers/media/v4l2-core/v4l2-dev.c:433 chrdev_open+0x234/0x6a0 fs/char_dev.c:414 do_dentry_open+0x71a/0x1400 fs/open.c:962 vfs_open+0x82/0x3f0 fs/open.c:1094 do_open fs/namei.c:4637 [inline] path_openat+0x21dc/0x3120 fs/namei.c:4796 do_filp_open+0x1f7/0x420 fs/namei.c:4823 do_sys_openat2+0x12e/0x220 fs/open.c:1430 do_sys_open fs/open.c:1436 [inline] __do_sys_openat fs/open.c:1452 [inline] __se_sys_openat fs/open.c:1447 [inline] __x64_sys_openat+0x12d/0x210 fs/open.c:1447 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xc9/0x570 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fb1c1f9e407 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:00007fff10ee2580 EFLAGS: 00000202 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fb1c1eb0880 RCX: 00007fb1c1f9e407 RDX: 0000000000000000 RSI: 00007fff10ee3f24 RDI: ffffffffffffff9c RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000000 R13: 00007fff10ee27d0 R14: 00007fb1c2734000 R15: 0000564c6ee504d8 Allocated by task 11641: 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+0x8f/0xa0 mm/kasan/common.c:415 kmalloc_noprof include/linux/slab.h:957 [inline] kzalloc_noprof include/linux/slab.h:1094 [inline] em28xx_v4l2_init.cold+0x94/0x3503 drivers/media/usb/em28xx/em28xx-video.c:2532 em28xx_init_extension+0x13a/0x200 drivers/media/usb/em28xx/em28xx-core.c:1117 request_module_async+0x61/0x80 drivers/media/usb/em28xx/em28xx-cards.c:3457 process_one_work+0x9c2/0x1840 kernel/workqueue.c:3257 process_scheduled_works kernel/workqueue.c:3340 [inline] worker_thread+0x5da/0xe40 kernel/workqueue.c:3421 kthread+0x3b3/0x730 kernel/kthread.c:463 ret_from_fork+0x6c3/0xa20 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 Freed by task 11641: 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+0x43/0x70 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2540 [inline] slab_free mm/slub.c:6670 [inline] kfree+0x1ad/0x630 mm/slub.c:6878 kref_put.isra.0+0x56/0x90 include/linux/kref.h:65 em28xx_v4l2_init.cold+0x280/0x3503 drivers/media/usb/em28xx/em28xx-video.c:2901 em28xx_init_extension+0x13a/0x200 drivers/media/usb/em28xx/em28xx-core.c:1117 request_module_async+0x61/0x80 drivers/media/usb/em28xx/em28xx-cards.c:3457 process_one_work+0x9c2/0x1840 kernel/workqueue.c:3257 process_scheduled_works kernel/workqueue.c:3340 [inline] worker_thread+0x5da/0xe40 kernel/workqueue.c:3421 kthread+0x3b3/0x730 kernel/kthread.c:463 ret_from_fork+0x6c3/0xa20 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 The buggy address belongs to the object at ffff88810a700000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 1848 bytes inside of freed 8192-byte region [ffff88810a700000, ffff88810a702000) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10a700 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x200000000000040(head|node=0|zone=2) page_type: f5(slab) raw: 0200000000000040 ffff888100042280 ffffea00046f1c00 dead000000000006 raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000 head: 0200000000000040 ffff888100042280 ffffea00046f1c00 dead000000000006 head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000 head: 0200000000000003 ffffea000429c001 00000000ffffffff 00000000ffffffff head: ffff888100000000 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 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 37, tgid 37 (kworker/1:1), ts 1296167035536, free_ts 1295568532018 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1e1/0x250 mm/page_alloc.c:1884 prep_new_page mm/page_alloc.c:1892 [inline] get_page_from_freelist+0xd57/0x3b20 mm/page_alloc.c:3945 __alloc_frozen_pages_noprof+0x269/0x2230 mm/page_alloc.c:5240 alloc_pages_mpol+0xe8/0x410 mm/mempolicy.c:2486 alloc_slab_page mm/slub.c:3075 [inline] allocate_slab mm/slub.c:3248 [inline] new_slab+0x2c4/0x440 mm/slub.c:3302 ___slab_alloc+0xda3/0x1ca0 mm/slub.c:4656 __slab_alloc.isra.0+0x63/0x110 mm/slub.c:4779 __slab_alloc_node mm/slub.c:4855 [inline] slab_alloc_node mm/slub.c:5251 [inline] __do_kmalloc_node mm/slub.c:5656 [inline] __kmalloc_node_track_caller_noprof+0x5d4/0x9a0 mm/slub.c:5764 kmalloc_reserve+0xef/0x2c0 net/core/skbuff.c:608 __alloc_skb+0x186/0x410 net/core/skbuff.c:690 __netdev_alloc_skb+0x7a/0x8f0 net/core/skbuff.c:754 netdev_alloc_skb include/linux/skbuff.h:3484 [inline] dev_alloc_skb include/linux/skbuff.h:3497 [inline] ath6kl_usb_post_recv_transfers.constprop.0+0x55/0x3d0 drivers/net/wireless/ath/ath6kl/usb.c:428 ath6kl_usb_start_recv_pipes drivers/net/wireless/ath/ath6kl/usb.c:498 [inline] hif_start drivers/net/wireless/ath/ath6kl/usb.c:703 [inline] ath6kl_usb_power_on+0x8e/0x160 drivers/net/wireless/ath/ath6kl/usb.c:1062 ath6kl_hif_power_on drivers/net/wireless/ath/ath6kl/hif-ops.h:136 [inline] ath6kl_core_init+0x173/0x11b0 drivers/net/wireless/ath/ath6kl/core.c:97 ath6kl_usb_probe+0xcd0/0x13e0 drivers/net/wireless/ath/ath6kl/usb.c:1168 usb_probe_interface+0x303/0x8f0 drivers/usb/core/driver.c:396 page last free pid 22 tgid 22 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1433 [inline] __free_frozen_pages+0x7d1/0x1010 mm/page_alloc.c:2973 __folio_put+0x278/0x3c0 mm/swap.c:112 folio_put include/linux/mm.h:1612 [inline] put_page include/linux/mm.h:1681 [inline] put_netmem+0x294/0x320 net/core/skbuff.c:7419 skb_page_unref include/linux/skbuff_ref.h:43 [inline] __skb_frag_unref include/linux/skbuff_ref.h:56 [inline] skb_release_data+0x4b2/0x700 net/core/skbuff.c:1101 skb_release_all net/core/skbuff.c:1182 [inline] __kfree_skb+0x4f/0x70 net/core/skbuff.c:1196 tcp_wmem_free_skb include/net/tcp.h:335 [inline] tcp_rtx_queue_unlink_and_free include/net/tcp.h:2208 [inline] tcp_clean_rtx_queue net/ipv4/tcp_input.c:3494 [inline] tcp_ack+0x1da6/0x5ea0 net/ipv4/tcp_input.c:4119 tcp_rcv_established+0x1058/0x36b0 net/ipv4/tcp_input.c:6374 tcp_v4_do_rcv+0x5dc/0xaa0 net/ipv4/tcp_ipv4.c:1881 tcp_v4_rcv+0x304c/0x46a0 net/ipv4/tcp_ipv4.c:2324 ip_protocol_deliver_rcu+0xba/0x4d0 net/ipv4/ip_input.c:207 ip_local_deliver_finish+0x404/0x6f0 net/ipv4/ip_input.c:241 NF_HOOK include/linux/netfilter.h:318 [inline] NF_HOOK include/linux/netfilter.h:312 [inline] ip_local_deliver+0x1a6/0x580 net/ipv4/ip_input.c:262 dst_input include/net/dst.h:474 [inline] ip_sublist_rcv_finish net/ipv4/ip_input.c:584 [inline] ip_list_rcv_finish+0xb5d/0x1180 net/ipv4/ip_input.c:636 ip_sublist_rcv net/ipv4/ip_input.c:644 [inline] ip_list_rcv+0x338/0x450 net/ipv4/ip_input.c:678 __netif_receive_skb_list_ptype net/core/dev.c:6195 [inline] __netif_receive_skb_list_core+0x74c/0x940 net/core/dev.c:6242 __netif_receive_skb_list net/core/dev.c:6294 [inline] netif_receive_skb_list_internal+0x722/0xd40 net/core/dev.c:6385 Memory state around the buggy address: ffff88810a700600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88810a700680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88810a700700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88810a700780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88810a700800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================