==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1062/0x1240 drivers/hid/hid-mcp2221.c:858
Read of size 1 at addr ffff88802f407fff by task syz.5.373/7213
CPU: 0 PID: 7213 Comm: syz.5.373 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Call Trace:
dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:364 [inline]
print_report+0xa8/0x210 mm/kasan/report.c:468
kasan_report+0x117/0x150 mm/kasan/report.c:581
mcp2221_raw_event+0x1062/0x1240 drivers/hid/hid-mcp2221.c:858
hid_input_report+0x400/0x510 drivers/hid/hid-core.c:2103
hid_irq_in+0x479/0x6d0 drivers/hid/usbhid/hid-core.c:284
__usb_hcd_giveback_urb+0x35f/0x520 drivers/usb/core/hcd.c:1650
dummy_timer+0x8de/0x3320 drivers/usb/gadget/udc/dummy_hcd.c:2003
__run_hrtimer kernel/time/hrtimer.c:1754 [inline]
__hrtimer_run_queues+0x520/0xc40 kernel/time/hrtimer.c:1818
hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1835
handle_softirqs+0x280/0x820 kernel/softirq.c:578
__do_softirq kernel/softirq.c:612 [inline]
invoke_softirq kernel/softirq.c:452 [inline]
__irq_exit_rcu+0xd3/0x190 kernel/softirq.c:661
irq_exit_rcu+0x9/0x20 kernel/softirq.c:673
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1088 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1088
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:687
RIP: 0010:finish_task_switch+0x26a/0x8f0 kernel/sched/core.c:5255
Code: 0f 84 33 01 00 00 48 85 db 0f 85 52 01 00 00 0f 1f 44 00 00 4c 8b 75 d0 4c 89 e7 e8 e0 94 34 09 e8 1b 2f 30 00 fb 4c 8b 65 c0 <49> 8d bc 24 f8 15 00 00 48 89 f8 48 c1 e8 03 42 0f b6 04 28 84 c0
RSP: 0018:ffffc900039e77d8 EFLAGS: 00000286
RAX: 4dc9b6d5c99f7c00 RBX: 0000000000000000 RCX: 4dc9b6d5c99f7c00
RDX: dffffc0000000000 RSI: ffffffff8acacbe0 RDI: ffffffff8b1c9c20
RBP: ffffc900039e7830 R08: ffffffff8e8b666f R09: 1ffffffff1d16ccd
R10: dffffc0000000000 R11: fffffbfff1d16cce R12: ffff88802bac1e00
R13: dffffc0000000000 R14: ffff88802bac3c00 R15: ffff8880b8e3cb48
context_switch kernel/sched/core.c:5384 [inline]
__schedule+0x155b/0x45a0 kernel/sched/core.c:6700
preempt_schedule_common+0x82/0xc0 kernel/sched/core.c:6867
preempt_schedule+0xc0/0xd0 kernel/sched/core.c:6891
preempt_schedule_thunk+0x1a/0x30 arch/x86/entry/thunk_64.S:45
class_preempt_destructor include/linux/preempt.h:478 [inline]
try_to_wake_up+0x781/0x1190 kernel/sched/core.c:4356
wake_up_process kernel/sched/core.c:4481 [inline]
wake_up_q+0xb6/0x100 kernel/sched/core.c:1032
futex_wake+0x42a/0x4f0 kernel/futex/waitwake.c:184
do_futex+0x35d/0x3e0 kernel/futex/syscalls.c:139
__do_sys_futex kernel/futex/syscalls.c:211 [inline]
__se_sys_futex+0x3a9/0x440 kernel/futex/syscalls.c:192
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f367519ce59
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:00007fff2043cc08 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f367519ce59
RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007f3675415fa8
RBP: 0000000000001e4a R08: 000000000000001b R09: 0000000000000000
R10: 00007f3675415fa0 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f3675415fac R14: 00007f3675415fa8 R15: 00007f3675415fa0
Allocated by task 6057:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4e/0x70 mm/kasan/common.c:53
____kasan_kmalloc mm/kasan/common.c:375 [inline]
__kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:384
kasan_kmalloc include/linux/kasan.h:198 [inline]
__do_kmalloc_node mm/slab_common.c:1007 [inline]
__kmalloc_node+0xb4/0x230 mm/slab_common.c:1014
kmalloc_node include/linux/slab.h:620 [inline]
kvmalloc_node+0x70/0x180 mm/util.c:617
kvmalloc include/linux/slab.h:738 [inline]
kvzalloc include/linux/slab.h:746 [inline]
netif_alloc_netdev_queues net/core/dev.c:10130 [inline]
alloc_netdev_mqs+0x8cd/0x1040 net/core/dev.c:10929
nsim_create+0x7a/0x4a0 drivers/net/netdevsim/netdev.c:385
__nsim_dev_port_add+0x708/0xb20 drivers/net/netdevsim/dev.c:1393
nsim_dev_port_add_all+0x35/0xe0 drivers/net/netdevsim/dev.c:1449
nsim_drv_probe+0x8c5/0xbb0 drivers/net/netdevsim/dev.c:1608
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x25b/0xb20 drivers/base/dd.c:718
__driver_probe_device+0x1ef/0x390 drivers/base/dd.c:880
driver_probe_device+0x4f/0x420 drivers/base/dd.c:910
__device_attach_driver+0x2ca/0x510 drivers/base/dd.c:1038
bus_for_each_drv+0x252/0x2e0 drivers/base/bus.c:459
__device_attach+0x2c2/0x420 drivers/base/dd.c:1110
bus_probe_device+0x180/0x260 drivers/base/bus.c:573
device_add+0x88e/0xc50 drivers/base/core.c:3700
nsim_bus_dev_new drivers/net/netdevsim/bus.c:290 [inline]
new_device_store+0x37c/0x690 drivers/net/netdevsim/bus.c:167
kernfs_fop_write_iter+0x3b6/0x520 fs/kernfs/file.c:352
call_write_iter include/linux/fs.h:2018 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x46c/0x990 fs/read_write.c:584
ksys_write+0x150/0x260 fs/read_write.c:637
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
The buggy address belongs to the object at ffff88802f407c00
which belongs to the cache kmalloc-cg-512 of size 512
The buggy address is located 575 bytes to the right of
allocated 448-byte region [ffff88802f407c00, ffff88802f407dc0)
The buggy address belongs to the physical page:
page:ffffea0000bd0100 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2f404
head:ffffea0000bd0100 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff88802484d501
flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888017c4f140 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000100010 00000001ffffffff ffff88802484d501
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 5143, tgid 5143 (udevd), ts 49130294114, free_ts 45210055821
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x1c1/0x200 mm/page_alloc.c:1581
prep_new_page mm/page_alloc.c:1588 [inline]
get_page_from_freelist+0x1951/0x19e0 mm/page_alloc.c:3220
__alloc_pages+0x1f0/0x460 mm/page_alloc.c:4500
alloc_slab_page+0x5d/0x160 mm/slub.c:1881
allocate_slab mm/slub.c:2028 [inline]
new_slab+0x87/0x2d0 mm/slub.c:2081
___slab_alloc+0xc5d/0x12f0 mm/slub.c:3253
__slab_alloc mm/slub.c:3339 [inline]
__slab_alloc_node mm/slub.c:3392 [inline]
slab_alloc_node mm/slub.c:3485 [inline]
__kmem_cache_alloc_node+0x19e/0x250 mm/slub.c:3534
__do_kmalloc_node mm/slab_common.c:1006 [inline]
__kmalloc_node_track_caller+0xa2/0x230 mm/slab_common.c:1027
kmalloc_reserve+0x116/0x240 net/core/skbuff.c:584
__alloc_skb+0x138/0x2c0 net/core/skbuff.c:653
alloc_skb include/linux/skbuff.h:1316 [inline]
alloc_skb_with_frags+0xca/0x7b0 net/core/skbuff.c:6340
sock_alloc_send_pskb+0x883/0x9a0 net/core/sock.c:2821
unix_dgram_sendmsg+0x5a2/0x16d0 net/unix/af_unix.c:2003
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg net/socket.c:745 [inline]
sock_write_iter+0x2df/0x420 net/socket.c:1160
call_write_iter include/linux/fs.h:2018 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x46c/0x990 fs/read_write.c:584
ksys_write+0x150/0x260 fs/read_write.c:637
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1181 [inline]
free_unref_page_prepare+0x7b2/0x8c0 mm/page_alloc.c:2365
free_unref_page+0x32/0x2e0 mm/page_alloc.c:2458
__slab_free+0x35a/0x400 mm/slub.c:3736
qlink_free mm/kasan/quarantine.c:166 [inline]
qlist_free_all+0x75/0xd0 mm/kasan/quarantine.c:185
kasan_quarantine_reduce+0x143/0x160 mm/kasan/quarantine.c:292
__kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:306
kasan_slab_alloc include/linux/kasan.h:188 [inline]
slab_post_alloc_hook+0x6e/0x4b0 mm/slab.h:767
slab_alloc_node mm/slub.c:3495 [inline]
slab_alloc mm/slub.c:3503 [inline]
__kmem_cache_alloc_lru mm/slub.c:3510 [inline]
kmem_cache_alloc+0x11a/0x2d0 mm/slub.c:3519
getname_flags+0xbb/0x500 fs/namei.c:140
do_sys_openat2+0xda/0x1d0 fs/open.c:1415
do_sys_open fs/open.c:1436 [inline]
__do_sys_openat fs/open.c:1452 [inline]
__se_sys_openat fs/open.c:1447 [inline]
__x64_sys_openat+0x139/0x160 fs/open.c:1447
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
Memory state around the buggy address:
ffff88802f407e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88802f407f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88802f407f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff88802f408000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88802f408080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: 0f 84 33 01 00 00 je 0x139
6: 48 85 db test %rbx,%rbx
9: 0f 85 52 01 00 00 jne 0x161
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 e0 94 34 09 call 0x9349500
20: e8 1b 2f 30 00 call 0x302f40
25: fb sti
26: 4c 8b 65 c0 mov -0x40(%rbp),%r12
* 2a: 49 8d bc 24 f8 15 00 lea 0x15f8(%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