================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0xf94/0x1030 drivers/hid/hid-mcp2221.c:852 Read of size 1 at addr ffff88804165bfff by task syz.7.2378/15098 CPU: 1 UID: 0 PID: 15098 Comm: syz.7.2378 Not tainted 6.15.0-rc6-syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/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+0x216/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:1049 [inline] sysvec_apic_timer_interrupt+0x57/0xc0 arch/x86/kernel/apic/apic.c:1049 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0033:0x7fc81ac4d9f0 Code: 74 28 48 85 c9 74 29 45 38 1c 10 75 23 83 c0 01 44 39 d0 75 dc 48 89 f0 25 ff 1f 00 00 49 89 34 c1 41 88 3c 00 31 c0 c3 66 90 <41> 38 3c 10 74 0b 41 88 3c 10 31 c0 49 89 34 d1 c3 b8 01 00 00 00 RSP: 002b:00007ffe34d61a38 EFLAGS: 00000246 RAX: 0000000084cfb020 RBX: 00007fc81bae5720 RCX: ffffffff84cfb020 RDX: 0000000000001020 RSI: ffffffff84cfb020 RDI: 000000000000000b RBP: ffffffff84cfb020 R08: 00007fc81afa0000 R09: 00007fc81afa2000 R10: 0000000084cfb024 R11: 000000000000000b R12: 000000000000000b R13: 0000000000000000 R14: ffffffff84cfbded R15: 000000000003c3a4 Allocated by task 5816: 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+0x89/0x90 mm/kasan/common.c:345 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4147 [inline] slab_alloc_node mm/slub.c:4196 [inline] kmem_cache_alloc_noprof+0x1cb/0x3b0 mm/slub.c:4203 vm_area_dup+0x25/0x760 kernel/fork.c:488 dup_mmap kernel/fork.c:672 [inline] dup_mm kernel/fork.c:1734 [inline] copy_mm kernel/fork.c:1786 [inline] copy_process+0x7f67/0x91a0 kernel/fork.c:2429 kernel_clone+0xfc/0x960 kernel/fork.c:2844 __do_sys_clone+0xce/0x120 kernel/fork.c:2987 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 15060: 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+0x51/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2380 [inline] slab_free_after_rcu_debug+0x116/0x350 mm/slub.c:4692 rcu_do_batch kernel/rcu/tree.c:2568 [inline] rcu_core+0x799/0x14e0 kernel/rcu/tree.c:2824 handle_softirqs+0x216/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:1049 [inline] sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1049 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 Last potentially related work creation: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_record_aux_stack+0xb8/0xd0 mm/kasan/generic.c:548 slab_free_hook mm/slub.c:2341 [inline] slab_free mm/slub.c:4642 [inline] kmem_cache_free+0x160/0x4d0 mm/slub.c:4744 exit_mmap+0x511/0xb90 mm/mmap.c:1309 __mmput+0x12a/0x410 kernel/fork.c:1379 mmput+0x62/0x70 kernel/fork.c:1401 exit_mm kernel/exit.c:589 [inline] do_exit+0x9d1/0x2c30 kernel/exit.c:940 do_group_exit+0xd3/0x2a0 kernel/exit.c:1102 get_signal+0x2673/0x26d0 kernel/signal.c:3034 arch_do_signal_or_restart+0x8f/0x7d0 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x150/0x2a0 kernel/entry/common.c:218 do_syscall_64+0xda/0x260 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88804165bdc0 which belongs to the cache vm_area_struct of size 256 The buggy address is located 319 bytes to the right of allocated 256-byte region [ffff88804165bdc0, ffff88804165bec0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4165b memcg:ffff88807d372781 anon flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801c691b40 ffffea0001f91640 dead000000000005 raw: 0000000000000000 00000000000c000c 00000000f5000000 ffff88807d372781 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 14030, tgid 14030 (dhcpcd-run-hook), ts 618712951402, free_ts 618712057004 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+0x135c/0x3920 mm/page_alloc.c:3688 __alloc_frozen_pages_noprof+0x263/0x23a0 mm/page_alloc.c:4970 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2301 alloc_slab_page mm/slub.c:2450 [inline] allocate_slab mm/slub.c:2618 [inline] new_slab+0x244/0x340 mm/slub.c:2672 ___slab_alloc+0xd9c/0x1940 mm/slub.c:3858 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3948 __slab_alloc_node mm/slub.c:4023 [inline] slab_alloc_node mm/slub.c:4184 [inline] kmem_cache_alloc_noprof+0xef/0x3b0 mm/slub.c:4203 vm_area_dup+0x25/0x760 kernel/fork.c:488 dup_mmap kernel/fork.c:672 [inline] dup_mm kernel/fork.c:1734 [inline] copy_mm kernel/fork.c:1786 [inline] copy_process+0x7f67/0x91a0 kernel/fork.c:2429 kernel_clone+0xfc/0x960 kernel/fork.c:2844 __do_sys_clone+0xce/0x120 kernel/fork.c:2987 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 14030 tgid 14030 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0x69d/0xff0 mm/page_alloc.c:2725 mm_free_pgd kernel/fork.c:793 [inline] __mmdrop+0xd5/0x4f0 kernel/fork.c:939 mmdrop include/linux/sched/mm.h:55 [inline] mmdrop_sched include/linux/sched/mm.h:83 [inline] mmdrop_lazy_tlb_sched include/linux/sched/mm.h:110 [inline] finish_task_switch.isra.0+0x7a4/0xc10 kernel/sched/core.c:5275 context_switch kernel/sched/core.c:5385 [inline] __schedule+0x1177/0x5de0 kernel/sched/core.c:6767 __schedule_loop kernel/sched/core.c:6845 [inline] schedule+0xe7/0x3a0 kernel/sched/core.c:6860 anon_pipe_read+0xbd6/0x1210 fs/pipe.c:389 new_sync_read fs/read_write.c:489 [inline] vfs_read+0xaa3/0xc70 fs/read_write.c:570 ksys_read+0x205/0x240 fs/read_write.c:713 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 Memory state around the buggy address: ffff88804165be80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88804165bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88804165bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88804165c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88804165c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================