==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948
Read of size 1 at addr ffff88807775ffff by task syz-executor/5806
CPU: 1 UID: 0 PID: 5806 Comm: syz-executor 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 39 ef f7 0e 45 85 c0 0f 85 be 01 00 00 4c 89 e7 e8 a4 f6 ff ff e8 0f d5 3a 00 fb 65 48 8b 1d de 27 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:ffffc90003177a20 EFLAGS: 00000206
RAX: 00000000000c02c9 RBX: ffff88802657a480 RCX: ffffffff81c50c3f
RDX: 0000000000000000 RSI: ffffffff8da2a287 RDI: ffffffff8bf06e40
RBP: ffffc90003177a68 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff9081f6d7 R11: 0000000000000001 R12: ffff8880b853a380
R13: ffff888020f74900 R14: ffff8880b843a380 R15: ffff8880b853b1b0
context_switch kernel/sched/core.c:5328 [inline]
__schedule+0x1198/0x5de0 kernel/sched/core.c:6929
__schedule_loop kernel/sched/core.c:7011 [inline]
schedule+0xe7/0x3a0 kernel/sched/core.c:7026
do_nanosleep+0x219/0x580 kernel/time/hrtimer.c:2116
hrtimer_nanosleep+0x155/0x380 kernel/time/hrtimer.c:2163
common_nsleep+0xa1/0xd0 kernel/time/posix-timers.c:1352
__do_sys_clock_nanosleep kernel/time/posix-timers.c:1398 [inline]
__se_sys_clock_nanosleep kernel/time/posix-timers.c:1375 [inline]
__x64_sys_clock_nanosleep+0x34d/0x4a0 kernel/time/posix-timers.c:1375
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:0x7f33e1bc1885
Code: 24 0c 89 3c 24 48 89 4c 24 18 e8 f6 54 ff ff 4c 8b 54 24 18 48 8b 54 24 10 41 89 c0 8b 74 24 0c 8b 3c 24 b8 e6 00 00 00 0f 05 <44> 89 c7 48 89 04 24 e8 4f 55 ff ff 48 8b 04 24 48 83 c4 28 f7 d8
RSP: 002b:00007ffd38d662b0 EFLAGS: 00000293 ORIG_RAX: 00000000000000e6
RAX: ffffffffffffffda RBX: 0000000000000145 RCX: 00007f33e1bc1885
RDX: 00007ffd38d662f0 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007ffd38d6635c R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000001388
R13: 00000000000927c0 R14: 000000000003b107 R15: 00007ffd38d663b0
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
kasan_kmalloc include/linux/kasan.h:262 [inline]
__do_kmalloc_node mm/slub.c:5642 [inline]
__kmalloc_noprof+0x32f/0x880 mm/slub.c:5654
kmalloc_noprof include/linux/slab.h:961 [inline]
kzalloc_noprof include/linux/slab.h:1094 [inline]
ieee802_11_parse_elems_full+0x1db/0x3780 net/mac80211/parse.c:1011
ieee802_11_parse_elems_crc net/mac80211/ieee80211_i.h:2470 [inline]
ieee802_11_parse_elems net/mac80211/ieee80211_i.h:2477 [inline]
ieee80211_inform_bss+0x10b/0x1140 net/mac80211/scan.c:79
rdev_inform_bss net/wireless/rdev-ops.h:418 [inline]
cfg80211_inform_single_bss_data+0x8ea/0x1df0 net/wireless/scan.c:2385
cfg80211_inform_bss_data+0x22b/0x3be0 net/wireless/scan.c:3240
cfg80211_inform_bss_frame_data+0x26f/0x750 net/wireless/scan.c:3331
ieee80211_bss_info_update+0x310/0xab0 net/mac80211/scan.c:226
ieee80211_rx_bss_info net/mac80211/ibss.c:1094 [inline]
ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1573 [inline]
ieee80211_ibss_rx_queued_mgmt+0x191b/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
ieee80211_inform_bss+0x77c/0x1140 net/mac80211/scan.c:160
rdev_inform_bss net/wireless/rdev-ops.h:418 [inline]
cfg80211_inform_single_bss_data+0x8ea/0x1df0 net/wireless/scan.c:2385
cfg80211_inform_bss_data+0x22b/0x3be0 net/wireless/scan.c:3240
cfg80211_inform_bss_frame_data+0x26f/0x750 net/wireless/scan.c:3331
ieee80211_bss_info_update+0x310/0xab0 net/mac80211/scan.c:226
ieee80211_rx_bss_info net/mac80211/ibss.c:1094 [inline]
ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1573 [inline]
ieee80211_ibss_rx_queued_mgmt+0x191b/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 ffff88807775f800
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 1023 bytes to the right of
allocated 1024-byte region [ffff88807775f800, ffff88807775fc00)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x77758
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 ffff88813ffa6dc0 ffffea0000a35a00 dead000000000002
raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88813ffa6dc0 ffffea0000a35a00 dead000000000002
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000003 ffffea0001ddd601 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 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5878, tgid 5878 (kworker/0:6), ts 76881944615, free_ts 76811960062
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]
neigh_alloc net/core/neighbour.c:522 [inline]
___neigh_create+0x14e6/0x28c0 net/core/neighbour.c:656
ip6_finish_output2+0x11aa/0x1cf0 net/ipv6/ip6_output.c:128
__ip6_finish_output+0x3cd/0x1010 net/ipv6/ip6_output.c:209
ip6_finish_output net/ipv6/ip6_output.c:220 [inline]
NF_HOOK_COND include/linux/netfilter.h:307 [inline]
ip6_output+0x253/0x710 net/ipv6/ip6_output.c:247
dst_output include/net/dst.h:464 [inline]
NF_HOOK include/linux/netfilter.h:318 [inline]
NF_HOOK include/linux/netfilter.h:312 [inline]
mld_sendpack+0xac1/0x1350 net/ipv6/mcast.c:1855
mld_send_cr net/ipv6/mcast.c:2154 [inline]
mld_ifc_work+0x740/0xbf0 net/ipv6/mcast.c:2693
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
page last free pid 5878 tgid 5878 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
discard_slab mm/slub.c:3326 [inline]
__put_partials+0x130/0x170 mm/slub.c:3872
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x4d/0x120 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:352
kasan_slab_alloc include/linux/kasan.h:252 [inline]
slab_post_alloc_hook mm/slub.c:4970 [inline]
slab_alloc_node mm/slub.c:5280 [inline]
kmem_cache_alloc_node_noprof+0x28a/0x770 mm/slub.c:5332
__alloc_skb+0x2b2/0x380 net/core/skbuff.c:660
alloc_skb include/linux/skbuff.h:1383 [inline]
mld_newpack.isra.0+0x18e/0xa20 net/ipv6/mcast.c:1775
add_grhead+0x299/0x340 net/ipv6/mcast.c:1886
add_grec+0x11b5/0x1720 net/ipv6/mcast.c:2025
mld_send_cr net/ipv6/mcast.c:2148 [inline]
mld_ifc_work+0x41f/0xbf0 net/ipv6/mcast.c:2693
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
Memory state around the buggy address:
ffff88807775fe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88807775ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88807775ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff888077760000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888077760080: 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 ef cmp %ebp,%edi
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 0f d5 3a 00 call 0x3ad530
21: fb sti
22: 65 48 8b 1d de 27 17 mov %gs:0x121727de(%rip),%rbx # 0x12172808
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