================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0xf94/0x1030 drivers/hid/hid-mcp2221.c:852 Read of size 1 at addr ffff888075447fff by task syz-executor/8429 CPU: 0 UID: 0 PID: 8429 Comm: syz-executor Not tainted 6.15.0-rc6-syzkaller-00047-ge9565e23cd89 #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+0x38d/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+0x202/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+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1049 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:5250 Code: fb 09 00 00 44 8b 05 f9 9b fb 0e 45 85 c0 0f 85 be 01 00 00 4c 89 e7 e8 a4 f6 ff ff e8 3f 77 39 00 fb 65 48 8b 1d 3e 7d 1a 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:ffffc9000498f988 EFLAGS: 00000202 RAX: 00000000000ca8a1 RBX: ffff888026f3a440 RCX: ffffffff81c3090f RDX: 0000000000000000 RSI: ffffffff8dbe2848 RDI: ffffffff8bf48920 RBP: ffffc9000498f9d0 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff9084ff17 R11: 0000000000000000 R12: ffff8880b8439dc0 R13: ffff88802bd28000 R14: 0000000000000001 R15: ffff8880b843abf0 context_switch kernel/sched/core.c:5385 [inline] __schedule+0x1177/0x5de0 kernel/sched/core.c:6767 preempt_schedule_common+0x44/0xc0 kernel/sched/core.c:6947 preempt_schedule_thunk+0x16/0x30 arch/x86/entry/thunk.S:12 __raw_read_unlock include/linux/rwlock_api_smp.h:233 [inline] _raw_read_unlock+0x3e/0x50 kernel/locking/spinlock.c:260 __do_wait+0x397/0x890 kernel/exit.c:1684 do_wait+0x21e/0x5a0 kernel/exit.c:1706 kernel_wait4+0x16b/0x280 kernel/exit.c:1865 __do_sys_wait4+0x15d/0x170 kernel/exit.c:1893 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:0x7ff5ebb84bd7 Code: 89 7c 24 10 48 89 4c 24 18 e8 45 1b 03 00 4c 8b 54 24 18 8b 54 24 14 41 89 c0 48 8b 74 24 08 8b 7c 24 10 b8 3d 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 89 44 24 10 e8 95 1b 03 00 8b 44 RSP: 002b:00007fff9712b2b0 EFLAGS: 00000293 ORIG_RAX: 000000000000003d RAX: ffffffffffffffda RBX: 000000000000011e RCX: 00007ff5ebb84bd7 RDX: 0000000040000001 RSI: 00007fff9712b31c RDI: 00000000ffffffff RBP: 00007fff9712b31c R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000001388 R13: 00000000000927c0 R14: 0000000000077985 R15: 00007fff9712b370 Allocated by task 8429: 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 getname_flags.part.0+0x4c/0x550 fs/namei.c:146 getname_flags+0x93/0xf0 include/linux/audit.h:322 getname include/linux/fs.h:2852 [inline] __do_sys_mkdirat fs/namei.c:4409 [inline] __se_sys_mkdirat fs/namei.c:4407 [inline] __x64_sys_mkdirat+0x76/0xb0 fs/namei.c:4407 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 8429: 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 mm/slub.c:4642 [inline] kmem_cache_free+0x2d4/0x4d0 mm/slub.c:4744 putname+0x154/0x1a0 fs/namei.c:297 do_mkdirat+0x20e/0x3e0 fs/namei.c:4403 __do_sys_mkdirat fs/namei.c:4409 [inline] __se_sys_mkdirat fs/namei.c:4407 [inline] __x64_sys_mkdirat+0x83/0xb0 fs/namei.c:4407 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 ffff888075446600 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 [ffff888075446600, ffff888075447600) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x75440 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 ffff88801c6b6140 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000070007 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801c6b6140 dead000000000122 0000000000000000 head: 0000000000000000 0000000000070007 00000000f5000000 0000000000000000 head: 00fff00000000003 ffffea0001d51001 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 8429, tgid 8429 (syz-executor), ts 488588178070, free_ts 488581160292 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 getname_flags.part.0+0x4c/0x550 fs/namei.c:146 getname_flags+0x93/0xf0 include/linux/audit.h:322 getname include/linux/fs.h:2852 [inline] getname_maybe_null include/linux/fs.h:2859 [inline] getname_maybe_null include/linux/fs.h:2856 [inline] vfs_fstatat+0xe1/0xf0 fs/stat.c:367 __do_sys_newfstatat+0xa1/0x130 fs/stat.c:536 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 5797 tgid 5797 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 __folio_put+0x329/0x450 mm/swap.c:112 folio_put include/linux/mm.h:1580 [inline] put_page include/linux/mm.h:1649 [inline] page_to_skb+0xa23/0xc50 drivers/net/virtio_net.c:892 receive_mergeable drivers/net/virtio_net.c:2430 [inline] receive_buf+0x75e/0x3fe0 drivers/net/virtio_net.c:2568 virtnet_receive_packets drivers/net/virtio_net.c:2926 [inline] virtnet_receive drivers/net/virtio_net.c:2950 [inline] virtnet_poll+0x10d6/0x3c00 drivers/net/virtio_net.c:3045 __napi_poll.constprop.0+0xb7/0x550 net/core/dev.c:7324 napi_poll net/core/dev.c:7388 [inline] net_rx_action+0xa97/0x1010 net/core/dev.c:7510 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 common_interrupt+0xbf/0xe0 arch/x86/kernel/irq.c:285 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693 Memory state around the buggy address: ffff888075447e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888075447f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888075447f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888075448000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888075448080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 00 00 add %al,(%rax) 2: 44 8b 05 f9 9b fb 0e mov 0xefb9bf9(%rip),%r8d # 0xefb9c02 9: 45 85 c0 test %r8d,%r8d c: 0f 85 be 01 00 00 jne 0x1d0 12: 4c 89 e7 mov %r12,%rdi 15: e8 a4 f6 ff ff call 0xfffff6be 1a: e8 3f 77 39 00 call 0x39775e 1f: fb sti 20: 65 48 8b 1d 3e 7d 1a mov %gs:0x121a7d3e(%rip),%rbx # 0x121a7d66 27: 12 * 28: 48 8d bb 18 16 00 00 lea 0x1618(%rbx),%rdi <-- trapping instruction 2f: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 36: fc ff df 39: 48 89 fa mov %rdi,%rdx 3c: 48 rex.W 3d: c1 .byte 0xc1