================================================================== BUG: KASAN: use-after-free in mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948 Read of size 1 at addr ffff888139037fff by task syz-executor/26915 CPU: 0 UID: 0 PID: 26915 Comm: syz-executor Not tainted syzkaller #0 PREEMPT(voluntary) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xcd/0x630 mm/kasan/report.c:482 kasan_report+0xe0/0x110 mm/kasan/report.c:595 mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948 __hid_input_report.constprop.0+0x314/0x450 drivers/hid/hid-core.c:2130 hid_irq_in+0x35e/0x870 drivers/hid/usbhid/hid-core.c:286 __usb_hcd_giveback_urb+0x38b/0x610 drivers/usb/core/hcd.c:1661 usb_hcd_giveback_urb+0x39b/0x450 drivers/usb/core/hcd.c:1745 dummy_timer+0x1809/0x3a00 drivers/usb/gadget/udc/dummy_hcd.c:1995 __run_hrtimer kernel/time/hrtimer.c:1761 [inline] __hrtimer_run_queues+0x1ff/0xad0 kernel/time/hrtimer.c:1825 hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1842 handle_softirqs+0x208/0x8d0 kernel/softirq.c:579 __do_softirq kernel/softirq.c:613 [inline] invoke_softirq kernel/softirq.c:453 [inline] __irq_exit_rcu+0xfa/0x160 kernel/softirq.c:680 irq_exit_rcu+0x9/0x30 kernel/softirq.c:696 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline] sysvec_apic_timer_interrupt+0x90/0xb0 arch/x86/kernel/apic/apic.c:1050 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0x31/0x80 kernel/locking/spinlock.c:194 Code: f5 53 48 8b 74 24 10 48 89 fb 48 83 c7 18 e8 56 f2 19 fa 48 89 df e8 3e 46 1a fa f7 c5 00 02 00 00 75 23 9c 58 f6 c4 02 75 37 01 00 00 00 e8 a5 9c 0d fa 65 8b 05 5e 3e 52 05 85 c0 74 16 5b RSP: 0018:ffffc9001371fc68 EFLAGS: 00000246 RAX: 0000000000000006 RBX: ffff888111271b20 RCX: ffffffff8185d4ef RDX: 0000000000000000 RSI: ffffffff88d28e94 RDI: ffffffff878966e0 RBP: 0000000000000282 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff8a9d90d7 R11: 0000000000000000 R12: ffffffff81426432 R13: ffffed1026f9ca17 R14: ffffc9001371fd10 R15: 0000000000000000 do_wait+0x347/0x5a0 kernel/exit.c:1715 kernel_wait4+0x16b/0x280 kernel/exit.c:1865 __do_sys_wait4+0x15d/0x170 kernel/exit.c:1893 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4d0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f540e094fd3 Code: 00 00 0f 1f 44 00 00 31 c9 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 80 3d 91 35 23 00 00 49 89 ca 74 14 b8 3d 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 5d c3 0f 1f 40 00 48 83 ec 28 89 54 24 14 48 RSP: 002b:00007ffc47d34ce8 EFLAGS: 00000202 ORIG_RAX: 000000000000003d RAX: ffffffffffffffda RBX: 0000000000000457 RCX: 00007f540e094fd3 RDX: 0000000040000001 RSI: 00007ffc47d34d2c RDI: 00000000ffffffff RBP: 00007ffc47d34d2c R08: 00000000000885f4 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000001388 R13: 00000000000927c0 R14: 0000000000319268 R15: 00007ffc47d34d80 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x139037 flags: 0x200000000000000(node=0|zone=2) raw: 0200000000000000 0000000000000000 00000000ffffffff 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 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 27052, tgid 27052 (modprobe), ts 2165037364678, free_ts 2352682334160 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0xf98/0x2ce0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x259/0x21e0 mm/page_alloc.c:5148 alloc_pages_mpol+0xe4/0x410 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2492 [inline] allocate_slab mm/slub.c:2660 [inline] new_slab+0x247/0x330 mm/slub.c:2714 ___slab_alloc+0xc55/0x1620 mm/slub.c:3901 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3992 __slab_alloc_node mm/slub.c:4067 [inline] slab_alloc_node mm/slub.c:4228 [inline] kmem_cache_alloc_noprof+0x1f9/0x3b0 mm/slub.c:4247 mt_alloc_one lib/maple_tree.c:176 [inline] mas_alloc_nodes+0x18b/0x8b0 lib/maple_tree.c:1255 mas_node_count_gfp+0x105/0x130 lib/maple_tree.c:1337 mas_preallocate+0x7e0/0xde0 lib/maple_tree.c:5537 vma_iter_prealloc mm/vma.h:462 [inline] __split_vma+0x34a/0x1040 mm/vma.c:528 vms_gather_munmap_vmas+0x3b1/0x12c0 mm/vma.c:1380 __mmap_prepare mm/vma.c:2359 [inline] __mmap_region+0x436/0x25d0 mm/vma.c:2651 mmap_region+0x1ab/0x3f0 mm/vma.c:2739 do_mmap+0xa2e/0x11f0 mm/mmap.c:558 page last free pid 14742 tgid 14742 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0x78a/0xfd0 mm/page_alloc.c:2895 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4d/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x4e/0x70 mm/kasan/common.c:340 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4191 [inline] slab_alloc_node mm/slub.c:4240 [inline] kmem_cache_alloc_node_noprof+0x14d/0x3a0 mm/slub.c:4292 __alloc_skb+0x2b2/0x380 net/core/skbuff.c:659 alloc_skb include/linux/skbuff.h:1336 [inline] netlink_alloc_large_skb+0x69/0x130 net/netlink/af_netlink.c:1186 netlink_sendmsg+0x6a1/0xdd0 net/netlink/af_netlink.c:1871 sock_sendmsg_nosec net/socket.c:714 [inline] __sock_sendmsg net/socket.c:729 [inline] ____sys_sendmsg+0xa98/0xc70 net/socket.c:2614 ___sys_sendmsg+0x134/0x1d0 net/socket.c:2668 __sys_sendmsg+0x16d/0x220 net/socket.c:2700 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4d0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888139037e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888139037f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888139037f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888139038000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888139038080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: f5 cmc 1: 53 push %rbx 2: 48 8b 74 24 10 mov 0x10(%rsp),%rsi 7: 48 89 fb mov %rdi,%rbx a: 48 83 c7 18 add $0x18,%rdi e: e8 56 f2 19 fa call 0xfa19f269 13: 48 89 df mov %rbx,%rdi 16: e8 3e 46 1a fa call 0xfa1a4659 1b: f7 c5 00 02 00 00 test $0x200,%ebp 21: 75 23 jne 0x46 23: 9c pushf 24: 58 pop %rax 25: f6 c4 02 test $0x2,%ah 28: 75 37 jne 0x61 * 2a: bf 01 00 00 00 mov $0x1,%edi <-- trapping instruction 2f: e8 a5 9c 0d fa call 0xfa0d9cd9 34: 65 8b 05 5e 3e 52 05 mov %gs:0x5523e5e(%rip),%eax # 0x5523e99 3b: 85 c0 test %eax,%eax 3d: 74 16 je 0x55 3f: 5b pop %rbx