================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948 Read of size 1 at addr ffff88814219ffff by task syz.3.5541/24804 CPU: 0 UID: 0 PID: 24804 Comm: syz.3.5541 Not tainted syzkaller #0 PREEMPT(voluntary) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/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: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/0x3a00 drivers/usb/gadget/udc/dummy_hcd.c:1995 __run_hrtimer kernel/time/hrtimer.c:1777 [inline] __hrtimer_run_queues+0x202/0xad0 kernel/time/hrtimer.c:1841 hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1858 handle_softirqs+0x208/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:697 RIP: 0010:native_save_fl arch/x86/include/asm/irqflags.h:26 [inline] RIP: 0010:arch_local_save_flags arch/x86/include/asm/irqflags.h:109 [inline] RIP: 0010:arch_local_irq_save arch/x86/include/asm/irqflags.h:127 [inline] RIP: 0010:lock_is_held_type+0x54/0x150 kernel/locking/lockdep.c:5936 Code: 8e 53 05 85 c0 0f 85 ce 00 00 00 65 4c 8b 25 eb 4e 53 05 41 8b 94 24 a4 0a 00 00 85 d2 0f 85 b6 00 00 00 48 89 fd 41 89 f6 9c <8f> 04 24 fa 48 c7 c7 ef 0e d2 88 4d 8d ac 24 a8 0a 00 00 45 31 ff RSP: 0018:ffffc90018157cd8 EFLAGS: 00000246 RAX: 0000000000000000 RBX: 1ffff9200302afa6 RCX: 0000000000000001 RDX: 0000000000000000 RSI: 00000000ffffffff RDI: ffffffff892c8980 RBP: ffffffff892c8980 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: ffff88810fac0000 R13: 00000000ffffffff R14: 00000000ffffffff R15: ffff8881396a2150 lock_is_held include/linux/lockdep.h:249 [inline] __might_resched+0x473/0x5e0 kernel/sched/core.c:8889 __might_fault+0x83/0x190 mm/memory.c:7079 _inline_copy_to_user include/linux/uaccess.h:192 [inline] _copy_to_user+0x2d/0xd0 lib/usercopy.c:26 copy_to_user include/linux/uaccess.h:225 [inline] raw_ioctl_event_fetch drivers/usb/gadget/legacy/raw_gadget.c:650 [inline] raw_ioctl+0x134c/0x2c30 drivers/usb/gadget/legacy/raw_gadget.c:1307 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:63 [inline] do_syscall_64+0xcd/0x4d0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f3f4d6debcb 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:00007f3f4c13cf10 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f3f4d6debcb RDX: 00007f3f4c13dfe0 RSI: 0000000080085502 RDI: 0000000000000004 RBP: 00007f3f4c13dfe0 R08: 0000000000000000 R09: 00332e6364755f79 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000080085502 R13: 0000000800000000 R14: 0000200000000140 R15: 00007f3f4d76d52a Allocated by task 2856: 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:4970 [inline] slab_alloc_node mm/slub.c:5280 [inline] kmem_cache_alloc_noprof+0x260/0x6c0 mm/slub.c:5287 getname_flags.part.0+0x4c/0x550 fs/namei.c:146 getname_flags include/linux/audit.h:345 [inline] getname include/linux/fs.h:2922 [inline] __do_sys_unlink fs/namei.c:4783 [inline] __se_sys_unlink fs/namei.c:4781 [inline] __x64_sys_unlink+0xb0/0x110 fs/namei.c:4781 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 2856: 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:2539 [inline] slab_free mm/slub.c:6630 [inline] kmem_cache_free+0x2a4/0x660 mm/slub.c:6740 putname+0x154/0x1a0 fs/namei.c:297 do_unlinkat+0x188/0x6d0 fs/namei.c:4760 __do_sys_unlink fs/namei.c:4783 [inline] __se_sys_unlink fs/namei.c:4781 [inline] __x64_sys_unlink+0xc5/0x110 fs/namei.c:4781 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 The buggy address belongs to the object at ffff88814219e600 which belongs to the cache names_cache of size 4096 The buggy address is located 2559 bytes to the right of allocated 4096-byte region [ffff88814219e600, ffff88814219f600) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x142198 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x200000000000040(head|node=0|zone=2) page_type: f5(slab) raw: 0200000000000040 ffff8881012a1000 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000070007 00000000f5000000 0000000000000000 head: 0200000000000040 ffff8881012a1000 dead000000000100 dead000000000122 head: 0000000000000000 0000000000070007 00000000f5000000 0000000000000000 head: 0200000000000003 ffffea0005086601 00000000ffffffff 00000000ffffffff head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 2856, tgid 2856 (udevd), ts 1979887641596, free_ts 1979854891366 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:3055 [inline] allocate_slab mm/slub.c:3228 [inline] new_slab+0x24a/0x360 mm/slub.c:3282 ___slab_alloc+0xdb7/0x1a70 mm/slub.c:4651 __slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4770 __slab_alloc_node mm/slub.c:4846 [inline] slab_alloc_node mm/slub.c:5268 [inline] kmem_cache_alloc_noprof+0x393/0x6c0 mm/slub.c:5287 getname_flags.part.0+0x4c/0x550 fs/namei.c:146 getname_flags include/linux/audit.h:345 [inline] getname include/linux/fs.h:2922 [inline] __do_sys_unlink fs/namei.c:4783 [inline] __se_sys_unlink fs/namei.c:4781 [inline] __x64_sys_unlink+0xb0/0x110 fs/namei.c:4781 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 2856 tgid 2856 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 discard_slab mm/slub.c:3326 [inline] __put_partials+0x130/0x170 mm/slub.c:3872 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:4970 [inline] slab_alloc_node mm/slub.c:5280 [inline] kmem_cache_alloc_noprof+0x260/0x6c0 mm/slub.c:5287 getname_flags.part.0+0x4c/0x550 fs/namei.c:146 getname_flags include/linux/audit.h:345 [inline] getname include/linux/fs.h:2922 [inline] __do_sys_unlink fs/namei.c:4783 [inline] __se_sys_unlink fs/namei.c:4781 [inline] __x64_sys_unlink+0xb0/0x110 fs/namei.c:4781 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: ffff88814219fe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88814219ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88814219ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8881421a0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881421a0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 8e 53 05 mov 0x5(%rbx),%ss 3: 85 c0 test %eax,%eax 5: 0f 85 ce 00 00 00 jne 0xd9 b: 65 4c 8b 25 eb 4e 53 mov %gs:0x5534eeb(%rip),%r12 # 0x5534efe 12: 05 13: 41 8b 94 24 a4 0a 00 mov 0xaa4(%r12),%edx 1a: 00 1b: 85 d2 test %edx,%edx 1d: 0f 85 b6 00 00 00 jne 0xd9 23: 48 89 fd mov %rdi,%rbp 26: 41 89 f6 mov %esi,%r14d 29: 9c pushf * 2a: 8f 04 24 pop (%rsp) <-- trapping instruction 2d: fa cli 2e: 48 c7 c7 ef 0e d2 88 mov $0xffffffff88d20eef,%rdi 35: 4d 8d ac 24 a8 0a 00 lea 0xaa8(%r12),%r13 3c: 00 3d: 45 31 ff xor %r15d,%r15d