================================================================== BUG: KASAN: use-after-free in mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948 Read of size 1 at addr ffff88811e6abfff by task kworker/1:3/5228 CPU: 1 UID: 0 PID: 5228 Comm: kworker/1:3 Not tainted syzkaller #0 PREEMPT(voluntary) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Workqueue: usb_hub_wq hub_event 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/0x470 drivers/hid/hid-core.c:2139 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/0x3ad0 drivers/usb/gadget/udc/dummy_hcd.c:1995 __run_hrtimer kernel/time/hrtimer.c:1777 [inline] __hrtimer_run_queues+0x202/0xc40 kernel/time/hrtimer.c:1841 hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1858 handle_softirqs+0x208/0x940 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0xfa/0x160 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+0x90/0xb0 arch/x86/kernel/apic/apic.c:1056 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 RIP: 0010:console_flush_one_record+0x995/0xc60 kernel/printk/printk.c:3216 Code: 00 e8 4f 65 29 00 9c 5d 81 e5 00 02 00 00 31 ff 48 89 ee e8 4d 49 21 00 48 85 ed 0f 85 8e 01 00 00 e8 6f 4e 21 00 fb 4c 89 e8 <48> c1 e8 03 42 80 3c 38 00 0f 84 b4 fe ff ff 4c 89 ef e8 74 12 83 RSP: 0018:ffffc9000234f108 EFLAGS: 00000246 RAX: ffffffff898160f8 RBX: 0000000000000001 RCX: ffffc9001003b000 RDX: 0000000000100000 RSI: ffffffff815e9e01 RDI: 0000000000000007 RBP: 0000000000000000 R08: 0000000000000007 R09: 0000000000000000 R10: 0000000000000000 R11: ffff88811392c528 R12: 0000000000000000 R13: ffffffff898160f8 R14: ffffffff898160a0 R15: dffffc0000000000 console_flush_all kernel/printk/printk.c:3289 [inline] __console_flush_and_unlock kernel/printk/printk.c:3319 [inline] console_unlock+0xef/0x240 kernel/printk/printk.c:3359 vprintk_emit+0x407/0x6b0 kernel/printk/printk.c:2426 dev_vprintk_emit drivers/base/core.c:4914 [inline] dev_printk_emit+0xfa/0x140 drivers/base/core.c:4925 __dev_printk+0xf5/0x270 drivers/base/core.c:4937 _dev_notice+0xe4/0x120 drivers/base/core.c:4982 usb_parse_endpoint drivers/usb/core/config.c:344 [inline] usb_parse_interface drivers/usb/core/config.c:636 [inline] usb_parse_configuration drivers/usb/core/config.c:849 [inline] usb_get_configuration+0x33a4/0x63a0 drivers/usb/core/config.c:998 usb_enumerate_device drivers/usb/core/hub.c:2527 [inline] usb_new_device+0x11f9/0x1a90 drivers/usb/core/hub.c:2665 hub_port_connect drivers/usb/core/hub.c:5567 [inline] hub_port_connect_change drivers/usb/core/hub.c:5707 [inline] port_event drivers/usb/core/hub.c:5871 [inline] hub_event+0x31bf/0x5420 drivers/usb/core/hub.c:5953 process_one_work+0x9ba/0x1b20 kernel/workqueue.c:3257 process_scheduled_works kernel/workqueue.c:3340 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3421 kthread+0x3c5/0x780 kernel/kthread.c:463 ret_from_fork+0x74f/0xa30 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11e6ab 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 4454, tgid 4454 (modprobe), ts 87125291110, free_ts 106604270525 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1af/0x220 mm/page_alloc.c:1846 prep_new_page mm/page_alloc.c:1854 [inline] get_page_from_freelist+0x1058/0x3cb0 mm/page_alloc.c:3915 __alloc_frozen_pages_noprof+0x259/0x21c0 mm/page_alloc.c:5210 alloc_pages_mpol+0xe4/0x410 mm/mempolicy.c:2486 alloc_slab_page mm/slub.c:3075 [inline] allocate_slab mm/slub.c:3248 [inline] new_slab+0x2c3/0x430 mm/slub.c:3302 ___slab_alloc+0xe20/0x1ca0 mm/slub.c:4656 __kmem_cache_alloc_bulk+0x1fb/0x6c0 mm/slub.c:7429 refill_sheaf mm/slub.c:2650 [inline] alloc_full_sheaf mm/slub.c:2671 [inline] __pcs_replace_empty_main+0x2b2/0x4e0 mm/slub.c:5033 alloc_from_pcs mm/slub.c:5121 [inline] slab_alloc_node mm/slub.c:5248 [inline] kmem_cache_alloc_noprof+0x58d/0x740 mm/slub.c:5270 mt_alloc_one lib/maple_tree.c:174 [inline] mas_alloc_nodes+0x27b/0x380 lib/maple_tree.c:1110 mas_preallocate+0x5e3/0xee0 lib/maple_tree.c:5194 vma_iter_prealloc mm/vma.h:502 [inline] __mmap_new_vma mm/vma.c:2478 [inline] __mmap_region+0x1189/0x2750 mm/vma.c:2708 mmap_region+0x1ab/0x3f0 mm/vma.c:2786 do_mmap+0xa2e/0x11f0 mm/mmap.c:558 vm_mmap_pgoff+0x201/0x390 mm/util.c:581 vm_mmap+0x8e/0xc0 mm/util.c:617 page last free pid 2981 tgid 2981 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0x795/0x1010 mm/page_alloc.c:2943 discard_slab mm/slub.c:3346 [inline] __put_partials+0x130/0x170 mm/slub.c:3886 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4c/0xf0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x4e/0x70 mm/kasan/common.c:349 kasan_slab_alloc include/linux/kasan.h:252 [inline] slab_post_alloc_hook mm/slub.c:4953 [inline] slab_alloc_node mm/slub.c:5263 [inline] kmem_cache_alloc_noprof+0x26e/0x740 mm/slub.c:5270 ptlock_alloc+0x1f/0x70 mm/memory.c:7377 ptlock_init include/linux/mm.h:3280 [inline] pagetable_pte_ctor include/linux/mm.h:3334 [inline] __pte_alloc_one_noprof include/asm-generic/pgalloc.h:79 [inline] pte_alloc_one+0x84/0x3d0 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+0x1897/0x4d50 mm/memory.c:1535 dup_mmap+0xbb3/0x1ef0 mm/mmap.c:1827 dup_mm kernel/fork.c:1529 [inline] copy_mm kernel/fork.c:1581 [inline] copy_process+0x6e4f/0x7340 kernel/fork.c:2221 kernel_clone+0xfc/0x910 kernel/fork.c:2651 __do_sys_clone+0xce/0x120 kernel/fork.c:2792 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x570 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88811e6abe80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88811e6abf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88811e6abf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88811e6ac000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88811e6ac080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 00 e8 add %ch,%al 2: 4f rex.WRXB 3: 65 29 00 sub %eax,%gs:(%rax) 6: 9c pushf 7: 5d pop %rbp 8: 81 e5 00 02 00 00 and $0x200,%ebp e: 31 ff xor %edi,%edi 10: 48 89 ee mov %rbp,%rsi 13: e8 4d 49 21 00 call 0x214965 18: 48 85 ed test %rbp,%rbp 1b: 0f 85 8e 01 00 00 jne 0x1af 21: e8 6f 4e 21 00 call 0x214e95 26: fb sti 27: 4c 89 e8 mov %r13,%rax * 2a: 48 c1 e8 03 shr $0x3,%rax <-- trapping instruction 2e: 42 80 3c 38 00 cmpb $0x0,(%rax,%r15,1) 33: 0f 84 b4 fe ff ff je 0xfffffeed 39: 4c 89 ef mov %r13,%rdi 3c: e8 .byte 0xe8 3d: 74 12 je 0x51 3f: 83 .byte 0x83