================================================================== BUG: KASAN: use-after-free in mcp2221_raw_event+0x110d/0x1140 drivers/hid/hid-mcp2221.c:975 Read of size 1 at addr ffff888135ae3fff by task syz.0.94/5575 CPU: 0 UID: 0 PID: 5575 Comm: syz.0.94 Not tainted syzkaller #0 PREEMPT(lazy) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026 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+0x13d/0x4b0 mm/kasan/report.c:482 kasan_report+0xdf/0x1c0 mm/kasan/report.c:595 mcp2221_raw_event+0x110d/0x1140 drivers/hid/hid-mcp2221.c:975 __hid_input_report.constprop.0+0x319/0x470 drivers/hid/hid-core.c:2175 hid_irq_in+0x55d/0x710 drivers/hid/usbhid/hid-core.c:287 __usb_hcd_giveback_urb+0x38e/0x610 drivers/usb/core/hcd.c:1657 usb_hcd_giveback_urb+0x3ca/0x4a0 drivers/usb/core/hcd.c:1741 dummy_timer+0xdaf/0x3820 drivers/usb/gadget/udc/dummy_hcd.c:2023 __run_hrtimer kernel/time/hrtimer.c:2074 [inline] __hrtimer_run_queues+0x462/0x9c0 kernel/time/hrtimer.c:2131 hrtimer_run_softirq+0x1ca/0x360 kernel/time/hrtimer.c:2148 handle_softirqs+0x1d9/0x9b0 kernel/softirq.c:645 __do_softirq kernel/softirq.c:679 [inline] invoke_softirq kernel/softirq.c:519 [inline] __irq_exit_rcu+0x168/0x210 kernel/softirq.c:758 irq_exit_rcu+0x9/0x30 kernel/softirq.c:775 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline] sysvec_apic_timer_interrupt+0x8f/0xb0 arch/x86/kernel/apic/apic.c:1062 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674 RIP: 0010:lock_is_held_type+0xf9/0x140 kernel/locking/lockdep.c:6021 Code: 65 0f c1 15 b1 d7 9a 05 83 fa 01 8b 44 24 04 75 2d 9c 5a 80 e6 02 75 47 41 f7 c5 00 02 00 00 74 01 fb 48 83 c4 08 5b 5d 41 5c <41> 5d 41 5e 41 5f c3 cc cc cc cc c3 cc cc cc cc 31 c0 eb ad 90 0f RSP: 0018:ffffc9000441fb20 EFLAGS: 00000282 RAX: 0000000000000000 RBX: 1ffff92000883f68 RCX: 0000000000000001 RDX: 0000000000000046 RSI: ffffffff892bdfc5 RDI: ffffffff87d2bd80 RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff87aa0520 R13: 0000000000000246 R14: ffffc9000441fd28 R15: ffffc9000441fd20 lock_is_held include/linux/lockdep.h:249 [inline] __might_resched+0x241/0x330 kernel/sched/core.c:9226 __wait_for_common+0x8f/0x4c0 kernel/sched/completion.c:116 wait_for_common kernel/sched/completion.c:132 [inline] wait_for_completion_interruptible+0x1f/0x40 kernel/sched/completion.c:221 raw_process_ep_io+0x66d/0xc40 drivers/usb/gadget/legacy/raw_gadget.c:1122 raw_ioctl_ep_write drivers/usb/gadget/legacy/raw_gadget.c:1153 [inline] raw_ioctl+0x25a/0x2b80 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 fs/ioctl.c:583 [inline] __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x119/0x710 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fb03189e1eb 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:00007fb0302f5f60 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000009 RCX: 00007fb03189e1eb RDX: 00007fb0302f5fe0 RSI: 0000000040085507 RDI: 0000000000000003 RBP: 0000000000000003 R08: 00007fb031c50320 R09: 0000000000000000 R10: 0000000000000003 R11: 0000000000000246 R12: 00002000000000c0 R13: 0000000000000000 R14: 00007fb031b25fa0 R15: 00007ffdd0c9c188 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888135ae3a80 pfn:0x135ae3 flags: 0x200000000000000(node=0|zone=2) page_type: f0(buddy) raw: 0200000000000000 ffffea000440f348 ffffea0004d6b748 0000000000000000 raw: ffff888135ae3a80 0000000000000000 00000000f0000000 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 0xd2800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3488, tgid 3488 (modprobe), ts 63795530721 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1871 prep_new_page mm/page_alloc.c:1879 [inline] get_page_from_freelist+0xf4b/0x3440 mm/page_alloc.c:3943 __alloc_frozen_pages_noprof+0x2d7/0x2f70 mm/page_alloc.c:5436 alloc_slab_page mm/slub.c:3347 [inline] allocate_slab mm/slub.c:3462 [inline] new_slab+0xa9/0x6e0 mm/slub.c:3513 refill_objects+0xe3/0x410 mm/slub.c:7418 refill_sheaf mm/slub.c:2885 [inline] __pcs_replace_empty_main+0x35e/0x650 mm/slub.c:4774 alloc_from_pcs mm/slub.c:4850 [inline] slab_alloc_node mm/slub.c:4984 [inline] __kmalloc_cache_noprof+0x4a1/0x680 mm/slub.c:5559 _kmalloc_noprof include/linux/slab.h:991 [inline] slab_free_hook mm/slub.c:2700 [inline] slab_free mm/slub.c:6509 [inline] kmem_cache_free+0x3f0/0x650 mm/slub.c:6636 tear_down_vmas+0x2a5/0x610 mm/mmap.c:1277 exit_mmap+0x469/0xa00 mm/mmap.c:1335 __mmput kernel/fork.c:1193 [inline] mmput+0xe0/0x430 kernel/fork.c:1216 exit_mm kernel/exit.c:592 [inline] do_exit+0x83b/0x2a50 kernel/exit.c:974 do_group_exit+0xd5/0x2a0 kernel/exit.c:1129 __do_sys_exit_group kernel/exit.c:1140 [inline] __se_sys_exit_group kernel/exit.c:1138 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1138 x64_sys_call+0x1567/0x1570 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x119/0x710 arch/x86/entry/syscall_64.c:84 page last free pid 2857 tgid 2857 ts 157729573430 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1418 [inline] __free_frozen_pages+0x714/0xfc0 mm/page_alloc.c:2962 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x47/0xf0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x4e/0x70 mm/kasan/common.c:361 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4683 [inline] slab_alloc_node mm/slub.c:4996 [inline] kmem_cache_alloc_node_noprof+0x27d/0x690 mm/slub.c:5068 __alloc_skb+0x140/0x710 net/core/skbuff.c:704 alloc_skb include/linux/skbuff.h:1384 [inline] alloc_skb_with_frags+0xdd/0x760 net/core/skbuff.c:6799 sock_alloc_send_pskb+0x801/0x980 net/core/sock.c:3022 unix_dgram_sendmsg+0x3c7/0x1810 net/unix/af_unix.c:2144 sock_sendmsg_nosec net/socket.c:800 [inline] __sock_sendmsg net/socket.c:815 [inline] __sys_sendto+0x48b/0x4e0 net/socket.c:2281 __do_sys_sendto net/socket.c:2288 [inline] __se_sys_sendto net/socket.c:2284 [inline] __x64_sys_sendto+0xe0/0x1c0 net/socket.c:2284 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x119/0x710 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888135ae3e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888135ae3f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888135ae3f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888135ae4000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888135ae4080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 65 0f c1 15 b1 d7 9a xadd %edx,%gs:0x59ad7b1(%rip) # 0x59ad7b9 7: 05 8: 83 fa 01 cmp $0x1,%edx b: 8b 44 24 04 mov 0x4(%rsp),%eax f: 75 2d jne 0x3e 11: 9c pushf 12: 5a pop %rdx 13: 80 e6 02 and $0x2,%dh 16: 75 47 jne 0x5f 18: 41 f7 c5 00 02 00 00 test $0x200,%r13d 1f: 74 01 je 0x22 21: fb sti 22: 48 83 c4 08 add $0x8,%rsp 26: 5b pop %rbx 27: 5d pop %rbp 28: 41 5c pop %r12 * 2a: 41 5d pop %r13 <-- trapping instruction 2c: 41 5e pop %r14 2e: 41 5f pop %r15 30: c3 ret 31: cc int3 32: cc int3 33: cc int3 34: cc int3 35: c3 ret 36: cc int3 37: cc int3 38: cc int3 39: cc int3 3a: 31 c0 xor %eax,%eax 3c: eb ad jmp 0xffffffeb 3e: 90 nop 3f: 0f .byte 0xf