==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:948
Read of size 1 at addr ffff888021bbbfff by task swapper/0/0
CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/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+0x40a/0x520 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/0x44c0 drivers/usb/gadget/udc/dummy_hcd.c:1995
__run_hrtimer kernel/time/hrtimer.c:1777 [inline]
__hrtimer_run_queues+0x52c/0xc60 kernel/time/hrtimer.c:1841
hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1858
handle_softirqs+0x286/0x870 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0xca/0x1f0 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+0xa6/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+0x26b/0x950 kernel/sched/core.c:5122
Code: 0f 84 3c 01 00 00 48 85 db 0f 85 63 01 00 00 e9 27 05 00 00 4c 8b 75 d0 4c 89 e7 e8 2f 14 ba 09 e8 ba c9 36 00 fb 4c 8b 65 c0 <49> 8d bc 24 58 16 00 00 48 89 f8 48 c1 e8 03 42 0f b6 04 28 84 c0
RSP: 0018:ffffffff8dc07ad8 EFLAGS: 00000286
RAX: 3bebba14302edd00 RBX: 0000000000000000 RCX: 3bebba14302edd00
RDX: 0000000000000000 RSI: ffffffff8d750a4b RDI: ffffffff8bbf18e0
RBP: ffffffff8dc07b30 R08: ffffffff8f7d4177 R09: 1ffffffff1efa82e
R10: dffffc0000000000 R11: fffffbfff1efa82f R12: ffffffff8dc95200
R13: dffffc0000000000 R14: ffff88803210dac0 R15: ffff8880b863ab98
context_switch kernel/sched/core.c:5257 [inline]
__schedule+0x17cc/0x4d60 kernel/sched/core.c:6862
schedule_idle+0x52/0x90 kernel/sched/core.c:6985
do_idle+0x4a7/0x510 kernel/sched/idle.c:358
cpu_startup_entry+0x44/0x60 kernel/sched/idle.c:428
rest_init+0x2de/0x300 init/main.c:757
start_kernel+0x3ae/0x410 init/main.c:1111
x86_64_start_reservations+0x24/0x30 arch/x86/kernel/head64.c:310
x86_64_start_kernel+0x143/0x1c0 arch/x86/kernel/head64.c:291
common_startup_64+0x13e/0x147
Allocated by task 12269:
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:4965 [inline]
slab_alloc_node mm/slub.c:5275 [inline]
kmem_cache_alloc_node_noprof+0x43c/0x710 mm/slub.c:5327
kmalloc_reserve+0xbd/0x290 net/core/skbuff.c:582
__alloc_skb+0x142/0x2d0 net/core/skbuff.c:673
__netdev_alloc_skb+0x108/0x970 net/core/skbuff.c:737
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:5652
ieee80211_beacon_get_tim+0xb4/0x2b0 net/mac80211/tx.c:5774
ieee80211_beacon_get include/net/mac80211.h:5667 [inline]
mac80211_hwsim_beacon_tx+0x3ce/0x860 drivers/net/wireless/virtual/mac80211_hwsim.c:2355
__iterate_interfaces+0x2ab/0x590 net/mac80211/util.c:761
ieee80211_iterate_active_interfaces_atomic+0xdb/0x180 net/mac80211/util.c:797
mac80211_hwsim_beacon+0xbb/0x180 drivers/net/wireless/virtual/mac80211_hwsim.c:2389
__run_hrtimer kernel/time/hrtimer.c:1777 [inline]
__hrtimer_run_queues+0x52c/0xc60 kernel/time/hrtimer.c:1841
hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1858
handle_softirqs+0x286/0x870 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0xca/0x1f0 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+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1052
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
Freed by task 12269:
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:2533 [inline]
slab_free mm/slub.c:6622 [inline]
kmem_cache_free+0x19b/0x690 mm/slub.c:6732
skb_release_data+0x62d/0x7c0 net/core/skbuff.c:1090
skb_release_all net/core/skbuff.c:1164 [inline]
__kfree_skb net/core/skbuff.c:1178 [inline]
consume_skb+0x9e/0xf0 net/core/skbuff.c:1410
mac80211_hwsim_beacon_tx+0x3f0/0x860 drivers/net/wireless/virtual/mac80211_hwsim.c:2359
__iterate_interfaces+0x2ab/0x590 net/mac80211/util.c:761
ieee80211_iterate_active_interfaces_atomic+0xdb/0x180 net/mac80211/util.c:797
mac80211_hwsim_beacon+0xbb/0x180 drivers/net/wireless/virtual/mac80211_hwsim.c:2389
__run_hrtimer kernel/time/hrtimer.c:1777 [inline]
__hrtimer_run_queues+0x52c/0xc60 kernel/time/hrtimer.c:1841
hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1858
handle_softirqs+0x286/0x870 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0xca/0x1f0 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+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1052
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
The buggy address belongs to the object at ffff888021bbba80
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 [ffff888021bbba80, ffff888021bbbd40)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x21bb8
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 ffff888140ad8b40 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000130013 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff888140ad8b40 dead000000000100 dead000000000122
head: 0000000000000000 0000000000130013 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea000086ee01 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 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 33, tgid 33 (kworker/u8:2), ts 643796735100, free_ts 643704741822
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851
prep_new_page mm/page_alloc.c:1859 [inline]
get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3920
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5214
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2418
alloc_slab_page mm/slub.c:3049 [inline]
allocate_slab+0x96/0x3a0 mm/slub.c:3222
new_slab mm/slub.c:3276 [inline]
___slab_alloc+0xe94/0x18a0 mm/slub.c:4646
__slab_alloc+0x65/0x100 mm/slub.c:4765
__slab_alloc_node mm/slub.c:4841 [inline]
slab_alloc_node mm/slub.c:5263 [inline]
kmem_cache_alloc_node_noprof+0x4ce/0x710 mm/slub.c:5327
kmalloc_reserve+0xbd/0x290 net/core/skbuff.c:582
__alloc_skb+0x142/0x2d0 net/core/skbuff.c:673
alloc_skb include/linux/skbuff.h:1383 [inline]
nlmsg_new include/net/netlink.h:1055 [inline]
inet6_ifa_notify net/ipv6/addrconf.c:5610 [inline]
__ipv6_ifa_notify+0x1e8/0xac0 net/ipv6/addrconf.c:6270
ipv6_ifa_notify net/ipv6/addrconf.c:6322 [inline]
addrconf_dad_completed+0x180/0xd60 net/ipv6/addrconf.c:4320
addrconf_dad_work+0xc36/0x14b0 net/ipv6/addrconf.c:-1
process_one_work kernel/workqueue.c:3263 [inline]
process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3346
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427
kthread+0x711/0x8a0 kernel/kthread.c:463
page last free pid 116 tgid 116 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1395 [inline]
__free_frozen_pages+0xbc8/0xd30 mm/page_alloc.c:2948
discard_slab mm/slub.c:3320 [inline]
__put_partials+0x146/0x170 mm/slub.c:3867
put_cpu_partial+0x1f2/0x2e0 mm/slub.c:3942
__slab_free+0x2b9/0x390 mm/slub.c:5916
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x97/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:349
kasan_slab_alloc include/linux/kasan.h:252 [inline]
slab_post_alloc_hook mm/slub.c:4965 [inline]
slab_alloc_node mm/slub.c:5275 [inline]
__kmalloc_cache_noprof+0x37c/0x700 mm/slub.c:5753
kmalloc_noprof include/linux/slab.h:957 [inline]
kzalloc_noprof include/linux/slab.h:1094 [inline]
nsim_fib6_rt_create drivers/net/netdevsim/fib.c:547 [inline]
nsim_fib6_rt_insert drivers/net/netdevsim/fib.c:752 [inline]
nsim_fib6_event drivers/net/netdevsim/fib.c:856 [inline]
nsim_fib_event+0xca1/0x8a30 drivers/net/netdevsim/fib.c:889
nsim_fib_event_work+0x249/0x3b0 drivers/net/netdevsim/fib.c:1493
process_one_work kernel/workqueue.c:3263 [inline]
process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3346
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427
kthread+0x711/0x8a0 kernel/kthread.c:463
ret_from_fork+0x4bc/0x870 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:
ffff888021bbbe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888021bbbf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888021bbbf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff888021bbc000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888021bbc080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: 0f 84 3c 01 00 00 je 0x142
6: 48 85 db test %rbx,%rbx
9: 0f 85 63 01 00 00 jne 0x172
f: e9 27 05 00 00 jmp 0x53b
14: 4c 8b 75 d0 mov -0x30(%rbp),%r14
18: 4c 89 e7 mov %r12,%rdi
1b: e8 2f 14 ba 09 call 0x9ba144f
20: e8 ba c9 36 00 call 0x36c9df
25: fb sti
26: 4c 8b 65 c0 mov -0x40(%rbp),%r12
* 2a: 49 8d bc 24 58 16 00 lea 0x1658(%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