================================================================== BUG: KASAN: use-after-free in mcp2221_raw_event+0x1062/0x1240 drivers/hid/hid-mcp2221.c:856 Read of size 1 at addr ffff88803080ffff by task syz.2.377/7197 CPU: 1 PID: 7197 Comm: syz.2.377 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xac/0x220 mm/kasan/report.c:468 kasan_report+0x117/0x150 mm/kasan/report.c:581 mcp2221_raw_event+0x1062/0x1240 drivers/hid/hid-mcp2221.c:856 hid_input_report+0x400/0x520 drivers/hid/hid-core.c:2095 hid_irq_in+0x479/0x6d0 drivers/hid/usbhid/hid-core.c:284 __usb_hcd_giveback_urb+0x35f/0x520 drivers/usb/core/hcd.c:1650 dummy_timer+0x88a/0x3140 drivers/usb/gadget/udc/dummy_hcd.c:1993 __run_hrtimer kernel/time/hrtimer.c:1750 [inline] __hrtimer_run_queues+0x51e/0xc40 kernel/time/hrtimer.c:1814 hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1831 handle_softirqs+0x280/0x820 kernel/softirq.c:578 __do_softirq kernel/softirq.c:612 [inline] invoke_softirq kernel/softirq.c:452 [inline] __irq_exit_rcu+0xc7/0x190 kernel/softirq.c:661 irq_exit_rcu+0x9/0x20 kernel/softirq.c:673 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1088 [inline] sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1088 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:687 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xa9/0x110 kernel/locking/spinlock.c:194 Code: 74 05 e8 ea 7c 13 f7 48 c7 44 24 20 00 00 00 00 9c 8f 44 24 20 f6 44 24 21 02 75 4b f7 c3 00 02 00 00 74 01 fb bf 01 00 00 00 f2 f8 e2 f6 65 8b 05 e3 41 8b 75 85 c0 74 3c 48 c7 04 24 0e 36 RSP: 0018:ffffc900049f7ba0 EFLAGS: 00000206 RAX: 4a2eef3a67e85200 RBX: 0000000000000a06 RCX: 4a2eef3a67e85200 RDX: dffffc0000000000 RSI: ffffffff8aaabce0 RDI: 0000000000000001 RBP: ffffc900049f7c30 R08: ffffffff8e4a8d6f R09: 1ffffffff1c951ad R10: dffffc0000000000 R11: fffffbfff1c951ae R12: dffffc0000000000 R13: ffffc900049f7dc0 R14: ffff8880b8f2b700 R15: 1ffff9200093ef74 hrtimer_start_expires include/linux/hrtimer.h:435 [inline] hrtimer_sleeper_start_expires kernel/time/hrtimer.c:2012 [inline] do_nanosleep+0x17f/0x5f0 kernel/time/hrtimer.c:2088 hrtimer_nanosleep+0x15f/0x350 kernel/time/hrtimer.c:2139 __do_sys_clock_nanosleep kernel/time/posix-timers.c:1397 [inline] __se_sys_clock_nanosleep+0x2ea/0x370 kernel/time/posix-timers.c:1374 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f84a79c1f85 Code: 24 0c 89 3c 24 48 89 4c 24 18 e8 f6 54 ff ff 4c 8b 54 24 18 48 8b 54 24 10 41 89 c0 8b 74 24 0c 8b 3c 24 b8 e6 00 00 00 0f 05 <44> 89 c7 48 89 04 24 e8 4f 55 ff ff 48 8b 04 24 48 83 c4 28 f7 d8 RSP: 002b:00007f84a88abf60 EFLAGS: 00000293 ORIG_RAX: 00000000000000e6 RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f84a79c1f85 RDX: 00007f84a88abfa0 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: 00002000000004c0 R13: 0000000000000000 R14: 00007f84a7be5fa0 R15: 00007ffceb4f1448 The buggy address belongs to the physical page: page:ffffea0000c203c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3080f flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000000 0000000000000000 ffffea0000c203c8 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 0x1f2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_MEMALLOC|__GFP_HARDWALL), pid 23, tgid 23 (kworker/1:0), ts 72772959915, free_ts 119456500283 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1cd/0x210 mm/page_alloc.c:1554 prep_new_page mm/page_alloc.c:1561 [inline] get_page_from_freelist+0x195c/0x19f0 mm/page_alloc.c:3191 __alloc_pages+0x1e3/0x460 mm/page_alloc.c:4457 alloc_slab_page+0x5d/0x170 mm/slub.c:1881 allocate_slab mm/slub.c:2028 [inline] new_slab+0x87/0x2e0 mm/slub.c:2081 ___slab_alloc+0xc6d/0x1300 mm/slub.c:3253 __slab_alloc mm/slub.c:3339 [inline] __slab_alloc_node mm/slub.c:3392 [inline] slab_alloc_node mm/slub.c:3485 [inline] kmem_cache_alloc_node+0x1ea/0x330 mm/slub.c:3540 kmalloc_reserve+0x95/0x260 net/core/skbuff.c:559 __alloc_skb+0x138/0x2c0 net/core/skbuff.c:650 __netdev_alloc_skb+0x10c/0x500 net/core/skbuff.c:714 netdev_alloc_skb include/linux/skbuff.h:3272 [inline] dev_alloc_skb include/linux/skbuff.h:3285 [inline] __ieee80211_beacon_get+0xe17/0x1600 net/mac80211/tx.c:5447 ieee80211_beacon_get_tim+0xb8/0x560 net/mac80211/tx.c:5569 ieee80211_beacon_get include/net/mac80211.h:5440 [inline] mac80211_hwsim_beacon_tx+0x3c7/0x780 drivers/net/wireless/virtual/mac80211_hwsim.c:2265 __iterate_interfaces+0x243/0x500 net/mac80211/util.c:766 ieee80211_iterate_active_interfaces_atomic+0xdb/0x180 net/mac80211/util.c:802 mac80211_hwsim_beacon+0xbb/0x1b0 drivers/net/wireless/virtual/mac80211_hwsim.c:2295 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1154 [inline] free_unref_page_prepare+0x7ce/0x8e0 mm/page_alloc.c:2336 free_unref_page+0x32/0x2e0 mm/page_alloc.c:2429 __slab_free+0x35e/0x410 mm/slub.c:3736 qlink_free mm/kasan/quarantine.c:166 [inline] qlist_free_all+0x75/0xe0 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x143/0x160 mm/kasan/quarantine.c:292 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook+0x6e/0x4d0 mm/slab.h:767 slab_alloc_node mm/slub.c:3495 [inline] slab_alloc mm/slub.c:3503 [inline] __kmem_cache_alloc_lru mm/slub.c:3510 [inline] kmem_cache_alloc+0x11e/0x2e0 mm/slub.c:3519 getname_flags+0xbb/0x500 fs/namei.c:140 getname fs/namei.c:219 [inline] __do_sys_symlinkat fs/namei.c:4523 [inline] __se_sys_symlinkat fs/namei.c:4520 [inline] __x64_sys_symlinkat+0x7c/0xb0 fs/namei.c:4520 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Memory state around the buggy address: ffff88803080fe80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88803080ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88803080ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888030810000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888030810080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 74 05 je 0x7 2: e8 ea 7c 13 f7 call 0xf7137cf1 7: 48 c7 44 24 20 00 00 movq $0x0,0x20(%rsp) e: 00 00 10: 9c pushf 11: 8f 44 24 20 pop 0x20(%rsp) 15: f6 44 24 21 02 testb $0x2,0x21(%rsp) 1a: 75 4b jne 0x67 1c: f7 c3 00 02 00 00 test $0x200,%ebx 22: 74 01 je 0x25 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 f2 f8 e2 f6 call 0xf6e2f921 <-- trapping instruction 2f: 65 8b 05 e3 41 8b 75 mov %gs:0x758b41e3(%rip),%eax # 0x758b4219 36: 85 c0 test %eax,%eax 38: 74 3c je 0x76 3a: 48 rex.W 3b: c7 .byte 0xc7 3c: 04 24 add $0x24,%al 3e: 0e (bad) 3f: 36 ss