================================================================== BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948 Read of size 1 at addr ffff888055a17fff by task kworker/u8:0/12 CPU: 1 UID: 0 PID: 12 Comm: kworker/u8:0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Workqueue: events_unbound cfg80211_wiphy_work 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 39 ed f7 0e 45 85 c0 0f 85 be 01 00 00 4c 89 e7 e8 a4 f6 ff ff e8 cf d3 3a 00 fb 65 48 8b 1d de 17 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:ffffc900001173a8 EFLAGS: 00000202 RAX: 00000000000628f7 RBX: ffff88801d2c4900 RCX: 0000000000000006 RDX: 0000000000000000 RSI: ffffffff8da2a184 RDI: ffffffff8bf06cc0 RBP: ffffc900001173f0 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff9081f4d7 R11: 0000000000000001 R12: ffff8880b853a380 R13: ffff88807b254900 R14: ffff8880b843a380 R15: ffff8880b853b1b0 context_switch kernel/sched/core.c:5328 [inline] __schedule+0x1198/0x5de0 kernel/sched/core.c:6929 preempt_schedule_irq+0x51/0x90 kernel/sched/core.c:7256 irqentry_exit+0x36/0x90 kernel/entry/common.c:211 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 RIP: 0010:arch_test_bit arch/x86/include/asm/bitops.h:233 [inline] RIP: 0010:_test_bit include/asm-generic/bitops/instrumented-non-atomic.h:142 [inline] RIP: 0010:cpumask_test_cpu include/linux/cpumask.h:646 [inline] RIP: 0010:cpu_online include/linux/cpumask.h:1205 [inline] RIP: 0010:trace_lock_release include/trace/events/lock.h:69 [inline] RIP: 0010:lock_release+0x3b/0x2f0 kernel/locking/lockdep.c:5879 Code: 89 fb 48 83 ec 18 65 48 8b 05 49 6c 08 12 48 89 44 24 10 31 c0 0f 1f 44 00 00 65 8b 05 62 6c 08 12 83 f8 07 0f 87 38 02 00 00 <89> c0 48 0f a3 05 eb 10 e9 0e 0f 82 b1 01 00 00 8b 3d 63 41 e9 0e RSP: 0018:ffffc90000117698 EFLAGS: 00000297 RAX: 0000000000000001 RBX: ffffffff8e3c4460 RCX: ffffffff91244101 RDX: 0000000000000000 RSI: ffffffff816c1914 RDI: ffffffff8e3c4460 RBP: 0000000000000001 R08: ffffffff9124417c R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000012595 R12: ffffffff816c1914 R13: ffffc90000117750 R14: ffffc90000117ac0 R15: ffffc90000117784 rcu_lock_release include/linux/rcupdate.h:341 [inline] rcu_read_unlock include/linux/rcupdate.h:897 [inline] class_rcu_destructor include/linux/rcupdate.h:1195 [inline] unwind_next_frame+0x3f9/0x20a0 arch/x86/kernel/unwind_orc.c:479 arch_stack_walk+0x94/0x100 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x8e/0xc0 kernel/stacktrace.c:122 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:2530 [inline] slab_free mm/slub.c:6619 [inline] kmem_cache_free+0x2d4/0x6c0 mm/slub.c:6729 kfree_skbmem+0x1a4/0x1f0 net/core/skbuff.c:1110 __kfree_skb net/core/skbuff.c:1167 [inline] sk_skb_reason_drop+0x136/0x1a0 net/core/skbuff.c:1204 kfree_skb_reason include/linux/skbuff.h:1322 [inline] kfree_skb include/linux/skbuff.h:1331 [inline] ieee80211_iface_work+0x435/0x1360 net/mac80211/iface.c:1750 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 Allocated by task 5182: 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] kernfs_fop_open+0x244/0xda0 fs/kernfs/file.c:641 do_dentry_open+0x982/0x1530 fs/open.c:965 vfs_open+0x82/0x3f0 fs/open.c:1097 do_open fs/namei.c:3975 [inline] path_openat+0x1de4/0x2cb0 fs/namei.c:4134 do_filp_open+0x20b/0x470 fs/namei.c:4161 do_sys_openat2+0x11b/0x1d0 fs/open.c:1437 do_sys_open fs/open.c:1452 [inline] __do_sys_openat fs/open.c:1468 [inline] __se_sys_openat fs/open.c:1463 [inline] __x64_sys_openat+0x174/0x210 fs/open.c:1463 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 Freed by task 5182: 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:2530 [inline] slab_free mm/slub.c:6619 [inline] kfree+0x2b8/0x6d0 mm/slub.c:6826 kernfs_fop_release+0x12c/0x1e0 fs/kernfs/file.c:786 __fput+0x402/0xb70 fs/file_table.c:468 fput_close_sync+0x118/0x210 fs/file_table.c:573 __do_sys_close fs/open.c:1589 [inline] __se_sys_close fs/open.c:1574 [inline] __x64_sys_close+0x8b/0x120 fs/open.c:1574 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 The buggy address belongs to the object at ffff888055a17c00 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 [ffff888055a17c00, ffff888055a17e00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x55a14 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 ffffea000154d300 dead000000000002 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88813ffa6c80 ffffea000154d300 dead000000000002 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea0001568501 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 13, tgid 13 (kworker/u8:1), ts 59898850876, free_ts 14891049555 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:3046 [inline] allocate_slab mm/slub.c:3219 [inline] new_slab+0x24a/0x360 mm/slub.c:3273 ___slab_alloc+0xdc4/0x1ae0 mm/slub.c:4643 __slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4762 __slab_alloc_node mm/slub.c:4838 [inline] slab_alloc_node mm/slub.c:5260 [inline] __kmalloc_cache_noprof+0x477/0x780 mm/slub.c:5750 kmalloc_noprof include/linux/slab.h:957 [inline] kzalloc_noprof include/linux/slab.h:1094 [inline] mca_alloc net/ipv6/mcast.c:871 [inline] __ipv6_dev_mc_inc+0x2f1/0xbc0 net/ipv6/mcast.c:961 addrconf_join_solict net/ipv6/addrconf.c:2246 [inline] addrconf_dad_begin net/ipv6/addrconf.c:4099 [inline] addrconf_dad_work+0x28c/0x14e0 net/ipv6/addrconf.c:4227 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 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: ffff888055a17e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888055a17f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888055a17f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888055a18000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888055a18080: 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: 39 ed cmp %ebp,%ebp 9: f7 0e 45 85 c0 0f testl $0xfc08545,(%rsi) f: 85 be 01 00 00 4c test %edi,0x4c000001(%rsi) 15: 89 e7 mov %esp,%edi 17: e8 a4 f6 ff ff call 0xfffff6c0 1c: e8 cf d3 3a 00 call 0x3ad3f0 21: fb sti 22: 65 48 8b 1d de 17 17 mov %gs:0x121717de(%rip),%rbx # 0x12171808 29: 12 * 2a: 48 8d bb 58 16 00 00 lea 0x1658(%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