================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1062/0x1240 drivers/hid/hid-mcp2221.c:858 Read of size 1 at addr ffff88802531ffff by task udevd/5953 CPU: 0 PID: 5953 Comm: udevd Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026 Call Trace: dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xa8/0x210 mm/kasan/report.c:468 kasan_report+0x117/0x150 mm/kasan/report.c:581 mcp2221_raw_event+0x1062/0x1240 drivers/hid/hid-mcp2221.c:858 hid_input_report+0x400/0x510 drivers/hid/hid-core.c:2103 hid_irq_in+0x479/0x6d0 drivers/hid/usbhid/hid-core.c:284 __usb_hcd_giveback_urb+0x35f/0x520 drivers/usb/core/hcd.c:1650 dummy_timer+0x8de/0x3320 drivers/usb/gadget/udc/dummy_hcd.c:2003 __run_hrtimer kernel/time/hrtimer.c:1754 [inline] __hrtimer_run_queues+0x520/0xc40 kernel/time/hrtimer.c:1818 hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1835 handle_softirqs+0x280/0x820 kernel/softirq.c:578 __do_softirq kernel/softirq.c:612 [inline] invoke_softirq kernel/softirq.c:452 [inline] __irq_exit_rcu+0xd3/0x190 kernel/softirq.c:661 irq_exit_rcu+0x9/0x20 kernel/softirq.c:673 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1088 [inline] sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1088 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:687 RIP: 0010:rb_erase_augmented include/linux/rbtree_augmented.h:330 [inline] RIP: 0010:rb_erase_augmented_cached include/linux/rbtree_augmented.h:340 [inline] RIP: 0010:__anon_vma_interval_tree_remove mm/interval_tree.c:71 [inline] RIP: 0010:anon_vma_interval_tree_remove+0x998/0xa00 mm/interval_tree.c:88 Code: e7 e8 bc 68 18 00 4d 8b 2c 24 4c 89 ef 48 89 de e8 9d 2a c0 ff 49 39 dd 0f 85 37 fe ff ff e8 7f 28 c0 ff eb 05 e8 78 28 c0 ff <4d> 85 ff 48 8b 5c 24 18 74 25 e8 69 28 c0 ff 4c 89 ff 48 89 de 48 RSP: 0018:ffffc9000b57f8b8 EFLAGS: 00000293 RAX: ffffffff81c7013e RBX: 0000000000000001 RCX: ffff888019348000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: dffffc0000000000 R08: ffff88801b7b6ab7 R09: 1ffff110036f6d56 R10: dffffc0000000000 R11: ffffed10036f6d57 R12: 0000000000000000 R13: ffff888076ebb410 R14: 0000000000000000 R15: 0000000000000000 unlink_anon_vmas+0x122/0x660 mm/rmap.c:410 anon_vma_merge include/linux/rmap.h:166 [inline] vma_complete+0x82f/0xb40 mm/mmap.c:560 vma_merge+0x1ac7/0x20e0 mm/mmap.c:1035 mprotect_fixup+0x489/0xca0 mm/mprotect.c:632 do_mprotect_pkey+0x7c2/0xcb0 mm/mprotect.c:819 __do_sys_mprotect mm/mprotect.c:840 [inline] __se_sys_mprotect mm/mprotect.c:837 [inline] __x64_sys_mprotect+0x80/0x90 mm/mprotect.c:837 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fa36b31dfe7 Code: ef e8 3d fa ff ff 84 c0 75 b9 31 db 48 83 c4 08 48 89 d8 5b 5d 41 5c 41 5d 41 5e 41 5f c3 0f 1f 44 00 00 b8 0a 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d e1 2d 0d 00 f7 d8 64 89 01 48 RSP: 002b:00007fff1da0b208 EFLAGS: 00000246 ORIG_RAX: 000000000000000a RAX: ffffffffffffffda RBX: 0000000000000200 RCX: 00007fa36b31dfe7 RDX: 0000000000000001 RSI: 0000000000000200 RDI: 00007fa36b95f000 RBP: 0000556e986cb050 R08: 0000000000000000 R09: 0000000000000200 R10: 0000556e986cb0b0 R11: 0000000000000246 R12: 00000000000001f6 R13: 0000000000003e00 R14: 0000556e986d63e8 R15: 00007fa36ba4a39c Allocated by task 5142: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4e/0x70 mm/kasan/common.c:53 ____kasan_kmalloc mm/kasan/common.c:375 [inline] __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:384 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1007 [inline] __kmalloc+0xb4/0x230 mm/slab_common.c:1020 kmalloc include/linux/slab.h:604 [inline] tomoyo_realpath_from_path+0xe3/0x5d0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x282/0x560 security/tomoyo/file.c:822 security_inode_getattr+0xd3/0x120 security/security.c:2154 vfs_getattr fs/stat.c:173 [inline] vfs_statx+0x172/0x680 fs/stat.c:248 vfs_fstatat+0x12a/0x1b0 fs/stat.c:299 __do_sys_newfstatat fs/stat.c:463 [inline] __se_sys_newfstatat fs/stat.c:457 [inline] __x64_sys_newfstatat+0x149/0x1f0 fs/stat.c:457 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Freed by task 5142: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4e/0x70 mm/kasan/common.c:53 kasan_save_free_info+0x2e/0x50 mm/kasan/generic.c:522 ____kasan_slab_free+0x126/0x1e0 mm/kasan/common.c:237 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1811 [inline] slab_free_freelist_hook+0x130/0x1a0 mm/slub.c:1837 slab_free mm/slub.c:3830 [inline] __kmem_cache_free+0xba/0x1e0 mm/slub.c:3843 tomoyo_realpath_from_path+0x59d/0x5d0 security/tomoyo/realpath.c:286 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x282/0x560 security/tomoyo/file.c:822 security_inode_getattr+0xd3/0x120 security/security.c:2154 vfs_getattr fs/stat.c:173 [inline] vfs_statx+0x172/0x680 fs/stat.c:248 vfs_fstatat+0x12a/0x1b0 fs/stat.c:299 __do_sys_newfstatat fs/stat.c:463 [inline] __se_sys_newfstatat fs/stat.c:457 [inline] __x64_sys_newfstatat+0x149/0x1f0 fs/stat.c:457 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff88802531e000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 4095 bytes to the right of allocated 4096-byte region [ffff88802531e000, ffff88802531f000) The buggy address belongs to the physical page: page:ffffea000094c600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x25318 head:ffffea000094c600 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888017c42140 0000000000000000 0000000000000001 raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5766, tgid 5766 (udevd), ts 130009547021, free_ts 129964146161 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1c1/0x200 mm/page_alloc.c:1581 prep_new_page mm/page_alloc.c:1588 [inline] get_page_from_freelist+0x1951/0x19e0 mm/page_alloc.c:3220 __alloc_pages+0x1f0/0x460 mm/page_alloc.c:4500 alloc_slab_page+0x5d/0x160 mm/slub.c:1881 allocate_slab mm/slub.c:2028 [inline] new_slab+0x87/0x2d0 mm/slub.c:2081 ___slab_alloc+0xc5d/0x12f0 mm/slub.c:3253 __slab_alloc mm/slub.c:3339 [inline] __slab_alloc_node mm/slub.c:3392 [inline] slab_alloc_node mm/slub.c:3485 [inline] __kmem_cache_alloc_node+0x19e/0x250 mm/slub.c:3534 __do_kmalloc_node mm/slab_common.c:1006 [inline] __kmalloc+0xa4/0x230 mm/slab_common.c:1020 kmalloc include/linux/slab.h:604 [inline] tomoyo_realpath_from_path+0xe3/0x5d0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_number_perm+0x248/0x620 security/tomoyo/file.c:723 tomoyo_path_mknod+0x14b/0x1a0 security/tomoyo/tomoyo.c:251 security_path_mknod+0xf0/0x150 security/security.c:1716 may_o_create fs/namei.c:3318 [inline] lookup_open fs/namei.c:3459 [inline] open_last_lookups fs/namei.c:3564 [inline] path_openat+0xb5a/0x3230 fs/namei.c:3794 do_filp_open+0x1f5/0x430 fs/namei.c:3824 do_sys_openat2+0x134/0x1d0 fs/open.c:1421 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+0x139/0x160 fs/open.c:1447 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1181 [inline] free_unref_page_prepare+0x7b2/0x8c0 mm/page_alloc.c:2365 free_unref_page+0x32/0x2e0 mm/page_alloc.c:2458 discard_slab mm/slub.c:2127 [inline] __unfreeze_partials+0x1cf/0x210 mm/slub.c:2667 put_cpu_partial+0x17c/0x250 mm/slub.c:2743 __slab_free+0x319/0x400 mm/slub.c:3700 qlink_free mm/kasan/quarantine.c:166 [inline] qlist_free_all+0x75/0xd0 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x143/0x160 mm/kasan/quarantine.c:292 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:306 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook+0x6e/0x4b0 mm/slab.h:767 slab_alloc_node mm/slub.c:3495 [inline] __kmem_cache_alloc_node+0x13a/0x250 mm/slub.c:3534 __do_kmalloc_node mm/slab_common.c:1006 [inline] __kmalloc+0xa4/0x230 mm/slab_common.c:1020 kmalloc include/linux/slab.h:604 [inline] tomoyo_realpath_from_path+0xe3/0x5d0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x282/0x560 security/tomoyo/file.c:822 security_inode_getattr+0xd3/0x120 security/security.c:2154 vfs_getattr fs/stat.c:173 [inline] vfs_fstat fs/stat.c:198 [inline] __do_sys_newfstat fs/stat.c:473 [inline] __se_sys_newfstat fs/stat.c:470 [inline] __x64_sys_newfstat+0x12c/0x250 fs/stat.c:470 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 Memory state around the buggy address: ffff88802531fe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802531ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88802531ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888025320000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888025320080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: e7 e8 out %eax,$0xe8 2: bc 68 18 00 4d mov $0x4d001868,%esp 7: 8b 2c 24 mov (%rsp),%ebp a: 4c 89 ef mov %r13,%rdi d: 48 89 de mov %rbx,%rsi 10: e8 9d 2a c0 ff call 0xffc02ab2 15: 49 39 dd cmp %rbx,%r13 18: 0f 85 37 fe ff ff jne 0xfffffe55 1e: e8 7f 28 c0 ff call 0xffc028a2 23: eb 05 jmp 0x2a 25: e8 78 28 c0 ff call 0xffc028a2 * 2a: 4d 85 ff test %r15,%r15 <-- trapping instruction 2d: 48 8b 5c 24 18 mov 0x18(%rsp),%rbx 32: 74 25 je 0x59 34: e8 69 28 c0 ff call 0xffc028a2 39: 4c 89 ff mov %r15,%rdi 3c: 48 89 de mov %rbx,%rsi 3f: 48 rex.W