================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948 Read of size 1 at addr ffff88813362bfff by task klogd/2838 CPU: 1 UID: 0 PID: 2838 Comm: klogd Not tainted syzkaller #0 PREEMPT(voluntary) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/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+0x38b/0x610 drivers/usb/core/hcd.c:1661 usb_hcd_giveback_urb+0x39b/0x450 drivers/usb/core/hcd.c:1745 dummy_timer+0x1809/0x3a00 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+0x208/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:1050 [inline] sysvec_apic_timer_interrupt+0x43/0xb0 arch/x86/kernel/apic/apic.c:1050 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0033:0x7f72097d5c15 Code: 00 eb b2 66 90 40 80 fe 2d 74 da 41 bd ff ff ff ff 40 80 fe 7a 0f 87 12 01 00 00 48 8d 15 c7 0a 0c 00 40 0f b6 c6 48 63 04 82 <48> 01 d0 ff e0 66 0f 1f 44 00 00 40 80 fe 5f 74 aa 40 0f be c6 8d RSP: 002b:00007ffd0c7a32a0 EFLAGS: 00000297 RAX: fffffffffff3f9cd RBX: 00007f720989ddd2 RCX: 0000000000000000 RDX: 00007f72098966d4 RSI: 0000000000000068 RDI: 00007ffd0c7a3440 RBP: 00007ffd0c7a3440 R08: 0000000000000000 R09: 0000000000000003 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 00000000ffffffff R14: 0000000000000000 R15: 0000000000000011 Allocated by task 5218: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:388 [inline] __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:405 kmalloc_noprof include/linux/slab.h:905 [inline] slab_free_hook mm/slub.c:2374 [inline] slab_free mm/slub.c:4695 [inline] kmem_cache_free+0x123/0x470 mm/slub.c:4797 file_free fs/file_table.c:79 [inline] __fput+0x68d/0xb70 fs/file_table.c:481 fput_close_sync+0x118/0x210 fs/file_table.c:573 __do_sys_close fs/open.c:1587 [inline] __se_sys_close fs/open.c:1572 [inline] __x64_sys_close+0x8b/0x120 fs/open.c:1572 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4d0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 22: 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+0x3e/0x50 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] kfree+0x283/0x470 mm/slub.c:4894 slab_free_after_rcu_debug+0x60/0x2a0 mm/slub.c:4732 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0x79c/0x1530 kernel/rcu/tree.c:2861 handle_softirqs+0x208/0x8d0 kernel/softirq.c:579 run_ksoftirqd kernel/softirq.c:968 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:960 smpboot_thread_fn+0x3f7/0xae0 kernel/smpboot.c:160 kthread+0x3c5/0x780 kernel/kthread.c:463 ret_from_fork+0x56d/0x700 arch/x86/kernel/process.c:148 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+0x8c/0xa0 mm/kasan/generic.c:548 __call_rcu_common.constprop.0+0xa5/0xa10 kernel/rcu/tree.c:3123 slab_free_hook mm/slub.c:2386 [inline] slab_free mm/slub.c:4695 [inline] kmem_cache_free+0x14e/0x470 mm/slub.c:4797 file_free fs/file_table.c:79 [inline] __fput+0x68d/0xb70 fs/file_table.c:481 fput_close_sync+0x118/0x210 fs/file_table.c:573 __do_sys_close fs/open.c:1587 [inline] __se_sys_close fs/open.c:1572 [inline] __x64_sys_close+0x8b/0x120 fs/open.c:1572 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4d0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88813362bfc0 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 31 bytes to the right of allocated 32-byte region [ffff88813362bfc0, ffff88813362bfe0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88813362b200 pfn:0x13362b flags: 0x200000000000200(workingset|node=0|zone=2) page_type: f5(slab) raw: 0200000000000200 ffff888100041780 ffffea00047769d0 ffffea0004d15290 raw: ffff88813362b200 0000000000400002 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x52800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP), pid 3270, tgid 3270 (modprobe), ts 52071082855, free_ts 52069300171 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+0xf98/0x2ce0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x259/0x21e0 mm/page_alloc.c:5148 alloc_pages_mpol+0xe4/0x410 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+0xc55/0x1620 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] __kmalloc_cache_noprof+0x209/0x3c0 mm/slub.c:4402 kmalloc_noprof include/linux/slab.h:905 [inline] slab_free_hook mm/slub.c:2374 [inline] slab_free mm/slub.c:4695 [inline] kmem_cache_free+0x123/0x470 mm/slub.c:4797 exit_mmap+0x511/0xb90 mm/mmap.c:1305 __mmput kernel/fork.c:1129 [inline] mmput+0xdb/0x430 kernel/fork.c:1152 exit_mm kernel/exit.c:582 [inline] do_exit+0x7c7/0x2bf0 kernel/exit.c:949 do_group_exit+0xd3/0x2a0 kernel/exit.c:1102 __do_sys_exit_group kernel/exit.c:1113 [inline] __se_sys_exit_group kernel/exit.c:1111 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1111 x64_sys_call+0x14fa/0x1720 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4d0 arch/x86/entry/syscall_64.c:94 page last free pid 3270 tgid 3270 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0x78a/0xfd0 mm/page_alloc.c:2895 tlb_batch_list_free mm/mmu_gather.c:159 [inline] tlb_finish_mmu+0x237/0x7c0 mm/mmu_gather.c:500 exit_mmap+0x403/0xb90 mm/mmap.c:1293 __mmput kernel/fork.c:1129 [inline] mmput+0xdb/0x430 kernel/fork.c:1152 exit_mm kernel/exit.c:582 [inline] do_exit+0x7c7/0x2bf0 kernel/exit.c:949 do_group_exit+0xd3/0x2a0 kernel/exit.c:1102 __do_sys_exit_group kernel/exit.c:1113 [inline] __se_sys_exit_group kernel/exit.c:1111 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1111 x64_sys_call+0x14fa/0x1720 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4d0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88813362be80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc ffff88813362bf00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc >ffff88813362bf80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc ^ ffff88813362c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88813362c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================