================================================================== BUG: KASAN: use-after-free in mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:948 Read of size 1 at addr ffff888058f0bfff by task swapper/1/0 CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:948 __hid_input_report drivers/hid/hid-core.c:2139 [inline] hid_input_report+0x41d/0x580 drivers/hid/hid-core.c:2166 hid_irq_in+0x47e/0x6d0 drivers/hid/usbhid/hid-core.c:286 __usb_hcd_giveback_urb+0x376/0x540 drivers/usb/core/hcd.c:1661 dummy_timer+0x85f/0x45b0 drivers/usb/gadget/udc/dummy_hcd.c:1995 __run_hrtimer kernel/time/hrtimer.c:1777 [inline] __hrtimer_run_queues+0x51c/0xc30 kernel/time/hrtimer.c:1841 hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1858 handle_softirqs+0x27d/0x850 kernel/softirq.c:626 __do_softirq kernel/softirq.c:660 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:727 irq_exit_rcu+0x9/0x30 kernel/softirq.c:743 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1056 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 RIP: 0010:pv_native_safe_halt+0x13/0x20 arch/x86/kernel/paravirt.c:82 Code: 93 ef 02 00 cc cc cc 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 66 90 0f 00 2d 73 f0 0e 00 f3 0f 1e fa fb f4 cc cc cc cc cc cc cc cc cc cc cc cc 90 90 90 90 90 90 90 90 90 RSP: 0018:ffffc90000197de0 EFLAGS: 000002c6 RAX: fcb28b3fcf17cb00 RBX: ffffffff8197913a RCX: fcb28b3fcf17cb00 RDX: 0000000000000001 RSI: ffffffff8d783537 RDI: ffffffff8bc018e0 RBP: ffffc90000197f10 R08: ffff8880b87336db R09: 1ffff110170e66db R10: dffffc0000000000 R11: ffffed10170e66dc R12: ffffffff8f813370 R13: 1ffff11003a5eb70 R14: 0000000000000001 R15: 0000000000000001 arch_safe_halt arch/x86/include/asm/paravirt.h:107 [inline] default_idle+0x13/0x20 arch/x86/kernel/process.c:767 default_idle_call+0x73/0xb0 kernel/sched/idle.c:122 cpuidle_idle_call kernel/sched/idle.c:191 [inline] do_idle+0x1ea/0x520 kernel/sched/idle.c:332 cpu_startup_entry+0x44/0x60 kernel/sched/idle.c:430 start_secondary+0x101/0x110 arch/x86/kernel/smpboot.c:312 common_startup_64+0x13e/0x147 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888058f0b000 pfn:0x58f0b flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000100 dead000000000122 0000000000000000 raw: ffff888058f0b000 00000000000c0000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Unmovable, gfp_mask 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 6452, tgid 6451 (syz.4.117), ts 121402956914, free_ts 133174804390 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x234/0x290 mm/page_alloc.c:1846 prep_new_page mm/page_alloc.c:1854 [inline] get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3915 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5210 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486 alloc_slab_page mm/slub.c:3075 [inline] allocate_slab+0x86/0x3b0 mm/slub.c:3248 new_slab mm/slub.c:3302 [inline] ___slab_alloc+0xf2b/0x1960 mm/slub.c:4651 __kmem_cache_alloc_bulk+0x1d9/0x550 mm/slub.c:7424 kmem_cache_alloc_bulk_noprof+0x3ba/0x720 mm/slub.c:7490 __io_alloc_req_refill+0x9d/0x340 io_uring/io_uring.c:1025 io_alloc_req io_uring/io_uring.h:562 [inline] io_submit_sqes+0xe58/0x2140 io_uring/io_uring.c:2423 __do_sys_io_uring_enter io_uring/io_uring.c:3277 [inline] __se_sys_io_uring_enter+0x2e0/0x2b60 io_uring/io_uring.c:3216 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 0 tgid 0 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0xbc8/0xd30 mm/page_alloc.c:2943 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0xd70/0x1870 kernel/rcu/tree.c:2857 handle_softirqs+0x27d/0x850 kernel/softirq.c:626 __do_softirq kernel/softirq.c:660 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:727 irq_exit_rcu+0x9/0x30 kernel/softirq.c:743 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1056 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 Memory state around the buggy address: ffff888058f0be80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888058f0bf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888058f0bf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888058f0c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888058f0c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 93 xchg %eax,%ebx 1: ef out %eax,(%dx) 2: 02 00 add (%rax),%al 4: cc int3 5: cc int3 6: cc int3 7: 90 nop 8: 90 nop 9: 90 nop a: 90 nop b: 90 nop c: 90 nop d: 90 nop e: 90 nop f: 90 nop 10: 90 nop 11: 90 nop 12: 90 nop 13: 90 nop 14: 90 nop 15: 90 nop 16: 90 nop 17: f3 0f 1e fa endbr64 1b: 66 90 xchg %ax,%ax 1d: 0f 00 2d 73 f0 0e 00 verw 0xef073(%rip) # 0xef097 24: f3 0f 1e fa endbr64 28: fb sti 29: f4 hlt * 2a: c3 ret <-- trapping instruction 2b: cc int3 2c: cc int3 2d: cc int3 2e: cc int3 2f: cc int3 30: cc int3 31: cc int3 32: cc int3 33: cc int3 34: cc int3 35: cc int3 36: cc int3 37: 90 nop 38: 90 nop 39: 90 nop 3a: 90 nop 3b: 90 nop 3c: 90 nop 3d: 90 nop 3e: 90 nop 3f: 90 nop