================================================================== BUG: KASAN: use-after-free in mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:957 Read of size 1 at addr ffff888055e4ffff by task syz.4.697/8533 CPU: 0 UID: 0 PID: 8533 Comm: syz.4.697 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description+0x55/0x1e0 mm/kasan/report.c:378 print_report+0x58/0x70 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:957 __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:1657 dummy_timer+0xbc0/0x4650 drivers/usb/gadget/udc/dummy_hcd.c:2005 __run_hrtimer kernel/time/hrtimer.c:1930 [inline] __hrtimer_run_queues+0x3c0/0xa20 kernel/time/hrtimer.c:1994 hrtimer_run_softirq+0x17a/0x240 kernel/time/hrtimer.c:2011 handle_softirqs+0x22a/0x840 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0xca/0x220 kernel/softirq.c:735 irq_exit_rcu+0x9/0x30 kernel/softirq.c:752 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1061 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1061 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:179 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0x47/0x80 kernel/locking/spinlock.c:198 Code: f7 e8 bd fd e5 f5 f7 c3 00 02 00 00 74 05 e8 60 69 11 f6 9c 58 a9 00 02 00 00 75 27 f7 c3 00 02 00 00 74 01 fb bf 01 00 00 00 b4 96 d7 f5 65 8b 05 dd a7 84 07 85 c0 74 18 5b 41 5e e9 41 48 RSP: 0018:ffffc90003f1fa08 EFLAGS: 00000206 RAX: 0000000000000006 RBX: 0000000000000283 RCX: 0000000080000001 RDX: 0000000000000000 RSI: ffffffff8e106c7e RDI: 0000000000000001 RBP: ffffc90003f1fb70 R08: ffffffff9033bef7 R09: 1ffffffff20677de R10: dffffc0000000000 R11: fffffbfff20677df R12: dffffc0000000000 R13: 1ffff920007e3f50 R14: ffff8880330f6008 R15: 0000000000000001 spin_unlock_irqrestore include/linux/spinlock.h:408 [inline] raw_process_ep_io+0x293/0xd90 drivers/usb/gadget/legacy/raw_gadget.c:1140 raw_ioctl_ep_write drivers/usb/gadget/legacy/raw_gadget.c:1153 [inline] raw_ioctl+0x252c/0x41c0 drivers/usb/gadget/legacy/raw_gadget.c:1325 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f678df9c4ab Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00 RSP: 002b:00007f678eefdf60 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f678df9c4ab RDX: 00007f678eefdfe0 RSI: 0000000040085507 RDI: 0000000000000003 RBP: 0000000000000003 R08: 00007f678e340320 R09: 0000000000000000 R10: 0000000000000003 R11: 0000000000000246 R12: 0000200000000140 R13: 0000000000000000 R14: 00007f678e215fa0 R15: 00007fffad72a358 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888000000000 pfn:0x55e4f flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000100 dead000000000122 0000000000000000 raw: ffff888000000000 0000000000000000 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 0x440dc0(GFP_KERNEL_ACCOUNT|__GFP_ZERO|__GFP_COMP), pid 7061, tgid 7058 (syz.3.315), ts 157223521172, free_ts 157660662804 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x231/0x280 mm/page_alloc.c:1858 prep_new_page mm/page_alloc.c:1866 [inline] get_page_from_freelist+0x24ba/0x2540 mm/page_alloc.c:3946 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5226 alloc_pages_mpol+0x235/0x490 mm/mempolicy.c:2490 alloc_frozen_pages_noprof mm/mempolicy.c:2561 [inline] alloc_pages_noprof+0xac/0x2a0 mm/mempolicy.c:2581 pagetable_alloc_noprof include/linux/mm.h:3651 [inline] pmd_alloc_one_noprof include/asm-generic/pgalloc.h:143 [inline] __pmd_alloc+0x3a/0x5c0 mm/memory.c:6847 pmd_alloc include/linux/mm.h:3567 [inline] copy_pmd_range+0x5552/0x5970 mm/memory.c:1372 copy_pud_range mm/memory.c:1429 [inline] copy_p4d_range mm/memory.c:1453 [inline] copy_page_range+0xbe8/0x11f0 mm/memory.c:1539 dup_mmap+0xf40/0x1d90 mm/mmap.c:1840 dup_mm kernel/fork.c:1534 [inline] copy_mm+0x13b/0x4a0 kernel/fork.c:1586 copy_process+0x1efd/0x4430 kernel/fork.c:2261 kernel_clone+0x2d7/0x940 kernel/fork.c:2723 __do_sys_clone kernel/fork.c:2864 [inline] __se_sys_clone kernel/fork.c:2848 [inline] __x64_sys_clone+0x1b6/0x230 kernel/fork.c:2848 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 7078 tgid 7078 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1402 [inline] __free_frozen_pages+0xbc7/0xd30 mm/page_alloc.c:2943 __tlb_remove_table_free mm/mmu_gather.c:228 [inline] tlb_remove_table_rcu+0x85/0x100 mm/mmu_gather.c:291 rcu_do_batch kernel/rcu/tree.c:2617 [inline] rcu_core+0x7cd/0x1070 kernel/rcu/tree.c:2869 handle_softirqs+0x22a/0x840 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0xca/0x220 kernel/softirq.c:735 irq_exit_rcu+0x9/0x30 kernel/softirq.c:752 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1061 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1061 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 Memory state around the buggy address: ffff888055e4fe80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888055e4ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888055e4ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888055e50000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888055e50080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: f7 e8 imul %eax 2: bd fd e5 f5 f7 mov $0xf7f5e5fd,%ebp 7: c3 ret 8: 00 02 add %al,(%rdx) a: 00 00 add %al,(%rax) c: 74 05 je 0x13 e: e8 60 69 11 f6 call 0xf6116973 13: 9c pushf 14: 58 pop %rax 15: a9 00 02 00 00 test $0x200,%eax 1a: 75 27 jne 0x43 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 b4 96 d7 f5 call 0xf5d796e3 <-- trapping instruction 2f: 65 8b 05 dd a7 84 07 mov %gs:0x784a7dd(%rip),%eax # 0x784a813 36: 85 c0 test %eax,%eax 38: 74 18 je 0x52 3a: 5b pop %rbx 3b: 41 5e pop %r14 3d: e9 .byte 0xe9 3e: 41 rex.B 3f: 48 rex.W