==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:948
Read of size 1 at addr ffff88806b8abfff by task syz.1.219/6882
CPU: 1 UID: 0 PID: 6882 Comm: syz.1.219 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xca/0x240 mm/kasan/report.c:482
kasan_report+0x118/0x150 mm/kasan/report.c:595
mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:948
__hid_input_report drivers/hid/hid-core.c:2139 [inline]
hid_input_report+0x41d/0x580 drivers/hid/hid-core.c:2166
hid_irq_in+0x47e/0x6d0 drivers/hid/usbhid/hid-core.c:286
__usb_hcd_giveback_urb+0x376/0x540 drivers/usb/core/hcd.c:1661
dummy_timer+0x85f/0x45b0 drivers/usb/gadget/udc/dummy_hcd.c:1995
__run_hrtimer kernel/time/hrtimer.c:1777 [inline]
__hrtimer_run_queues+0x51c/0xc30 kernel/time/hrtimer.c:1841
hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1858
handle_softirqs+0x27d/0x850 kernel/softirq.c:626
__do_softirq kernel/softirq.c:660 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:727
irq_exit_rcu+0x9/0x30 kernel/softirq.c:743
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1056
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:finish_task_switch+0x242/0x940 kernel/sched/core.c:5114
Code: 0f 84 c2 01 00 00 48 85 db 0f 85 e9 01 00 00 0f 1f 44 00 00 4c 8b 75 d0 4c 89 e7 e8 48 88 ca 09 e8 13 74 37 00 fb 4c 8b 65 c0 <49> 8d bc 24 48 16 00 00 48 89 f8 48 c1 e8 03 42 0f b6 04 28 84 c0
RSP: 0018:ffffc9000473f1f8 EFLAGS: 00000282
RAX: ed3ad0f8b8fcea00 RBX: 0000000000000000 RCX: ed3ad0f8b8fcea00
RDX: 0000000000000000 RSI: ffffffff8d78649e RDI: ffffffff8bc027e0
RBP: ffffc9000473f250 R08: ffffffff8f815a77 R09: 1ffffffff1f02b4e
R10: dffffc0000000000 R11: fffffbfff1f02b4f R12: ffff888035103d00
R13: dffffc0000000000 R14: ffff8880260c5b80 R15: ffff8880b873b498
context_switch kernel/sched/core.c:5259 [inline]
__schedule+0x14c4/0x5000 kernel/sched/core.c:6863
__schedule_loop kernel/sched/core.c:6945 [inline]
schedule+0x165/0x360 kernel/sched/core.c:6960
schedule_timeout+0x9a/0x270 kernel/time/sleep_timeout.c:75
unix_wait_for_peer+0x1e9/0x2e0 net/unix/af_unix.c:1618
unix_dgram_sendmsg+0xb6d/0x1840 net/unix/af_unix.c:2250
sock_sendmsg_nosec+0x18f/0x1d0 net/socket.c:728
__sock_sendmsg net/socket.c:743 [inline]
____sys_sendmsg+0x577/0x880 net/socket.c:2601
___sys_sendmsg+0x21f/0x2a0 net/socket.c:2655
__sys_sendmmsg+0x227/0x430 net/socket.c:2744
__do_sys_sendmmsg net/socket.c:2771 [inline]
__se_sys_sendmmsg net/socket.c:2768 [inline]
__x64_sys_sendmmsg+0xa0/0xc0 net/socket.c:2768
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f4ec798f749
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:00007f4ec8849038 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00007f4ec7be5fa0 RCX: 00007f4ec798f749
RDX: 0400000000000041 RSI: 0000200000000000 RDI: 0000000000000007
RBP: 00007f4ec7a13f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f4ec7be6038 R14: 00007f4ec7be5fa0 R15: 00007fffcf74df18
Allocated by task 0:
kasan_save_stack mm/kasan/common.c:56 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:77
unpoison_slab_object mm/kasan/common.c:339 [inline]
__kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:365
kasan_slab_alloc include/linux/kasan.h:252 [inline]
slab_post_alloc_hook mm/slub.c:4948 [inline]
slab_alloc_node mm/slub.c:5258 [inline]
kmem_cache_alloc_node_noprof+0x43c/0x720 mm/slub.c:5310
kmalloc_reserve+0xbd/0x290 net/core/skbuff.c:586
__alloc_skb+0x27e/0x430 net/core/skbuff.c:690
alloc_skb include/linux/skbuff.h:1383 [inline]
wg_packet_send_keepalive+0x65/0x2c0 drivers/net/wireguard/send.c:226
call_timer_fn+0x16e/0x590 kernel/time/timer.c:1748
expire_timers kernel/time/timer.c:1799 [inline]
__run_timers kernel/time/timer.c:2373 [inline]
__run_timer_base+0x61a/0x860 kernel/time/timer.c:2385
run_timer_base kernel/time/timer.c:2394 [inline]
run_timer_softirq+0xb7/0x180 kernel/time/timer.c:2404
handle_softirqs+0x27d/0x850 kernel/softirq.c:626
__do_softirq kernel/softirq.c:660 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:727
irq_exit_rcu+0x9/0x30 kernel/softirq.c:743
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1056
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
Freed by task 5912:
kasan_save_stack mm/kasan/common.c:56 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:77
kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:252 [inline]
__kasan_slab_free+0x5c/0x80 mm/kasan/common.c:284
kasan_slab_free include/linux/kasan.h:234 [inline]
slab_free_hook mm/slub.c:2540 [inline]
slab_free mm/slub.c:6663 [inline]
kmem_cache_free+0x197/0x620 mm/slub.c:6774
skb_release_data+0x62d/0x7c0 net/core/skbuff.c:1107
skb_release_all net/core/skbuff.c:1182 [inline]
__kfree_skb net/core/skbuff.c:1196 [inline]
consume_skb+0x9e/0xf0 net/core/skbuff.c:1428
wg_packet_consume_data_done drivers/net/wireguard/receive.c:435 [inline]
wg_packet_rx_poll+0x14c3/0x24a0 drivers/net/wireguard/receive.c:474
__napi_poll+0xae/0x320 net/core/dev.c:7667
napi_threaded_poll_loop+0x374/0x7a0 net/core/dev.c:7786
napi_threaded_poll+0x29d/0x3c0 net/core/dev.c:7837
kthread+0x711/0x8a0 kernel/kthread.c:463
ret_from_fork+0x599/0xb30 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
The buggy address belongs to the object at ffff88806b8aba80
which belongs to the cache skbuff_small_head of size 704
The buggy address is located 703 bytes to the right of
allocated 704-byte region [ffff88806b8aba80, ffff88806b8abd40)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x6b8a8
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
ksm flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff888140ea5280 ffffea0001ae8400 dead000000000003
raw: 0000000000000000 0000000000130013 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff888140ea5280 ffffea0001ae8400 dead000000000003
head: 0000000000000000 0000000000130013 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea0001ae2a01 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 0xf2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_MEMALLOC|__GFP_COMP|__GFP_NOMEMALLOC), pid 3464, tgid 3464 (kworker/u8:10), ts 82266950449, free_ts 73238537853
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x234/0x290 mm/page_alloc.c:1846
prep_new_page mm/page_alloc.c:1854 [inline]
get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3915
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5210
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486
alloc_slab_page mm/slub.c:3075 [inline]
allocate_slab+0x86/0x3b0 mm/slub.c:3248
new_slab mm/slub.c:3302 [inline]
___slab_alloc+0xf2b/0x1960 mm/slub.c:4651
__slab_alloc+0x65/0x100 mm/slub.c:4774
__slab_alloc_node mm/slub.c:4850 [inline]
slab_alloc_node mm/slub.c:5246 [inline]
kmem_cache_alloc_node_noprof+0x4ce/0x720 mm/slub.c:5310
kmalloc_reserve+0xbd/0x290 net/core/skbuff.c:586
__alloc_skb+0x27e/0x430 net/core/skbuff.c:690
__netdev_alloc_skb+0x108/0x960 net/core/skbuff.c:754
netdev_alloc_skb include/linux/skbuff.h:3484 [inline]
dev_alloc_skb include/linux/skbuff.h:3497 [inline]
__ieee80211_beacon_get+0xc06/0x1880 net/mac80211/tx.c:5654
ieee80211_beacon_get_tim+0xb4/0x2b0 net/mac80211/tx.c:5776
ieee80211_beacon_get include/net/mac80211.h:5669 [inline]
mac80211_hwsim_beacon_tx+0x3c5/0x870 drivers/net/wireless/virtual/mac80211_hwsim.c:2361
__iterate_interfaces+0x2ab/0x590 net/mac80211/util.c:761
ieee80211_iterate_active_interfaces_atomic+0xdb/0x180 net/mac80211/util.c:797
page last free pid 5818 tgid 5818 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1395 [inline]
free_unref_folios+0xdb3/0x14f0 mm/page_alloc.c:3000
folios_put_refs+0x584/0x670 mm/swap.c:1002
free_pages_and_swap_cache+0x277/0x520 mm/swap_state.c:355
__tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline]
tlb_batch_pages_flush mm/mmu_gather.c:149 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:397 [inline]
tlb_flush_mmu+0x3a0/0x680 mm/mmu_gather.c:404
tlb_finish_mmu+0xc3/0x1d0 mm/mmu_gather.c:497
vms_clear_ptes+0x42b/0x530 mm/vma.c:1238
vms_complete_munmap_vmas+0x206/0x8a0 mm/vma.c:1280
do_vmi_align_munmap+0x364/0x440 mm/vma.c:1539
do_vmi_munmap+0x253/0x2e0 mm/vma.c:1587
__vm_munmap+0x207/0x380 mm/vma.c:3203
__do_sys_munmap mm/mmap.c:1077 [inline]
__se_sys_munmap mm/mmap.c:1074 [inline]
__x64_sys_munmap+0x60/0x70 mm/mmap.c:1074
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88806b8abe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88806b8abf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88806b8abf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff88806b8ac000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88806b8ac080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: 0f 84 c2 01 00 00 je 0x1c8
6: 48 85 db test %rbx,%rbx
9: 0f 85 e9 01 00 00 jne 0x1f8
f: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
14: 4c 8b 75 d0 mov -0x30(%rbp),%r14
18: 4c 89 e7 mov %r12,%rdi
1b: e8 48 88 ca 09 call 0x9ca8868
20: e8 13 74 37 00 call 0x377438
25: fb sti
26: 4c 8b 65 c0 mov -0x40(%rbp),%r12
* 2a: 49 8d bc 24 48 16 00 lea 0x1648(%r12),%rdi <-- trapping instruction
31: 00
32: 48 89 f8 mov %rdi,%rax
35: 48 c1 e8 03 shr $0x3,%rax
39: 42 0f b6 04 28 movzbl (%rax,%r13,1),%eax
3e: 84 c0 test %al,%al