==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x10b0/0x12a0 drivers/hid/hid-mcp2221.c:964
Read of size 1 at addr ffff888040de7fff by task syz.5.5497/26488
CPU: 0 UID: 0 PID: 26488 Comm: syz.5.5497 Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
Call Trace:
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_address_description+0x55/0x1e0 mm/kasan/report.c:378
print_report+0x58/0x70 mm/kasan/report.c:482
kasan_report+0x117/0x150 mm/kasan/report.c:595
mcp2221_raw_event+0x10b0/0x12a0 drivers/hid/hid-mcp2221.c:964
__hid_input_report+0x41c/0x580 drivers/hid/hid-core.c:2168
hid_irq_in+0x492/0x710 drivers/hid/usbhid/hid-core.c:287
__usb_hcd_giveback_urb+0x374/0x530 drivers/usb/core/hcd.c:1657
dummy_timer+0xac3/0x4b40 drivers/usb/gadget/udc/dummy_hcd.c:2005
__run_hrtimer kernel/time/hrtimer.c:2032 [inline]
__hrtimer_run_queues+0x3bc/0xa10 kernel/time/hrtimer.c:2096
hrtimer_run_softirq+0x17a/0x240 kernel/time/hrtimer.c:2113
handle_softirqs+0x225/0x840 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0xca/0x220 kernel/softirq.c:735
irq_exit_rcu+0x9/0x30 kernel/softirq.c:752
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:179 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x47/0x80 kernel/locking/spinlock.c:198
Code: f7 e8 ad fc cf f5 f7 c3 00 02 00 00 74 05 e8 a0 de fb f5 9c 58 a9 00 02 00 00 75 27 f7 c3 00 02 00 00 74 01 fb bf 01 00 00 00 b4 12 c1 f5 65 8b 05 ad 12 9a 07 85 c0 74 18 5b 41 5e e9 91 48
RSP: 0018:ffffc90010f1f630 EFLAGS: 00000206
RAX: 0000000000000006 RBX: 0000000000000a06 RCX: 0000000080000001
RDX: 0000000000000006 RSI: ffffffff8e22bab2 RDI: 0000000000000001
RBP: 0000000000000a06 R08: ffffffff90578af7 R09: 1ffffffff20af15e
R10: dffffc0000000000 R11: fffffbfff20af15f R12: dffffc0000000000
R13: ffff8880795f9200 R14: ffff8880795f9200 R15: ffff88807b640c80
spin_unlock_irqrestore include/linux/spinlock.h:408 [inline]
__skb_try_recv_datagram+0x180/0x4e0 net/core/datagram.c:267
__unix_dgram_recvmsg+0x2e4/0xd70 net/unix/af_unix.c:2582
sock_recvmsg_nosec+0x130/0x170 net/socket.c:1126
____sys_recvmsg+0x3e3/0x4a0 net/socket.c:2902
___sys_recvmsg+0x213/0x5a0 net/socket.c:2946
do_recvmmsg+0x31a/0x7f0 net/socket.c:3041
__sys_recvmmsg net/socket.c:3115 [inline]
__do_sys_recvmmsg net/socket.c:3138 [inline]
__se_sys_recvmmsg net/socket.c:3131 [inline]
__x64_sys_recvmmsg+0x198/0x250 net/socket.c:3131
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f6a31f9de99
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f6a32dd3028 EFLAGS: 00000246 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 00007f6a32226180 RCX: 00007f6a31f9de99
RDX: 0000000000010106 RSI: 00002000000000c0 RDI: 000000000000000a
RBP: 00007f6a32033eaf R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f6a32226218 R14: 00007f6a32226180 R15: 00007f6a3234fa48
Allocated by task 26378:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
__kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415
kasan_kmalloc include/linux/kasan.h:263 [inline]
__kmalloc_cache_noprof+0x32d/0x660 mm/slub.c:5515
_kmalloc_noprof include/linux/slab.h:969 [inline]
_kzalloc_noprof include/linux/slab.h:1290 [inline]
genradix_alloc_node include/linux/generic-radix-tree.h:101 [inline]
__genradix_ptr_alloc+0x352/0x4a0 lib/generic-radix-tree.c:69
__genradix_prealloc+0x44/0x90 lib/generic-radix-tree.c:216
sctp_stream_alloc_out net/sctp/stream.c:104 [inline]
sctp_stream_init+0x11e/0x3f0 net/sctp/stream.c:149
sctp_association_init net/sctp/associola.c:232 [inline]
sctp_association_new+0x10be/0x25d0 net/sctp/associola.c:296
sctp_connect_new_asoc+0x2e4/0x6b0 net/sctp/socket.c:1092
__sctp_connect+0x5cb/0xdc0 net/sctp/socket.c:1198
sctp_getsockopt_connectx3+0x227/0x360 net/sctp/socket.c:1422
sctp_getsockopt+0x984/0xb90 net/sctp/socket.c:8200
do_sock_getsockopt+0x51d/0x7e0 net/socket.c:2474
__sys_getsockopt net/socket.c:2505 [inline]
__do_sys_getsockopt net/socket.c:2512 [inline]
__se_sys_getsockopt net/socket.c:2509 [inline]
__x64_sys_getsockopt+0x1a4/0x240 net/socket.c:2509
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 26378:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:253 [inline]
__kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2705 [inline]
slab_free mm/slub.c:6405 [inline]
kfree+0x1c5/0x640 mm/slub.c:6720
genradix_free_recurse+0x5d/0xa0 lib/generic-radix-tree.c:204
genradix_free_recurse+0x5d/0xa0 lib/generic-radix-tree.c:204
sctp_stream_free+0x262/0x2a0 net/sctp/stream.c:191
sctp_association_free+0x26d/0x7f0 net/sctp/associola.c:351
__sctp_connect+0xae6/0xdc0 net/sctp/socket.c:1253
sctp_getsockopt_connectx3+0x227/0x360 net/sctp/socket.c:1422
sctp_getsockopt+0x984/0xb90 net/sctp/socket.c:8200
do_sock_getsockopt+0x51d/0x7e0 net/socket.c:2474
__sys_getsockopt net/socket.c:2505 [inline]
__do_sys_getsockopt net/socket.c:2512 [inline]
__se_sys_getsockopt net/socket.c:2509 [inline]
__x64_sys_getsockopt+0x1a4/0x240 net/socket.c:2509
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff888040de7c00
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 [ffff888040de7c00, ffff888040de7e00)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x40de4
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 ffff88801b004c80 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88801b004c80 dead000000000100 dead000000000122
head: 0000000000000000 0000000800100010 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffffffffffff01 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 26378, tgid 26377 (syz.2.5471), ts 1261550590671, free_ts 1186645045699
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1859
prep_new_page mm/page_alloc.c:1867 [inline]
get_page_from_freelist+0x21fa/0x2270 mm/page_alloc.c:3946
__alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5304
alloc_slab_page mm/slub.c:3294 [inline]
allocate_slab+0x79/0x5e0 mm/slub.c:3408
new_slab mm/slub.c:3454 [inline]
refill_objects+0x2d5/0x350 mm/slub.c:7338
refill_sheaf mm/slub.c:2832 [inline]
__pcs_replace_empty_main+0x2bf/0x6b0 mm/slub.c:4703
alloc_from_pcs mm/slub.c:4801 [inline]
slab_alloc_node mm/slub.c:4933 [inline]
__kmalloc_cache_noprof+0x3a7/0x660 mm/slub.c:5511
_kmalloc_noprof include/linux/slab.h:969 [inline]
_kzalloc_noprof include/linux/slab.h:1290 [inline]
genradix_alloc_node include/linux/generic-radix-tree.h:101 [inline]
__genradix_ptr_alloc+0x352/0x4a0 lib/generic-radix-tree.c:69
__genradix_prealloc+0x44/0x90 lib/generic-radix-tree.c:216
sctp_stream_alloc_out net/sctp/stream.c:104 [inline]
sctp_stream_init+0x11e/0x3f0 net/sctp/stream.c:149
sctp_association_init net/sctp/associola.c:232 [inline]
sctp_association_new+0x10be/0x25d0 net/sctp/associola.c:296
sctp_connect_new_asoc+0x2e4/0x6b0 net/sctp/socket.c:1092
__sctp_connect+0x5cb/0xdc0 net/sctp/socket.c:1198
sctp_getsockopt_connectx3+0x227/0x360 net/sctp/socket.c:1422
sctp_getsockopt+0x984/0xb90 net/sctp/socket.c:8200
do_sock_getsockopt+0x51d/0x7e0 net/socket.c:2474
page last free pid 15 tgid 15 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1406 [inline]
__free_frozen_pages+0xc1e/0xd10 mm/page_alloc.c:2950
__tlb_remove_table_free mm/mmu_gather.c:228 [inline]
tlb_remove_table_rcu+0x85/0x100 mm/mmu_gather.c:291
rcu_do_batch kernel/rcu/tree.c:2645 [inline]
rcu_core+0x78b/0x10a0 kernel/rcu/tree.c:2897
handle_softirqs+0x225/0x840 kernel/softirq.c:622
run_ksoftirqd+0x36/0x60 kernel/softirq.c:1076
smpboot_thread_fn+0x57c/0xa80 kernel/smpboot.c:160
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 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:
ffff888040de7e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888040de7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888040de7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff888040de8000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888040de8080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: f7 e8 imul %eax
2: ad lods %ds:(%rsi),%eax
3: fc cld
4: cf iret
5: f5 cmc
6: f7 c3 00 02 00 00 test $0x200,%ebx
c: 74 05 je 0x13
e: e8 a0 de fb f5 call 0xf5fbdeb3
13: 9c pushf
14: 58 pop %rax
15: a9 00 02 00 00 test $0x200,%eax
1a: 75 27 jne 0x43
1c: f7 c3 00 02 00 00 test $0x200,%ebx
22: 74 01 je 0x25
24: fb sti
25: bf 01 00 00 00 mov $0x1,%edi
* 2a: e8 b4 12 c1 f5 call 0xf5c112e3 <-- trapping instruction
2f: 65 8b 05 ad 12 9a 07 mov %gs:0x79a12ad(%rip),%eax # 0x79a12e3
36: 85 c0 test %eax,%eax
38: 74 18 je 0x52
3a: 5b pop %rbx
3b: 41 5e pop %r14
3d: e9 .byte 0xe9
3e: 91 xchg %eax,%ecx
3f: 48 rex.W