================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948 Read of size 1 at addr ffff88812c27ffff by task syz.4.3929/23028 CPU: 1 UID: 0 PID: 23028 Comm: syz.4.3929 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+0x311/0x450 drivers/hid/hid-core.c:2139 hid_irq_in+0x35e/0x870 drivers/hid/usbhid/hid-core.c:286 __usb_hcd_giveback_urb+0x388/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:1777 [inline] __hrtimer_run_queues+0x1ff/0xad0 kernel/time/hrtimer.c:1841 hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1858 handle_softirqs+0x205/0x8d0 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:1052 [inline] sysvec_apic_timer_interrupt+0x90/0xb0 arch/x86/kernel/apic/apic.c:1052 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:160 [inline] RIP: 0010:_raw_spin_unlock_irq+0x29/0x50 kernel/locking/spinlock.c:202 Code: 90 f3 0f 1e fa 53 48 8b 74 24 08 48 89 fb 48 83 c7 18 e8 2a 20 14 fa 48 89 df e8 12 74 14 fa e8 8d 9a 3f fa fb bf 01 00 00 00 82 ce 07 fa 65 8b 05 4b 00 51 05 85 c0 74 06 5b c3 cc cc cc cc RSP: 0018:ffffc9001325fbc0 EFLAGS: 00000206 RAX: 00000000000005f9 RBX: ffffc9001325fd38 RCX: ffffffff8186395f RDX: 0000000000000000 RSI: ffffffff88c8724a RDI: 0000000000000001 RBP: ffffc9001325fd30 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff8aa0c9d7 R11: 0000000000000000 R12: dffffc0000000000 R13: 0000000000000001 R14: ffffc9001325fd38 R15: ffff88811bde0000 do_wait_for_common kernel/sched/completion.c:99 [inline] __wait_for_common+0x2ef/0x4e0 kernel/sched/completion.c:121 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/0xc30 drivers/usb/gadget/legacy/raw_gadget.c:1121 raw_ioctl_ep_write drivers/usb/gadget/legacy/raw_gadget.c:1152 [inline] raw_ioctl+0xaab/0x2c30 drivers/usb/gadget/legacy/raw_gadget.c:1324 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+0x18b/0x210 fs/ioctl.c:583 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:0x7f2fb07feacb 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:00007f2faf25df70 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f2fb07feacb RDX: 00007f2faf25dff0 RSI: 0000000040085507 RDI: 0000000000000003 RBP: 0000000000000003 R08: 00007f2fb0b80320 R09: 0000000000000000 R10: 0000000000000003 R11: 0000000000000246 R12: 0000200000000040 R13: 0000000000000000 R14: 00007f2fb0a55fa0 R15: 00007ffeab202508 Allocated by task 22026: kasan_save_stack+0x33/0x60 mm/kasan/common.c:56 kasan_save_track+0x14/0x30 mm/kasan/common.c:77 unpoison_slab_object mm/kasan/common.c:342 [inline] __kasan_slab_alloc+0x6e/0x70 mm/kasan/common.c:368 kasan_slab_alloc include/linux/kasan.h:252 [inline] slab_post_alloc_hook mm/slub.c:4946 [inline] slab_alloc_node mm/slub.c:5245 [inline] kmem_cache_alloc_noprof+0x260/0x6c0 mm/slub.c:5252 alloc_pid+0xc7/0xbc0 kernel/pid.c:184 copy_process+0x3c30/0x75a0 kernel/fork.c:2197 kernel_clone+0xfc/0x930 kernel/fork.c:2609 __do_sys_clone3+0x212/0x290 kernel/fork.c:2911 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 Freed by task 5316: kasan_save_stack+0x33/0x60 mm/kasan/common.c:56 kasan_save_track+0x14/0x30 mm/kasan/common.c:77 __kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:587 kasan_save_free_info mm/kasan/kasan.h:406 [inline] poison_slab_object mm/kasan/common.c:252 [inline] __kasan_slab_free+0x43/0x70 mm/kasan/common.c:284 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2514 [inline] slab_free mm/slub.c:6566 [inline] kmem_cache_free+0x2a4/0x660 mm/slub.c:6676 put_pid.part.0+0xe9/0x130 kernel/pid.c:105 put_pid kernel/pid.c:99 [inline] delayed_put_pid+0x23/0x30 kernel/pid.c:114 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0x79c/0x1530 kernel/rcu/tree.c:2861 handle_softirqs+0x205/0x8d0 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:1052 [inline] sysvec_apic_timer_interrupt+0x90/0xb0 arch/x86/kernel/apic/apic.c:1052 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 Last potentially related work creation: kasan_save_stack+0x33/0x60 mm/kasan/common.c:56 kasan_record_aux_stack+0x8c/0xa0 mm/kasan/generic.c:559 __call_rcu_common.constprop.0+0xa5/0xa10 kernel/rcu/tree.c:3123 free_pids+0x45/0x80 kernel/pid.c:160 release_task+0xe33/0x1ca0 kernel/exit.c:296 exit_notify kernel/exit.c:778 [inline] do_exit+0x12c1/0x2bf0 kernel/exit.c:978 do_group_exit+0xd3/0x2a0 kernel/exit.c:1107 get_signal+0x2671/0x26d0 kernel/signal.c:3034 arch_do_signal_or_restart+0x8f/0x7c0 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop+0x76/0xe0 kernel/entry/common.c:40 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline] do_syscall_64+0x40f/0x4d0 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88812c27fe00 which belongs to the cache pid_2 of size 288 The buggy address is located 223 bytes to the right of allocated 288-byte region [ffff88812c27fe00, ffff88812c27ff20) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88812c27fc80 pfn:0x12c27e head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888114a95101 flags: 0x200000000000040(head|node=0|zone=2) page_type: f5(slab) raw: 0200000000000040 ffff888111f5a280 ffffea00046cd780 dead000000000002 raw: ffff88812c27fc80 0000000000150000 00000000f5000000 ffff888114a95101 head: 0200000000000040 ffff888111f5a280 ffffea00046cd780 dead000000000002 head: ffff88812c27fc80 0000000000150000 00000000f5000000 ffff888114a95101 head: 0200000000000001 ffffea0004b09f81 00000000ffffffff 00000000ffffffff head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000002 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 21883, tgid 21883 (syz.2.3776), ts 2240409805547, free_ts 2205583875792 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1850 prep_new_page mm/page_alloc.c:1858 [inline] get_page_from_freelist+0x1003/0x2dc0 mm/page_alloc.c:3884 __alloc_frozen_pages_noprof+0x259/0x21f0 mm/page_alloc.c:5183 alloc_pages_mpol+0xe4/0x410 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:3030 [inline] allocate_slab mm/slub.c:3203 [inline] new_slab+0x24a/0x360 mm/slub.c:3257 ___slab_alloc+0xdb7/0x1a70 mm/slub.c:4627 __slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4746 __slab_alloc_node mm/slub.c:4822 [inline] slab_alloc_node mm/slub.c:5233 [inline] kmem_cache_alloc_noprof+0x393/0x6c0 mm/slub.c:5252 alloc_pid+0xc7/0xbc0 kernel/pid.c:184 copy_process+0x3c30/0x75a0 kernel/fork.c:2197 kernel_clone+0xfc/0x930 kernel/fork.c:2609 __do_sys_clone3+0x212/0x290 kernel/fork.c:2911 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 page last free pid 2857 tgid 2857 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1394 [inline] __free_frozen_pages+0x78f/0x1000 mm/page_alloc.c:2906 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:352 kasan_slab_alloc include/linux/kasan.h:252 [inline] slab_post_alloc_hook mm/slub.c:4946 [inline] slab_alloc_node mm/slub.c:5245 [inline] kmem_cache_alloc_noprof+0x260/0x6c0 mm/slub.c:5252 getname_flags.part.0+0x4c/0x550 fs/namei.c:146 getname_flags+0x93/0xf0 include/linux/audit.h:345 getname include/linux/fs.h:2922 [inline] do_sys_openat2+0xb8/0x1d0 fs/open.c:1431 do_sys_open fs/open.c:1452 [inline] __do_sys_openat fs/open.c:1468 [inline] __se_sys_openat fs/open.c:1463 [inline] __x64_sys_openat+0x174/0x210 fs/open.c:1463 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: ffff88812c27fe80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88812c27ff00: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc >ffff88812c27ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88812c280000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88812c280080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 90 nop 1: f3 0f 1e fa endbr64 5: 53 push %rbx 6: 48 8b 74 24 08 mov 0x8(%rsp),%rsi b: 48 89 fb mov %rdi,%rbx e: 48 83 c7 18 add $0x18,%rdi 12: e8 2a 20 14 fa call 0xfa142041 17: 48 89 df mov %rbx,%rdi 1a: e8 12 74 14 fa call 0xfa147431 1f: e8 8d 9a 3f fa call 0xfa3f9ab1 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 82 ce 07 fa call 0xfa07ceb1 <-- trapping instruction 2f: 65 8b 05 4b 00 51 05 mov %gs:0x551004b(%rip),%eax # 0x5510081 36: 85 c0 test %eax,%eax 38: 74 06 je 0x40 3a: 5b pop %rbx 3b: c3 ret 3c: cc int3 3d: cc int3 3e: cc int3 3f: cc int3