==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948
Read of size 1 at addr ffff8881220b7fff by task syz.3.5549/27962
CPU: 1 UID: 0 PID: 27962 Comm: syz.3.5549 Not tainted syzkaller #0 PREEMPT(voluntary)
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+0x208/0x8d0 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0xfa/0x160 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+0x90/0xb0 arch/x86/kernel/apic/apic.c:1052
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:debug_lockdep_rcu_enabled+0x0/0x40 kernel/rcu/update.c:319
Code: 00 00 00 eb b6 e8 30 fa ff ff eb b6 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1e fa 8b 05 5e 2d 5c 03 85 c0 74 20 8b 05 f0 38 5c 03 85 c0
RSP: 0018:ffffc900130dfa08 EFLAGS: 00000293
RAX: 0000000000000000 RBX: ffffc900130dfbb8 RCX: ffffffff8170cf3c
RDX: ffff888116fe8000 RSI: ffffffff8170cfe8 RDI: 0000000000000005
RBP: 00000000ffffffff R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000001 R12: ffffc900130dfbc8
R13: 0000000000000001 R14: ffff888132ffe000 R15: 0000000000000000
rcu_read_lock_held_common kernel/rcu/update.c:105 [inline]
rcu_read_lock_held+0x9/0x50 kernel/rcu/update.c:349
__futex_hash_private kernel/futex/core.c:190 [inline]
__futex_hash+0x6ed/0x860 kernel/futex/core.c:423
futex_hash+0x44/0x380 kernel/futex/core.c:309
class_hb_constructor kernel/futex/futex.h:240 [inline]
futex_wait_setup+0xda/0x550 kernel/futex/waitwake.c:623
__futex_wait+0x193/0x2f0 kernel/futex/waitwake.c:682
futex_wait+0xe8/0x380 kernel/futex/waitwake.c:715
do_futex+0x229/0x350 kernel/futex/syscalls.c:130
__do_sys_futex kernel/futex/syscalls.c:207 [inline]
__se_sys_futex kernel/futex/syscalls.c:188 [inline]
__x64_sys_futex+0x1e0/0x4c0 kernel/futex/syscalls.c:188
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4d0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f3cb910f749
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe14117fe8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: ffffffffffffffda RBX: 000000000028b388 RCX: 00007f3cb910f749
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f3cb9365fac
RBP: 000000000000015e R08: 00007f3cb8f78000 R09: 00000006141182df
R10: 00007ffe141180e0 R11: 0000000000000246 R12: 00007f3cb9365fac
R13: 00007ffe141180e0 R14: 000000000028b4e6 R15: 00007ffe14118100
Allocated by task 27176:
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+0x8f/0xa0 mm/kasan/common.c:417
kmalloc_noprof include/linux/slab.h:957 [inline]
kzalloc_noprof include/linux/slab.h:1094 [inline]
kernfs_fop_open+0x244/0xda0 fs/kernfs/file.c:641
do_dentry_open+0x6da/0x13a0 fs/open.c:965
vfs_open+0x82/0x3f0 fs/open.c:1097
do_open fs/namei.c:3975 [inline]
path_openat+0x1de4/0x2cb0 fs/namei.c:4134
do_filp_open+0x20b/0x470 fs/namei.c:4161
do_sys_openat2+0x11b/0x1d0 fs/open.c:1437
do_sys_open fs/open.c:1452 [inline]
__do_sys_openat fs/open.c:1468 [inline]
__se_sys_openat fs/open.c:1463 [inline]
__x64_sys_openat+0x174/0x210 fs/open.c:1463
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4d0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 27176:
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+0x43/0x70 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+0x288/0x670 mm/slub.c:6837
kernfs_fop_release+0x12c/0x1e0 fs/kernfs/file.c:786
__fput+0x402/0xb70 fs/file_table.c:468
fput_close_sync+0x118/0x210 fs/file_table.c:573
__do_sys_close fs/open.c:1589 [inline]
__se_sys_close fs/open.c:1574 [inline]
__x64_sys_close+0x8b/0x120 fs/open.c:1574
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4d0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff8881220b7c00
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 [ffff8881220b7c00, ffff8881220b7e00)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1220b4
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0x200000000000040(head|node=0|zone=2)
page_type: f5(slab)
raw: 0200000000000040 ffff888100041c80 0000000000000000 dead000000000001
raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 0200000000000040 ffff888100041c80 0000000000000000 dead000000000001
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 0200000000000002 ffffea0004882d01 00000000ffffffff 00000000ffffffff
head: 0000000000000000 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 2855, tgid 2855 (udevd), ts 22365012902, free_ts 0
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+0x1003/0x2dc0 mm/page_alloc.c:3884
__alloc_frozen_pages_noprof+0x259/0x21f0 mm/page_alloc.c:5183
alloc_pages_mpol+0xe4/0x410 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+0xdb7/0x1a70 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]
__kmalloc_cache_noprof+0x3c8/0x750 mm/slub.c:5758
kmalloc_noprof include/linux/slab.h:957 [inline]
kzalloc_noprof include/linux/slab.h:1094 [inline]
kernfs_fop_open+0x244/0xda0 fs/kernfs/file.c:641
do_dentry_open+0x6da/0x13a0 fs/open.c:965
vfs_open+0x82/0x3f0 fs/open.c:1097
do_open fs/namei.c:3975 [inline]
path_openat+0x1de4/0x2cb0 fs/namei.c:4134
do_filp_open+0x20b/0x470 fs/namei.c:4161
do_sys_openat2+0x11b/0x1d0 fs/open.c:1437
do_sys_open fs/open.c:1452 [inline]
__do_sys_openat fs/open.c:1468 [inline]
__se_sys_openat fs/open.c:1463 [inline]
__x64_sys_openat+0x174/0x210 fs/open.c:1463
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4d0 arch/x86/entry/syscall_64.c:94
page_owner free stack trace missing
Memory state around the buggy address:
ffff8881220b7e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8881220b7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8881220b7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff8881220b8000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8881220b8080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess), 1 bytes skipped:
0: 00 00 add %al,(%rax)
2: eb b6 jmp 0xffffffba
4: e8 30 fa ff ff call 0xfffffa39
9: eb b6 jmp 0xffffffc1
b: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1)
12: 00 00 00
15: 0f 1f 40 00 nopl 0x0(%rax)
19: 90 nop
1a: 90 nop
1b: 90 nop
1c: 90 nop
1d: 90 nop
1e: 90 nop
1f: 90 nop
20: 90 nop
21: 90 nop
22: 90 nop
23: 90 nop
24: 90 nop
25: 90 nop
26: 90 nop
27: 90 nop
28: 90 nop
* 29: f3 0f 1e fa endbr64 <-- trapping instruction
2d: 8b 05 5e 2d 5c 03 mov 0x35c2d5e(%rip),%eax # 0x35c2d91
33: 85 c0 test %eax,%eax
35: 74 20 je 0x57
37: 8b 05 f0 38 5c 03 mov 0x35c38f0(%rip),%eax # 0x35c392d
3d: 85 c0 test %eax,%eax