================================================================== BUG: KASAN: use-after-free in mcp2221_raw_event+0x103c/0x10a0 drivers/hid/hid-mcp2221.c:948 Read of size 1 at addr ffff88813483bfff by task syz.3.1419/10043 CPU: 1 UID: 0 PID: 10043 Comm: syz.3.1419 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 mcp2221_raw_event+0x103c/0x10a0 drivers/hid/hid-mcp2221.c:948 __hid_input_report.constprop.0+0x314/0x460 drivers/hid/hid-core.c:2139 hid_irq_in+0x52e/0x6b0 drivers/hid/usbhid/hid-core.c:286 __usb_hcd_giveback_urb+0x38d/0x610 drivers/usb/core/hcd.c:1657 usb_hcd_giveback_urb+0x3ca/0x4a0 drivers/usb/core/hcd.c:1741 dummy_timer+0xd85/0x3670 drivers/usb/gadget/udc/dummy_hcd.c:1995 __run_hrtimer kernel/time/hrtimer.c:1777 [inline] __hrtimer_run_queues+0x516/0x990 kernel/time/hrtimer.c:1841 hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1858 handle_softirqs+0x1dd/0x8f0 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0xed/0x150 kernel/softirq.c:723 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline] sysvec_apic_timer_interrupt+0x8f/0xb0 arch/x86/kernel/apic/apic.c:1056 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 RIP: 0010:mast_fill_bnode+0x78a/0x1000 lib/maple_tree.c:2844 Code: 38 4c 8d b5 58 02 00 00 4c 89 f2 48 c1 ea 03 0f b6 04 02 84 c0 74 06 0f 8e aa 05 00 00 44 0f b6 ad 58 02 00 00 e9 54 fe ff ff a1 ce 65 fa 4c 89 e7 e8 39 c7 ff ff 48 8b 54 24 08 48 b8 00 00 RSP: 0018:ffffc90001b6edb0 EFLAGS: 00000246 RAX: 0000000000000000 RBX: ffffc90001b6eff0 RCX: ffffffff874b6c78 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8881103f8000 RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffc90001b6fd88 R13: ffffc90001b6f010 R14: ffffc90001b6f150 R15: ffffc90001b6f2f8 mas_push_data+0xa8b/0x19a0 lib/maple_tree.c:2962 mas_split+0x3e7/0x16b0 lib/maple_tree.c:3027 mas_commit_b_node.isra.0+0x76/0xc0 lib/maple_tree.c:3072 mas_wr_bnode+0x140/0x1d0 lib/maple_tree.c:3739 mas_wr_store_entry+0x7e3/0x2390 lib/maple_tree.c:3771 mas_store_prealloc+0x6e5/0xfb0 lib/maple_tree.c:5169 vma_iter_store_new mm/vma.h:551 [inline] vma_complete+0x974/0xe70 mm/vma.c:351 __split_vma+0xa3d/0xdf0 mm/vma.c:564 split_vma mm/vma.c:594 [inline] vma_modify+0x10c9/0x22c0 mm/vma.c:1672 vma_modify_flags+0x1f2/0x350 mm/vma.c:1692 mprotect_fixup+0x209/0xb40 mm/mprotect.c:756 do_mprotect_pkey+0x9e1/0xe70 mm/mprotect.c:930 __do_sys_mprotect mm/mprotect.c:951 [inline] __se_sys_mprotect mm/mprotect.c:948 [inline] __x64_sys_mprotect+0x78/0xc0 mm/mprotect.c:948 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:0x7faeb163aab7 Code: 89 38 eb 84 0f 1f 80 00 00 00 00 48 c7 c2 e8 ff ff ff f7 d8 64 89 02 48 c7 c0 ff ff ff ff e9 7a ff ff ff b8 0a 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffc37e142f8 EFLAGS: 00000206 ORIG_RAX: 000000000000000a RAX: ffffffffffffffda RBX: 00007faeb00766c0 RCX: 00007faeb163aab7 RDX: 0000000000000003 RSI: 0000000000020000 RDI: 00007faeb0057000 RBP: 0000000000000000 R08: 00000000ffffffff R09: 0000000000000000 R10: 0000000000021000 R11: 0000000000000206 R12: 00007ffc37e14450 R13: ffffffffffffffc0 R14: 0000000000001000 R15: 0000000000000000 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13483b flags: 0x200000000000000(node=0|zone=2) raw: 0200000000000000 dead000000000100 dead000000000122 0000000000000000 raw: 0000000000000000 ffff8881174fc360 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 2976, tgid 2976 (syz-executor), ts 868792700633, free_ts 872413136477 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_frozen_pages_noprof mm/mempolicy.c:2557 [inline] alloc_pages_noprof+0x131/0x390 mm/mempolicy.c:2577 pagetable_alloc_noprof include/linux/mm.h:3190 [inline] __pte_alloc_one_noprof include/asm-generic/pgalloc.h:76 [inline] pte_alloc_one+0x1e/0x3e0 arch/x86/mm/pgtable.c:18 __pte_alloc+0x6d/0x3f0 mm/memory.c:453 copy_pte_range mm/memory.c:1237 [inline] copy_pmd_range mm/memory.c:1392 [inline] copy_pud_range mm/memory.c:1429 [inline] copy_p4d_range mm/memory.c:1453 [inline] copy_page_range+0x1605/0x25e0 mm/memory.c:1535 dup_mmap+0xbb3/0x1c30 mm/mmap.c:1827 dup_mm kernel/fork.c:1529 [inline] copy_mm kernel/fork.c:1581 [inline] copy_process+0x718c/0x77a0 kernel/fork.c:2221 kernel_clone+0xfc/0x930 kernel/fork.c:2651 __do_sys_clone+0xd9/0x120 kernel/fork.c:2792 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 page last free pid 9 tgid 9 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 __pagetable_free include/linux/mm.h:3200 [inline] pagetable_free include/linux/mm.h:3224 [inline] pagetable_dtor_free include/linux/mm.h:3328 [inline] __tlb_remove_table include/asm-generic/tlb.h:220 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x2b2/0x390 mm/mmu_gather.c:290 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0x7c0/0x15c0 kernel/rcu/tree.c:2857 handle_softirqs+0x1dd/0x8f0 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0xed/0x150 kernel/softirq.c:723 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline] sysvec_apic_timer_interrupt+0x8f/0xb0 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: ffff88813483be80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88813483bf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88813483bf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88813483c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88813483c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 38 4c 8d b5 cmp %cl,-0x4b(%rbp,%rcx,4) 4: 58 pop %rax 5: 02 00 add (%rax),%al 7: 00 4c 89 f2 add %cl,-0xe(%rcx,%rcx,4) b: 48 c1 ea 03 shr $0x3,%rdx f: 0f b6 04 02 movzbl (%rdx,%rax,1),%eax 13: 84 c0 test %al,%al 15: 74 06 je 0x1d 17: 0f 8e aa 05 00 00 jle 0x5c7 1d: 44 0f b6 ad 58 02 00 movzbl 0x258(%rbp),%r13d 24: 00 25: e9 54 fe ff ff jmp 0xfffffe7e * 2a: e8 a1 ce 65 fa call 0xfa65ced0 <-- trapping instruction 2f: 4c 89 e7 mov %r12,%rdi 32: e8 39 c7 ff ff call 0xffffc770 37: 48 8b 54 24 08 mov 0x8(%rsp),%rdx 3c: 48 rex.W 3d: b8 .byte 0xb8