================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0xf94/0x1030 drivers/hid/hid-mcp2221.c:852 Read of size 1 at addr ffff88811463bfff by task udevd/5232 CPU: 0 UID: 0 PID: 5232 Comm: udevd Not tainted 6.15.0-rc4-syzkaller-00104-g588d032e9e56 #0 PREEMPT(voluntary) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/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:408 [inline] print_report+0xc3/0x670 mm/kasan/report.c:521 kasan_report+0xe0/0x110 mm/kasan/report.c:634 mcp2221_raw_event+0xf94/0x1030 drivers/hid/hid-mcp2221.c:852 __hid_input_report.constprop.0+0x311/0x450 drivers/hid/hid-core.c:2117 hid_irq_in+0x35e/0x870 drivers/hid/usbhid/hid-core.c:286 __usb_hcd_giveback_urb+0x38a/0x6e0 drivers/usb/core/hcd.c:1650 usb_hcd_giveback_urb+0x39b/0x450 drivers/usb/core/hcd.c:1734 dummy_timer+0x180e/0x3a20 drivers/usb/gadget/udc/dummy_hcd.c:1994 __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+0x205/0x8d0 kernel/softirq.c:579 __do_softirq kernel/softirq.c:613 [inline] invoke_softirq kernel/softirq.c:453 [inline] __irq_exit_rcu+0xfa/0x160 kernel/softirq.c:680 irq_exit_rcu+0x9/0x30 kernel/softirq.c:696 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline] sysvec_apic_timer_interrupt+0x90/0xb0 arch/x86/kernel/apic/apic.c:1049 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:lock_acquire+0x62/0x350 kernel/locking/lockdep.c:5870 Code: 34 0c 0b 83 f8 07 0f 87 bc 02 00 00 89 c0 48 0f a3 05 12 35 1f 09 0f 82 74 02 00 00 8b 35 ca 40 1f 09 85 f6 0f 85 8d 00 00 00 <48> 8b 44 24 30 65 48 2b 05 69 34 0c 0b 0f 85 c7 02 00 00 48 83 c4 RSP: 0018:ffffc900020cf8f8 EFLAGS: 00000206 RAX: 0000000000000046 RBX: ffffffff890c2880 RCX: 00000000ef9d33e4 RDX: 0000000000000000 RSI: ffffffff88ab8acb RDI: ffffffff876851e0 RBP: 0000000000000002 R08: 0ac0d5affe09d4ff R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 rcu_lock_acquire include/linux/rcupdate.h:331 [inline] rcu_read_lock include/linux/rcupdate.h:841 [inline] __d_lookup+0x84/0x4a0 fs/dcache.c:2365 lookup_fast+0x17c/0x610 fs/namei.c:1775 walk_component+0x5b/0x5b0 fs/namei.c:2134 link_path_walk.part.0.constprop.0+0x685/0xd60 fs/namei.c:2503 link_path_walk fs/namei.c:2435 [inline] path_openat+0x227/0x2d40 fs/namei.c:4035 do_filp_open+0x20b/0x470 fs/namei.c:4066 do_sys_openat2+0x11b/0x1d0 fs/open.c:1429 do_sys_open fs/open.c:1444 [inline] __do_sys_openat fs/open.c:1460 [inline] __se_sys_openat fs/open.c:1455 [inline] __x64_sys_openat+0x174/0x210 fs/open.c:1455 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc00dae69a4 Code: 24 20 48 8d 44 24 30 48 89 44 24 28 64 8b 04 25 18 00 00 00 85 c0 75 2c 44 89 e2 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 76 60 48 8b 15 55 a4 0d 00 f7 d8 64 89 02 48 83 RSP: 002b:00007ffd9abbbb20 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007fc00dae69a4 RDX: 0000000000080000 RSI: 00007ffd9abbbc58 RDI: 00000000ffffff9c RBP: 00007ffd9abbbc58 R08: 0000000000000008 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000080000 R13: 000056032f625b42 R14: 0000000000000001 R15: 000056033d4362c0 Allocated by task 2842: 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:319 [inline] __kasan_slab_alloc+0x6e/0x70 mm/kasan/common.c:345 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4161 [inline] slab_alloc_node mm/slub.c:4210 [inline] kmem_cache_alloc_noprof+0x14f/0x3b0 mm/slub.c:4217 alloc_empty_file+0x55/0x1e0 fs/file_table.c:234 path_openat+0xe0/0x2d40 fs/namei.c:4025 do_filp_open+0x20b/0x470 fs/namei.c:4066 do_sys_openat2+0x11b/0x1d0 fs/open.c:1429 do_sys_open fs/open.c:1444 [inline] __do_sys_openat fs/open.c:1460 [inline] __se_sys_openat fs/open.c:1455 [inline] __x64_sys_openat+0x174/0x210 fs/open.c:1455 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 14: 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:247 [inline] __kasan_slab_free+0x37/0x50 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2398 [inline] slab_free_after_rcu_debug+0xd2/0x2b0 mm/slub.c:4706 rcu_do_batch kernel/rcu/tree.c:2568 [inline] rcu_core+0x799/0x14e0 kernel/rcu/tree.c:2824 handle_softirqs+0x205/0x8d0 kernel/softirq.c:579 run_ksoftirqd kernel/softirq.c:968 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:960 smpboot_thread_fn+0x3f4/0xae0 kernel/smpboot.c:164 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Last potentially related work creation: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_record_aux_stack+0x9b/0xb0 mm/kasan/generic.c:548 slab_free_hook mm/slub.c:2359 [inline] slab_free mm/slub.c:4656 [inline] kmem_cache_free+0x141/0x470 mm/slub.c:4758 file_free fs/file_table.c:76 [inline] __fput+0x68d/0xb70 fs/file_table.c:478 fput_close_sync+0x118/0x260 fs/file_table.c:570 __do_sys_close fs/open.c:1581 [inline] __se_sys_close fs/open.c:1566 [inline] __x64_sys_close+0x8b/0x120 fs/open.c:1566 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88811463bdc0 which belongs to the cache filp of size 360 The buggy address is located 215 bytes to the right of allocated 360-byte region [ffff88811463bdc0, ffff88811463bf28) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11463a head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888113fe3d01 flags: 0x200000000000040(head|node=0|zone=2) page_type: f5(slab) raw: 0200000000000040 ffff888100ae63c0 ffffea00045b4900 dead000000000002 raw: 0000000000000000 0000000000120012 00000000f5000000 ffff888113fe3d01 head: 0200000000000040 ffff888100ae63c0 ffffea00045b4900 dead000000000002 head: 0000000000000000 0000000000120012 00000000f5000000 ffff888113fe3d01 head: 0200000000000001 ffffea0004518e81 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 3453, tgid 3453 (modprobe), ts 52879634837, free_ts 52833110206 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1718 prep_new_page mm/page_alloc.c:1726 [inline] get_page_from_freelist+0xfec/0x2d90 mm/page_alloc.c:3688 __alloc_frozen_pages_noprof+0x25c/0x2160 mm/page_alloc.c:4970 alloc_pages_mpol+0xe4/0x410 mm/mempolicy.c:2301 alloc_slab_page mm/slub.c:2468 [inline] allocate_slab mm/slub.c:2632 [inline] new_slab+0x244/0x340 mm/slub.c:2686 ___slab_alloc+0xda5/0x1940 mm/slub.c:3872 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3962 __slab_alloc_node mm/slub.c:4037 [inline] slab_alloc_node mm/slub.c:4198 [inline] kmem_cache_alloc_noprof+0x1f9/0x3b0 mm/slub.c:4217 alloc_empty_file+0x55/0x1e0 fs/file_table.c:234 path_openat+0xe0/0x2d40 fs/namei.c:4025 do_filp_open+0x20b/0x470 fs/namei.c:4066 do_sys_openat2+0x11b/0x1d0 fs/open.c:1429 do_sys_open fs/open.c:1444 [inline] __do_sys_openat fs/open.c:1460 [inline] __se_sys_openat fs/open.c:1455 [inline] __x64_sys_openat+0x174/0x210 fs/open.c:1455 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 3450 tgid 3450 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0x66c/0xe70 mm/page_alloc.c:2725 discard_slab mm/slub.c:2730 [inline] __put_partials+0x16d/0x1c0 mm/slub.c:3199 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/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:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4161 [inline] slab_alloc_node mm/slub.c:4210 [inline] __kmalloc_cache_noprof+0x14c/0x3c0 mm/slub.c:4367 kmalloc_noprof include/linux/slab.h:905 [inline] load_elf_binary+0x553/0x4ed0 fs/binfmt_elf.c:910 search_binary_handler fs/exec.c:1778 [inline] exec_binprm fs/exec.c:1810 [inline] bprm_execve fs/exec.c:1862 [inline] bprm_execve+0x8c0/0x1600 fs/exec.c:1838 kernel_execve+0x2ef/0x3b0 fs/exec.c:2028 call_usermodehelper_exec_async+0x255/0x4c0 kernel/umh.c:109 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff88811463be80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88811463bf00: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc >ffff88811463bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88811463c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88811463c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 34 0c xor $0xc,%al 2: 0b 83 f8 07 0f 87 or -0x78f0f808(%rbx),%eax 8: bc 02 00 00 89 mov $0x89000002,%esp d: c0 48 0f a3 rorb $0xa3,0xf(%rax) 11: 05 12 35 1f 09 add $0x91f3512,%eax 16: 0f 82 74 02 00 00 jb 0x290 1c: 8b 35 ca 40 1f 09 mov 0x91f40ca(%rip),%esi # 0x91f40ec 22: 85 f6 test %esi,%esi 24: 0f 85 8d 00 00 00 jne 0xb7 * 2a: 48 8b 44 24 30 mov 0x30(%rsp),%rax <-- trapping instruction 2f: 65 48 2b 05 69 34 0c sub %gs:0xb0c3469(%rip),%rax # 0xb0c34a0 36: 0b 37: 0f 85 c7 02 00 00 jne 0x304 3d: 48 rex.W 3e: 83 .byte 0x83 3f: c4 .byte 0xc4