================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948 Read of size 1 at addr ffff888054687fff by task swapper/0/0 CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/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:2130 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+0x1814/0x3a30 drivers/usb/gadget/udc/dummy_hcd.c:1995 __run_hrtimer kernel/time/hrtimer.c:1761 [inline] __hrtimer_run_queues+0x1ff/0xad0 kernel/time/hrtimer.c:1825 hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1842 handle_softirqs+0x219/0x8e0 kernel/softirq.c:579 __do_softirq kernel/softirq.c:613 [inline] invoke_softirq kernel/softirq.c:453 [inline] __irq_exit_rcu+0x109/0x170 kernel/softirq.c:680 irq_exit_rcu+0x9/0x30 kernel/softirq.c:696 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline] sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1050 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:__schedule+0x1198/0x5de0 kernel/sched/core.c:6971 Code: fa 48 c1 ea 03 80 3c 02 00 0f 85 83 43 00 00 49 89 5e 10 48 8b bd 10 ff ff ff 48 89 de e8 a0 ed 96 f5 48 89 c7 e8 18 e6 f3 f5 <8b> bd 08 ff ff ff e8 cd a5 f3 f5 48 8b b5 90 fe ff ff 48 b8 00 00 RSP: 0018:ffffffff8e207c40 EFLAGS: 00000206 RAX: 0000000000d5e659 RBX: 0000000000000000 RCX: ffffffff81c374ef RDX: 0000000000000000 RSI: ffffffff8de522d8 RDI: ffffffff8c162d80 RBP: ffffffff8e207df8 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff90ab6b97 R11: 0000000000000000 R12: dffffc0000000000 R13: ffff8880b8423f10 R14: ffff8880b843a300 R15: ffffffff818a8e40 schedule_idle+0x5c/0x90 kernel/sched/core.c:7084 do_idle+0x2b6/0x510 kernel/sched/idle.c:358 cpu_startup_entry+0x4f/0x60 kernel/sched/idle.c:428 rest_init+0x16b/0x2b0 init/main.c:744 start_kernel+0x3ee/0x4d0 init/main.c:1097 x86_64_start_reservations+0x18/0x30 arch/x86/kernel/head64.c:307 x86_64_start_kernel+0x130/0x190 arch/x86/kernel/head64.c:288 common_startup_64+0x13e/0x148 Allocated by task 5848: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:330 [inline] __kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:356 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4191 [inline] slab_alloc_node mm/slub.c:4240 [inline] kmem_cache_alloc_noprof+0x1cb/0x3b0 mm/slub.c:4247 getname_flags.part.0+0x4c/0x550 fs/namei.c:146 getname_flags+0x93/0xf0 include/linux/audit.h:322 getname include/linux/fs.h:2918 [inline] getname_maybe_null include/linux/fs.h:2925 [inline] getname_maybe_null include/linux/fs.h:2922 [inline] vfs_fstatat+0xe1/0xf0 fs/stat.c:370 __do_sys_newfstatat+0x97/0x120 fs/stat.c:542 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 5848: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:243 [inline] __kasan_slab_free+0x60/0x70 mm/kasan/common.c:275 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2422 [inline] slab_free mm/slub.c:4695 [inline] kmem_cache_free+0x2d1/0x4d0 mm/slub.c:4797 putname+0x154/0x1a0 fs/namei.c:297 vfs_fstatat+0x85/0xf0 fs/stat.c:376 __do_sys_newfstatat+0x97/0x120 fs/stat.c:542 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888054686600 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 [ffff888054686600, ffff888054687600) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x54680 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff888140408140 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000070007 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff888140408140 dead000000000100 dead000000000122 head: 0000000000000000 0000000000070007 00000000f5000000 0000000000000000 head: 00fff00000000003 ffffea000151a001 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 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 5848, tgid 5848 (udevd), ts 207012775628, free_ts 206755311296 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x132b/0x38e0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:5148 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2492 [inline] allocate_slab mm/slub.c:2660 [inline] new_slab+0x247/0x330 mm/slub.c:2714 ___slab_alloc+0xcf2/0x1750 mm/slub.c:3901 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3992 __slab_alloc_node mm/slub.c:4067 [inline] slab_alloc_node mm/slub.c:4228 [inline] kmem_cache_alloc_noprof+0xef/0x3b0 mm/slub.c:4247 getname_flags.part.0+0x4c/0x550 fs/namei.c:146 getname_flags+0x93/0xf0 include/linux/audit.h:322 getname include/linux/fs.h:2918 [inline] __do_sys_symlink fs/namei.c:4777 [inline] __se_sys_symlink fs/namei.c:4775 [inline] __x64_sys_symlink+0x65/0x90 fs/namei.c:4775 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 7585 tgid 7584 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0x7d5/0x10f0 mm/page_alloc.c:2895 discard_slab mm/slub.c:2758 [inline] __put_partials+0x165/0x1c0 mm/slub.c:3223 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+0x69/0x90 mm/kasan/common.c:340 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4191 [inline] slab_alloc_node mm/slub.c:4240 [inline] __do_kmalloc_node mm/slub.c:4375 [inline] __kmalloc_noprof+0x1d4/0x510 mm/slub.c:4388 kmalloc_noprof include/linux/slab.h:909 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] tomoyo_encode2+0x100/0x3e0 security/tomoyo/realpath.c:45 tomoyo_encode+0x29/0x50 security/tomoyo/realpath.c:80 tomoyo_realpath_from_path+0x18f/0x6e0 security/tomoyo/realpath.c:283 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_number_perm+0x245/0x580 security/tomoyo/file.c:723 security_file_ioctl+0x9b/0x240 security/security.c:2943 __do_sys_ioctl fs/ioctl.c:592 [inline] __se_sys_ioctl fs/ioctl.c:584 [inline] __x64_sys_ioctl+0xb7/0x210 fs/ioctl.c:584 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888054687e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888054687f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888054687f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888054688000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888054688080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: fa cli 1: 48 c1 ea 03 shr $0x3,%rdx 5: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) 9: 0f 85 83 43 00 00 jne 0x4392 f: 49 89 5e 10 mov %rbx,0x10(%r14) 13: 48 8b bd 10 ff ff ff mov -0xf0(%rbp),%rdi 1a: 48 89 de mov %rbx,%rsi 1d: e8 a0 ed 96 f5 call 0xf596edc2 22: 48 89 c7 mov %rax,%rdi 25: e8 18 e6 f3 f5 call 0xf5f3e642 * 2a: 8b bd 08 ff ff ff mov -0xf8(%rbp),%edi <-- trapping instruction 30: e8 cd a5 f3 f5 call 0xf5f3a602 35: 48 8b b5 90 fe ff ff mov -0x170(%rbp),%rsi 3c: 48 rex.W 3d: b8 .byte 0xb8