==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0xfcd/0x1190 drivers/hid/hid-mcp2221.c:854
Read of size 1 at addr ffff888053af3fff by task kworker/1:7/5942
CPU: 1 UID: 0 PID: 5942 Comm: kworker/1:7 Not tainted 6.16.0-rc3-syzkaller-00329-gdfba48a70cb6 #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Workqueue: events nsim_dev_hwstats_traffic_work
Call Trace:
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:408 [inline]
print_report+0xd2/0x2b0 mm/kasan/report.c:521
kasan_report+0x118/0x150 mm/kasan/report.c:634
mcp2221_raw_event+0xfcd/0x1190 drivers/hid/hid-mcp2221.c:854
__hid_input_report drivers/hid/hid-core.c:2117 [inline]
hid_input_report+0x40a/0x520 drivers/hid/hid-core.c:2144
hid_irq_in+0x47e/0x6d0 drivers/hid/usbhid/hid-core.c:286
__usb_hcd_giveback_urb+0x41a/0x690 drivers/usb/core/hcd.c:1650
dummy_timer+0x862/0x4550 drivers/usb/gadget/udc/dummy_hcd.c:1995
__run_hrtimer kernel/time/hrtimer.c:1761 [inline]
__hrtimer_run_queues+0x52c/0xc60 kernel/time/hrtimer.c:1825
hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1842
handle_softirqs+0x286/0x870 kernel/softirq.c:579
__do_softirq kernel/softirq.c:613 [inline]
invoke_softirq kernel/softirq.c:453 [inline]
__irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:680
irq_exit_rcu+0x9/0x30 kernel/softirq.c:696
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1050
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:160 [inline]
RIP: 0010:_raw_spin_unlock_irq+0x29/0x50 kernel/locking/spinlock.c:202
Code: 90 f3 0f 1e fa 53 48 89 fb 48 83 c7 18 48 8b 74 24 08 e8 aa ac 34 f6 48 89 df e8 02 44 35 f6 e8 8d 54 5e f6 fb bf 01 00 00 00 32 3e 27 f6 65 8b 05 1b 7a 33 07 85 c0 74 07 5b e9 ec ba a6 f5
RSP: 0018:ffffc9000217fa70 EFLAGS: 00000282
RAX: d39f4a53bc57a700 RBX: ffff8880b8739700 RCX: d39f4a53bc57a700
RDX: 0000000000000000 RSI: ffffffff8d982071 RDI: 0000000000000001
RBP: ffffc9000217fc70 R08: ffffffff8fa104f7 R09: 1ffffffff1f4209e
R10: dffffc0000000000 R11: fffffbfff1f4209f R12: ffff8880b8739700
R13: ffff888056712520 R14: dffffc0000000000 R15: 0000000001800000
process_one_work kernel/workqueue.c:3207 [inline]
process_scheduled_works+0x8ce/0x17b0 kernel/workqueue.c:3321
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402
kthread+0x711/0x8a0 kernel/kthread.c:464
ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Allocated by task 66:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:377 [inline]
__kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:394
kasan_kmalloc include/linux/kasan.h:260 [inline]
__kmalloc_cache_noprof+0x230/0x3d0 mm/slub.c:4359
kmalloc_noprof include/linux/slab.h:905 [inline]
kzalloc_noprof include/linux/slab.h:1039 [inline]
mca_alloc net/ipv6/mcast.c:884 [inline]
__ipv6_dev_mc_inc+0x420/0xaf0 net/ipv6/mcast.c:975
addrconf_join_solict net/ipv6/addrconf.c:2242 [inline]
addrconf_dad_begin net/ipv6/addrconf.c:4103 [inline]
addrconf_dad_work+0x3d0/0x14b0 net/ipv6/addrconf.c:4231
process_one_work kernel/workqueue.c:3238 [inline]
process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3321
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402
kthread+0x711/0x8a0 kernel/kthread.c:464
ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
The buggy address belongs to the object at ffff888053af3c00
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 735 bytes to the right of
allocated 288-byte region [ffff888053af3c00, ffff888053af3d20)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x53af0
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 ffff88801a441c80 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88801a441c80 dead000000000122 0000000000000000
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea00014ebc01 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 66, tgid 66 (kworker/u8:5), ts 99153853705, free_ts 27347925652
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1704
prep_new_page mm/page_alloc.c:1712 [inline]
get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3669
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4959
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2419
alloc_slab_page mm/slub.c:2451 [inline]
allocate_slab+0x8a/0x3b0 mm/slub.c:2619
new_slab mm/slub.c:2673 [inline]
___slab_alloc+0xbfc/0x1480 mm/slub.c:3859
__slab_alloc mm/slub.c:3949 [inline]
__slab_alloc_node mm/slub.c:4024 [inline]
slab_alloc_node mm/slub.c:4185 [inline]
__kmalloc_cache_noprof+0x296/0x3d0 mm/slub.c:4354
kmalloc_noprof include/linux/slab.h:905 [inline]
kzalloc_noprof include/linux/slab.h:1039 [inline]
mca_alloc net/ipv6/mcast.c:884 [inline]
__ipv6_dev_mc_inc+0x420/0xaf0 net/ipv6/mcast.c:975
addrconf_join_solict net/ipv6/addrconf.c:2242 [inline]
addrconf_dad_begin net/ipv6/addrconf.c:4103 [inline]
addrconf_dad_work+0x3d0/0x14b0 net/ipv6/addrconf.c:4231
process_one_work kernel/workqueue.c:3238 [inline]
process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3321
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402
kthread+0x711/0x8a0 kernel/kthread.c:464
ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148
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:1248 [inline]
__free_frozen_pages+0xc71/0xe70 mm/page_alloc.c:2706
__free_pages mm/page_alloc.c:5071 [inline]
free_contig_range+0x1bd/0x4a0 mm/page_alloc.c:6927
destroy_args+0x7e/0x5d0 mm/debug_vm_pgtable.c:1009
debug_vm_pgtable+0x412/0x450 mm/debug_vm_pgtable.c:1389
do_one_initcall+0x236/0x820 init/main.c:1274
do_initcall_level+0x137/0x1f0 init/main.c:1336
do_initcalls+0x69/0xd0 init/main.c:1352
kernel_init_freeable+0x3d9/0x570 init/main.c:1584
kernel_init+0x1d/0x1d0 init/main.c:1474
ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Memory state around the buggy address:
ffff888053af3e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888053af3f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888053af3f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff888053af4000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888053af4080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: 90 nop
1: f3 0f 1e fa endbr64
5: 53 push %rbx
6: 48 89 fb mov %rdi,%rbx
9: 48 83 c7 18 add $0x18,%rdi
d: 48 8b 74 24 08 mov 0x8(%rsp),%rsi
12: e8 aa ac 34 f6 call 0xf634acc1
17: 48 89 df mov %rbx,%rdi
1a: e8 02 44 35 f6 call 0xf6354421
1f: e8 8d 54 5e f6 call 0xf65e54b1
24: fb sti
25: bf 01 00 00 00 mov $0x1,%edi
* 2a: e8 32 3e 27 f6 call 0xf6273e61 <-- trapping instruction
2f: 65 8b 05 1b 7a 33 07 mov %gs:0x7337a1b(%rip),%eax # 0x7337a51
36: 85 c0 test %eax,%eax
38: 74 07 je 0x41
3a: 5b pop %rbx
3b: e9 ec ba a6 f5 jmp 0xf5a6bb2c