================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x103c/0x10a0 drivers/hid/hid-mcp2221.c:948 Read of size 1 at addr ffff8881072cffff by task udevd/5225 CPU: 1 UID: 0 PID: 5225 Comm: udevd 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:on_stack arch/x86/include/asm/stacktrace.h:56 [inline] RIP: 0010:__unwind_start+0x40d/0x7f0 arch/x86/kernel/unwind_orc.c:771 Code: 8e c1 02 00 00 41 8b 06 85 c0 0f 84 e5 fe ff ff 41 80 7d 00 00 0f 85 9e 02 00 00 41 80 3c 24 00 49 8b 46 08 0f 85 76 02 00 00 <49> 8b 56 10 48 39 c3 72 b3 48 39 d3 73 ae 48 8d 4b 08 48 39 ca 72 RSP: 0018:ffffc9000230f4d8 EFLAGS: 00000246 RAX: ffffc90002308000 RBX: ffffc9000230f5b8 RCX: ffffc9000230f42c RDX: 0000000000000000 RSI: ffffffff88dcb9c1 RDI: ffff888112e483fc RBP: dffffc0000000000 R08: 0000000000000001 R09: 0000000000000007 R10: 0000000000000200 R11: 0000000000006776 R12: fffff52000461ea7 R13: fffff52000461ea6 R14: ffffc9000230f528 R15: ffffc9000230f530 unwind_start arch/x86/include/asm/unwind.h:64 [inline] arch_stack_walk+0x73/0xf0 arch/x86/kernel/stacktrace.c:24 stack_trace_save+0x8e/0xc0 kernel/stacktrace.c:122 kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 unpoison_slab_object mm/kasan/common.c:340 [inline] __kasan_slab_alloc+0x6e/0x70 mm/kasan/common.c:366 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4953 [inline] slab_alloc_node mm/slub.c:5263 [inline] kmem_cache_alloc_noprof+0x266/0x760 mm/slub.c:5270 seq_open+0x55/0x170 fs/seq_file.c:63 kernfs_fop_open+0x590/0xd50 fs/kernfs/file.c:704 do_dentry_open+0x71a/0x1400 fs/open.c:962 vfs_open+0x82/0x3f0 fs/open.c:1094 do_open fs/namei.c:4637 [inline] path_openat+0x21dc/0x3120 fs/namei.c:4796 do_filp_open+0x1f7/0x420 fs/namei.c:4823 do_sys_openat2+0x12e/0x220 fs/open.c:1430 do_sys_open fs/open.c:1436 [inline] __do_sys_openat fs/open.c:1452 [inline] __se_sys_openat fs/open.c:1447 [inline] __x64_sys_openat+0x12d/0x210 fs/open.c:1447 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:0x7ffa047d9407 Code: 48 89 fa 4c 89 df e8 38 aa 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff RSP: 002b:00007ffe7de8b870 EFLAGS: 00000202 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007ffa046eb880 RCX: 00007ffa047d9407 RDX: 0000000000080000 RSI: 00007ffe7de8b9a0 RDI: ffffffffffffff9c RBP: 0000564ea8cb6660 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000564ea8cb6750 R13: 00007ffe7de8b9a0 R14: 00007ffe7de8dae0 R15: 0000564e72001bcc Allocated by task 5252: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 unpoison_slab_object mm/kasan/common.c:340 [inline] __kasan_slab_alloc+0x6e/0x70 mm/kasan/common.c:366 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4953 [inline] slab_alloc_node mm/slub.c:5263 [inline] kmem_cache_alloc_noprof+0x266/0x760 mm/slub.c:5270 getname_flags.part.0+0x4c/0x540 fs/namei.c:146 getname_flags+0x93/0xf0 include/linux/audit.h:345 getname include/linux/fs.h:2498 [inline] do_sys_openat2+0xc5/0x220 fs/open.c:1426 do_sys_open fs/open.c:1436 [inline] __do_sys_openat fs/open.c:1452 [inline] __se_sys_openat fs/open.c:1447 [inline] __x64_sys_openat+0x12d/0x210 fs/open.c:1447 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 Freed by task 5252: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x43/0x70 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2540 [inline] slab_free mm/slub.c:6670 [inline] kmem_cache_free+0x124/0x6d0 mm/slub.c:6781 putname+0xf5/0x1a0 fs/namei.c:297 __free_putname include/linux/fs.h:2512 [inline] do_sys_openat2+0x181/0x220 fs/open.c:1419 do_sys_open fs/open.c:1436 [inline] __do_sys_openat fs/open.c:1452 [inline] __se_sys_openat fs/open.c:1447 [inline] __x64_sys_openat+0x12d/0x210 fs/open.c:1447 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 The buggy address belongs to the object at ffff8881072ce600 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 [ffff8881072ce600, ffff8881072cf600) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1072c8 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 ffff8881012a2000 ffffea000462c400 dead000000000002 raw: 0000000000000000 0000000000070007 00000000f5000000 0000000000000000 head: 0200000000000040 ffff8881012a2000 ffffea000462c400 dead000000000002 head: 0000000000000000 0000000000070007 00000000f5000000 0000000000000000 head: 0200000000000003 ffffea00041cb201 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 5265, tgid 5265 (udevd), ts 1026286011199, free_ts 1026207639963 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_slab_page mm/slub.c:3075 [inline] allocate_slab mm/slub.c:3248 [inline] new_slab+0x2c4/0x440 mm/slub.c:3302 ___slab_alloc+0xda3/0x1ca0 mm/slub.c:4656 __slab_alloc.isra.0+0x63/0x110 mm/slub.c:4779 __slab_alloc_node mm/slub.c:4855 [inline] slab_alloc_node mm/slub.c:5251 [inline] kmem_cache_alloc_noprof+0x4ad/0x760 mm/slub.c:5270 getname_flags.part.0+0x4c/0x540 fs/namei.c:146 getname_flags+0x93/0xf0 include/linux/audit.h:345 getname include/linux/fs.h:2498 [inline] do_sys_openat2+0xc5/0x220 fs/open.c:1426 do_sys_open fs/open.c:1436 [inline] __do_sys_openat fs/open.c:1452 [inline] __se_sys_openat fs/open.c:1447 [inline] __x64_sys_openat+0x12d/0x210 fs/open.c:1447 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 2851 tgid 2851 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 discard_slab mm/slub.c:3346 [inline] __put_partials+0x127/0x160 mm/slub.c:3886 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x47/0xe0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x4e/0x70 mm/kasan/common.c:350 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4953 [inline] slab_alloc_node mm/slub.c:5263 [inline] kmem_cache_alloc_node_noprof+0x292/0x7d0 mm/slub.c:5315 __alloc_skb+0x156/0x410 net/core/skbuff.c:679 alloc_skb include/linux/skbuff.h:1383 [inline] alloc_skb_with_frags+0xe0/0x810 net/core/skbuff.c:6714 sock_alloc_send_pskb+0x801/0x980 net/core/sock.c:2995 unix_dgram_sendmsg+0x3c7/0x1820 net/unix/af_unix.c:2130 sock_sendmsg_nosec net/socket.c:727 [inline] __sock_sendmsg net/socket.c:742 [inline] __sys_sendto+0x4aa/0x520 net/socket.c:2206 __do_sys_sendto net/socket.c:2213 [inline] __se_sys_sendto net/socket.c:2209 [inline] __x64_sys_sendto+0xe0/0x1c0 net/socket.c:2209 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 Memory state around the buggy address: ffff8881072cfe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881072cff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8881072cff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8881072d0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881072d0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess), 3 bytes skipped: 0: 00 00 add %al,(%rax) 2: 41 8b 06 mov (%r14),%eax 5: 85 c0 test %eax,%eax 7: 0f 84 e5 fe ff ff je 0xfffffef2 d: 41 80 7d 00 00 cmpb $0x0,0x0(%r13) 12: 0f 85 9e 02 00 00 jne 0x2b6 18: 41 80 3c 24 00 cmpb $0x0,(%r12) 1d: 49 8b 46 08 mov 0x8(%r14),%rax 21: 0f 85 76 02 00 00 jne 0x29d * 27: 49 8b 56 10 mov 0x10(%r14),%rdx <-- trapping instruction 2b: 48 39 c3 cmp %rax,%rbx 2e: 72 b3 jb 0xffffffe3 30: 48 39 d3 cmp %rdx,%rbx 33: 73 ae jae 0xffffffe3 35: 48 8d 4b 08 lea 0x8(%rbx),%rcx 39: 48 39 ca cmp %rcx,%rdx 3c: 72 .byte 0x72