==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948
Read of size 1 at addr ffff888137a87fff by task syz.3.1611/11262
CPU: 0 UID: 0 PID: 11262 Comm: syz.3.1611 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:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x31/0x80 kernel/locking/spinlock.c:194
Code: f5 53 48 8b 74 24 10 48 89 fb 48 83 c7 18 e8 36 e2 13 fa 48 89 df e8 1e 36 14 fa f7 c5 00 02 00 00 75 23 9c 58 f6 c4 02 75 37 01 00 00 00 e8 85 91 07 fa 65 8b 05 de ef 50 05 85 c0 74 16 5b
RSP: 0018:ffffc90015107c38 EFLAGS: 00000246
RAX: 0000000000000002 RBX: ffffffff93b46600 RCX: ffffffff81865eaf
RDX: 0000000000000000 RSI: ffffffff88c87b1c RDI: ffffffff878978c0
RBP: 0000000000000206 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff8aa0e2d7 R11: 0000000000000001 R12: 1ffff92002a20f8e
R13: ffffc90015107d78 R14: 0000000000000000 R15: ffffffff93b46600
__debug_object_init+0x2de/0x3d0 lib/debugobjects.c:755
debug_hrtimer_init_on_stack kernel/time/hrtimer.c:432 [inline]
debug_setup_on_stack kernel/time/hrtimer.c:470 [inline]
hrtimer_setup_sleeper_on_stack kernel/time/hrtimer.c:2083 [inline]
hrtimer_nanosleep+0xa0/0x380 kernel/time/hrtimer.c:2161
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/0x4d0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f1a39051885
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:00007f1a37a85f60 EFLAGS: 00000293 ORIG_RAX: 00000000000000e6
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f1a39051885
RDX: 00007f1a37a85fa0 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000293 R12: 0000200000000040
R13: 0000000000000000 R14: 00007f1a39275fa0 R15: 00007ffcc9a9bb08
Allocated by task 5886:
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 5886:
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:2523 [inline]
slab_free mm/slub.c:6611 [inline]
kfree+0x288/0x670 mm/slub.c:6818
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 ffff888137a87c00
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 [ffff888137a87c00, ffff888137a87e00)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888137a85400 pfn:0x137a84
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x200000000000240(workingset|head|node=0|zone=2)
page_type: f5(slab)
raw: 0200000000000240 ffff888100041c80 ffffea000428dd10 ffffea0004d06c10
raw: ffff888137a85400 000000000010000f 00000000f5000000 0000000000000000
head: 0200000000000240 ffff888100041c80 ffffea000428dd10 ffffea0004d06c10
head: ffff888137a85400 000000000010000f 00000000f5000000 0000000000000000
head: 0200000000000002 ffffea0004dea101 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 5192, tgid 5192 (udevd), ts 83869963983, 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:3039 [inline]
allocate_slab mm/slub.c:3212 [inline]
new_slab+0x24a/0x360 mm/slub.c:3266
___slab_alloc+0xdb7/0x1a70 mm/slub.c:4636
__slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4755
__slab_alloc_node mm/slub.c:4831 [inline]
slab_alloc_node mm/slub.c:5253 [inline]
__kmalloc_cache_noprof+0x3c8/0x750 mm/slub.c:5743
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:
ffff888137a87e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888137a87f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888137a87f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff888137a88000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888137a88080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: f5 cmc
1: 53 push %rbx
2: 48 8b 74 24 10 mov 0x10(%rsp),%rsi
7: 48 89 fb mov %rdi,%rbx
a: 48 83 c7 18 add $0x18,%rdi
e: e8 36 e2 13 fa call 0xfa13e249
13: 48 89 df mov %rbx,%rdi
16: e8 1e 36 14 fa call 0xfa143639
1b: f7 c5 00 02 00 00 test $0x200,%ebp
21: 75 23 jne 0x46
23: 9c pushf
24: 58 pop %rax
25: f6 c4 02 test $0x2,%ah
28: 75 37 jne 0x61
* 2a: bf 01 00 00 00 mov $0x1,%edi <-- trapping instruction
2f: e8 85 91 07 fa call 0xfa0791b9
34: 65 8b 05 de ef 50 05 mov %gs:0x550efde(%rip),%eax # 0x550f019
3b: 85 c0 test %eax,%eax
3d: 74 16 je 0x55
3f: 5b pop %rbx