================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948 Read of size 1 at addr ffff888056827fff by task swapper/1/0 CPU: 1 UID: 0 PID: 0 Comm: swapper/1 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+0x38b/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+0x202/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:finish_task_switch.isra.0+0x22a/0xc10 kernel/sched/core.c:5225 Code: fb 09 00 00 44 8b 05 b9 83 22 0f 45 85 c0 0f 85 be 01 00 00 4c 89 e7 e8 a4 f6 ff ff e8 cf 6a 3a 00 fb 65 48 8b 1d 5e 75 4d 12 <48> 8d bb 18 16 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 RSP: 0018:ffffc90000197bd8 EFLAGS: 00000206 RAX: 00000000007d4b99 RBX: ffff88801e6fa440 RCX: ffffffff81c3747f RDX: 0000000000000000 RSI: ffffffff8de513c8 RDI: ffffffff8c162b00 RBP: ffffc90000197c20 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff90ab5c97 R11: 0000000000000000 R12: ffff8880b853a300 R13: ffff88807bff0000 R14: ffff8880b843a300 R15: ffff8880b853b170 context_switch kernel/sched/core.c:5360 [inline] __schedule+0x1198/0x5de0 kernel/sched/core.c:6961 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 start_secondary+0x21d/0x2b0 arch/x86/kernel/smpboot.c:315 common_startup_64+0x13e/0x148 Allocated by task 5222: 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+0xaa/0xb0 mm/kasan/common.c:405 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] kernfs_fop_open+0x244/0xda0 fs/kernfs/file.c:623 do_dentry_open+0x982/0x1530 fs/open.c:965 vfs_open+0x82/0x3f0 fs/open.c:1095 do_open fs/namei.c:3887 [inline] path_openat+0x1de4/0x2cb0 fs/namei.c:4046 do_filp_open+0x20b/0x470 fs/namei.c:4073 do_sys_openat2+0x11b/0x1d0 fs/open.c:1435 do_sys_open fs/open.c:1450 [inline] __do_sys_openat fs/open.c:1466 [inline] __se_sys_openat fs/open.c:1461 [inline] __x64_sys_openat+0x174/0x210 fs/open.c:1461 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 5222: 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:2417 [inline] slab_free mm/slub.c:4680 [inline] kfree+0x2b4/0x4d0 mm/slub.c:4879 kernfs_fop_release+0x12c/0x1e0 fs/kernfs/file.c:768 __fput+0x3ff/0xb70 fs/file_table.c:468 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/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888056827c00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 511 bytes to the right of allocated 512-byte region [ffff888056827c00, ffff888056827e00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888056827800 pfn:0x56824 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000240 ffff88801b841c80 ffffea0001537b10 ffffea0000979310 raw: ffff888056827800 000000000010000e 00000000f5000000 0000000000000000 head: 00fff00000000240 ffff88801b841c80 ffffea0001537b10 ffffea0000979310 head: ffff888056827800 000000000010000e 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea00015a0901 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 2, tgid 2 (kthreadd), ts 76132678904, free_ts 18374577283 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:2487 [inline] allocate_slab mm/slub.c:2655 [inline] new_slab+0x247/0x330 mm/slub.c:2709 ___slab_alloc+0xcf2/0x1740 mm/slub.c:3891 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3981 __slab_alloc_node mm/slub.c:4056 [inline] slab_alloc_node mm/slub.c:4217 [inline] __kmalloc_cache_noprof+0xfb/0x3e0 mm/slub.c:4391 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] set_kthread_struct+0xcb/0x380 kernel/kthread.c:125 copy_process+0x3107/0x7690 kernel/fork.c:2102 kernel_clone+0xfc/0x930 kernel/fork.c:2605 kernel_thread+0xd4/0x120 kernel/fork.c:2667 create_kthread kernel/kthread.c:486 [inline] kthreadd+0x503/0x800 kernel/kthread.c:846 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 page last free pid 1 tgid 1 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 __free_pages mm/page_alloc.c:5260 [inline] free_contig_range+0x183/0x4b0 mm/page_alloc.c:7091 destroy_args+0x794/0xc10 mm/debug_vm_pgtable.c:958 debug_vm_pgtable+0x1a32/0x3640 mm/debug_vm_pgtable.c:1345 do_one_initcall+0x120/0x6e0 init/main.c:1269 do_initcall_level init/main.c:1331 [inline] do_initcalls init/main.c:1347 [inline] do_basic_setup init/main.c:1366 [inline] kernel_init_freeable+0x5c2/0x910 init/main.c:1579 kernel_init+0x1c/0x2b0 init/main.c:1469 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff888056827e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888056827f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888056827f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888056828000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888056828080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: fb sti 1: 09 00 or %eax,(%rax) 3: 00 44 8b 05 add %al,0x5(%rbx,%rcx,4) 7: b9 83 22 0f 45 mov $0x450f2283,%ecx c: 85 c0 test %eax,%eax e: 0f 85 be 01 00 00 jne 0x1d2 14: 4c 89 e7 mov %r12,%rdi 17: e8 a4 f6 ff ff call 0xfffff6c0 1c: e8 cf 6a 3a 00 call 0x3a6af0 21: fb sti 22: 65 48 8b 1d 5e 75 4d mov %gs:0x124d755e(%rip),%rbx # 0x124d7588 29: 12 * 2a: 48 8d bb 18 16 00 00 lea 0x1618(%rbx),%rdi <-- trapping instruction 31: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 38: fc ff df 3b: 48 89 fa mov %rdi,%rdx 3e: 48 rex.W 3f: c1 .byte 0xc1