================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948 Read of size 1 at addr ffff888057a9ffff by task syz.6.340/7266 CPU: 0 UID: 0 PID: 7266 Comm: syz.6.340 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/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+0x314/0x450 drivers/hid/hid-core.c:2139 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:1777 [inline] __hrtimer_run_queues+0x202/0xad0 kernel/time/hrtimer.c:1841 hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1858 handle_softirqs+0x219/0x8e0 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0x109/0x170 kernel/softirq.c:723 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1052 [inline] sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1052 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 RIP: 0010:finish_task_switch.isra.0+0x22a/0xc10 kernel/sched/core.c:5193 Code: fb 09 00 00 44 8b 05 19 37 f8 0e 45 85 c0 0f 85 be 01 00 00 4c 89 e7 e8 a4 f6 ff ff e8 7f d3 3a 00 fb 65 48 8b 1d de 37 17 12 <48> 8d bb 58 16 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 RSP: 0018:ffffc9000441f8f0 EFLAGS: 00000206 RAX: 0000000000000a0f RBX: ffff88807bcddac0 RCX: ffffffff81c4faaf RDX: 0000000000000000 RSI: ffffffff8da28a9a RDI: ffffffff8bf07440 RBP: ffffc9000441f938 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff90822ed7 R11: 0000000000000001 R12: ffff8880b843a4c0 R13: ffff88801d76bc80 R14: ffff8880b843a4c0 R15: ffff8880b843b2f0 context_switch kernel/sched/core.c:5328 [inline] __schedule+0x1198/0x5de0 kernel/sched/core.c:6929 preempt_schedule_common+0x44/0xc0 kernel/sched/core.c:7113 preempt_schedule_thunk+0x16/0x30 arch/x86/entry/thunk.S:12 class_preempt_destructor include/linux/preempt.h:470 [inline] try_to_wake_up+0xa67/0x1870 kernel/sched/core.c:4145 wake_up_process kernel/sched/core.c:4424 [inline] wake_up_q+0xa1/0x130 kernel/sched/core.c:1086 futex_wake+0x460/0x530 kernel/futex/waitwake.c:198 do_futex+0x1e3/0x350 kernel/futex/syscalls.c:135 __do_sys_futex kernel/futex/syscalls.c:207 [inline] __se_sys_futex kernel/futex/syscalls.c:188 [inline] __x64_sys_futex+0x1e0/0x4c0 kernel/futex/syscalls.c:188 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ffb5638efc9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffddc1fda18 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: ffffffffffffffda RBX: 00007ffb565e5fa8 RCX: 00007ffb5638efc9 RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007ffb565e5fa8 RBP: 0000000000000000 R08: 0000000000000013 R09: 00000004dc1fdd0f R10: 00007ffb565e5fa0 R11: 0000000000000246 R12: 00007ffb565e5fac R13: 00007ffb565e5fa0 R14: 0000000000001d8e R15: 0000000000000004 Allocated by task 36: kasan_save_stack+0x33/0x60 mm/kasan/common.c:56 kasan_save_track+0x14/0x30 mm/kasan/common.c:77 poison_kmalloc_redzone mm/kasan/common.c:400 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:417 kmalloc_noprof include/linux/slab.h:957 [inline] kzalloc_noprof include/linux/slab.h:1094 [inline] sta_info_insert_finish net/mac80211/sta_info.c:894 [inline] sta_info_insert_rcu+0x940/0x3070 net/mac80211/sta_info.c:1009 ieee80211_ibss_finish_sta+0x21f/0x3b0 net/mac80211/ibss.c:568 ieee80211_ibss_add_sta+0x3a8/0x730 net/mac80211/ibss.c:624 ieee80211_update_sta_info net/mac80211/ibss.c:1000 [inline] ieee80211_rx_bss_info net/mac80211/ibss.c:1092 [inline] ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1573 [inline] ieee80211_ibss_rx_queued_mgmt+0x2767/0x2fe0 net/mac80211/ibss.c:1600 ieee80211_iface_process_skb net/mac80211/iface.c:1694 [inline] ieee80211_iface_work+0xe2e/0x1360 net/mac80211/iface.c:1748 cfg80211_wiphy_work+0x2c7/0x580 net/wireless/core.c:435 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3263 process_scheduled_works kernel/workqueue.c:3346 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3427 kthread+0x3c5/0x780 kernel/kthread.c:463 ret_from_fork+0x675/0x7d0 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Freed by task 36: kasan_save_stack+0x33/0x60 mm/kasan/common.c:56 kasan_save_track+0x14/0x30 mm/kasan/common.c:77 __kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:587 kasan_save_free_info mm/kasan/kasan.h:406 [inline] poison_slab_object mm/kasan/common.c:252 [inline] __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:284 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2539 [inline] slab_free mm/slub.c:6630 [inline] kfree+0x2b8/0x6d0 mm/slub.c:6837 sta_info_insert_finish net/mac80211/sta_info.c:966 [inline] sta_info_insert_rcu+0x1ddb/0x3070 net/mac80211/sta_info.c:1009 ieee80211_ibss_finish_sta+0x21f/0x3b0 net/mac80211/ibss.c:568 ieee80211_ibss_add_sta+0x3a8/0x730 net/mac80211/ibss.c:624 ieee80211_update_sta_info net/mac80211/ibss.c:1000 [inline] ieee80211_rx_bss_info net/mac80211/ibss.c:1092 [inline] ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1573 [inline] ieee80211_ibss_rx_queued_mgmt+0x2767/0x2fe0 net/mac80211/ibss.c:1600 ieee80211_iface_process_skb net/mac80211/iface.c:1694 [inline] ieee80211_iface_work+0xe2e/0x1360 net/mac80211/iface.c:1748 cfg80211_wiphy_work+0x2c7/0x580 net/wireless/core.c:435 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3263 process_scheduled_works kernel/workqueue.c:3346 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3427 kthread+0x3c5/0x780 kernel/kthread.c:463 ret_from_fork+0x675/0x7d0 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff888057a9fc00 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 [ffff888057a9fc00, ffff888057a9fe00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x57a9c head: order:2 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 ffff88813ffa6c80 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88813ffa6c80 dead000000000100 dead000000000122 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea00015ea701 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 5827, tgid 5827 (syz-executor), ts 110951483323, free_ts 37395076814 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1850 prep_new_page mm/page_alloc.c:1858 [inline] get_page_from_freelist+0x10a3/0x3a30 mm/page_alloc.c:3884 __alloc_frozen_pages_noprof+0x25f/0x2470 mm/page_alloc.c:5183 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:3055 [inline] allocate_slab mm/slub.c:3228 [inline] new_slab+0x24a/0x360 mm/slub.c:3282 ___slab_alloc+0xdae/0x1a60 mm/slub.c:4651 __slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4770 __slab_alloc_node mm/slub.c:4846 [inline] slab_alloc_node mm/slub.c:5268 [inline] __do_kmalloc_node mm/slub.c:5641 [inline] __kmalloc_noprof+0x501/0x880 mm/slub.c:5654 kmalloc_noprof include/linux/slab.h:961 [inline] kzalloc_noprof include/linux/slab.h:1094 [inline] fib6_info_alloc+0x40/0x160 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x14c/0x870 net/ipv6/route.c:3809 addrconf_f6i_alloc+0x2da/0x660 net/ipv6/route.c:4678 ipv6_add_addr+0x531/0x1fe0 net/ipv6/addrconf.c:1126 addrconf_add_linklocal+0x2a5/0x500 net/ipv6/addrconf.c:3311 addrconf_addr_gen+0x364/0x3b0 net/ipv6/addrconf.c:3442 addrconf_dev_config net/ipv6/addrconf.c:3489 [inline] addrconf_init_auto_addrs+0x2ba/0x810 net/ipv6/addrconf.c:3567 addrconf_notify+0xe93/0x19e0 net/ipv6/addrconf.c:3740 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:1394 [inline] __free_frozen_pages+0x7df/0x1160 mm/page_alloc.c:2906 __free_pages mm/page_alloc.c:5302 [inline] free_contig_range+0x183/0x4b0 mm/page_alloc.c:7146 destroy_args+0xb69/0x12e0 mm/debug_vm_pgtable.c:958 debug_vm_pgtable+0x1a32/0x3640 mm/debug_vm_pgtable.c:1345 do_one_initcall+0x123/0x6e0 init/main.c:1283 do_initcall_level init/main.c:1345 [inline] do_initcalls init/main.c:1361 [inline] do_basic_setup init/main.c:1380 [inline] kernel_init_freeable+0x5c8/0x920 init/main.c:1593 kernel_init+0x1c/0x2b0 init/main.c:1483 ret_from_fork+0x675/0x7d0 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff888057a9fe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888057a9ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888057a9ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888057aa0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888057aa0080: 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 19 37 f8 0e mov 0xef83719(%rip),%r8d # 0xef83722 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 7f d3 3a 00 call 0x3ad39e 1f: fb sti 20: 65 48 8b 1d de 37 17 mov %gs:0x121737de(%rip),%rbx # 0x12173806 27: 12 * 28: 48 8d bb 58 16 00 00 lea 0x1658(%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