==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0xf94/0x1030 drivers/hid/hid-mcp2221.c:944
Read of size 1 at addr ffff88814e07ffff by task syz.4.3867/25338
CPU: 0 UID: 0 PID: 25338 Comm: syz.4.3867 Not tainted syzkaller #0 PREEMPT(voluntary)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/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+0xf94/0x1030 drivers/hid/hid-mcp2221.c:944
__hid_input_report.constprop.0+0x314/0x450 drivers/hid/hid-core.c:2130
hid_irq_in+0x35e/0x870 drivers/hid/usbhid/hid-core.c:286
__usb_hcd_giveback_urb+0x388/0x610 drivers/usb/core/hcd.c:1661
usb_hcd_giveback_urb+0x39b/0x450 drivers/usb/core/hcd.c:1745
dummy_timer+0x1814/0x3a30 drivers/usb/gadget/udc/dummy_hcd.c:1995
__run_hrtimer kernel/time/hrtimer.c:1761 [inline]
__hrtimer_run_queues+0x1ff/0xad0 kernel/time/hrtimer.c:1825
hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1842
handle_softirqs+0x208/0x8d0 kernel/softirq.c:579
__do_softirq kernel/softirq.c:613 [inline]
invoke_softirq kernel/softirq.c:453 [inline]
__irq_exit_rcu+0xfa/0x160 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+0x90/0xb0 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_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 96 9e 1a fa 48 89 df e8 7e f2 1a fa f7 c5 00 02 00 00 75 23 9c 58 f6 c4 02 75 37 01 00 00 00 e8 45 4c 0e fa 65 8b 05 2e 4e 52 05 85 c0 74 16 5b
RSP: 0018:ffffc9000524fc60 EFLAGS: 00000246
RAX: 0000000000000002 RBX: ffff8881f5827a40 RCX: ffffffff8185d28f
RDX: 0000000000000000 RSI: ffffffff88d25cfc RDI: ffffffff878963e0
RBP: 0000000000000246 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff8a9d49d7 R11: ffffffff93aa67b0 R12: dffffc0000000000
R13: ffffc9000524fdb8 R14: 0000000000000001 R15: ffff88811a89ba18
hrtimer_start_expires include/linux/hrtimer.h:277 [inline]
hrtimer_sleeper_start_expires kernel/time/hrtimer.c:2023 [inline]
do_nanosleep+0x1f7/0x570 kernel/time/hrtimer.c:2097
hrtimer_nanosleep+0x155/0x380 kernel/time/hrtimer.c:2147
common_nsleep+0xa1/0xd0 kernel/time/posix-timers.c:1353
__do_sys_clock_nanosleep kernel/time/posix-timers.c:1399 [inline]
__se_sys_clock_nanosleep kernel/time/posix-timers.c:1376 [inline]
__x64_sys_clock_nanosleep+0x34d/0x4a0 kernel/time/posix-timers.c:1376
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f2f785714a5
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:00007f2f76fa5f60 EFLAGS: 00000293 ORIG_RAX: 00000000000000e6
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f2f785714a5
RDX: 00007f2f76fa5fa0 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000293 R12: 0000200000000040
R13: 0000000000000000 R14: 00007f2f78775fa0 R15: 00007ffde4af7438
Allocated by task 14400:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:330 [inline]
__kasan_slab_alloc+0x6e/0x70 mm/kasan/common.c:356
kasan_slab_alloc include/linux/kasan.h:250 [inline]
slab_post_alloc_hook mm/slub.c:4180 [inline]
slab_alloc_node mm/slub.c:4229 [inline]
kmem_cache_alloc_noprof+0x14f/0x3b0 mm/slub.c:4236
kmem_alloc_batch+0x49/0x170 lib/debugobjects.c:371
fill_pool lib/debugobjects.c:403 [inline]
debug_objects_fill_pool lib/debugobjects.c:725 [inline]
debug_objects_fill_pool+0x23f/0x520 lib/debugobjects.c:697
debug_object_activate+0x10b/0x4c0 lib/debugobjects.c:814
debug_rcu_head_queue kernel/rcu/rcu.h:236 [inline]
__call_rcu_common.constprop.0+0x35/0xa10 kernel/rcu/tree.c:3108
slab_free_hook mm/slub.c:2381 [inline]
slab_free mm/slub.c:4680 [inline]
kmem_cache_free+0x14e/0x470 mm/slub.c:4782
exit_mmap+0x511/0xb90 mm/mmap.c:1305
__mmput kernel/fork.c:1130 [inline]
mmput+0xdb/0x430 kernel/fork.c:1152
exit_mm kernel/exit.c:582 [inline]
do_exit+0x7c7/0x2bf0 kernel/exit.c:949
do_group_exit+0xd3/0x2a0 kernel/exit.c:1102
__do_sys_exit_group kernel/exit.c:1113 [inline]
__se_sys_exit_group kernel/exit.c:1111 [inline]
__x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1111
x64_sys_call+0x14fa/0x1720 arch/x86/include/generated/asm/syscalls_64.h:232
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 13612:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:576
poison_slab_object mm/kasan/common.c:243 [inline]
__kasan_slab_free+0x3e/0x50 mm/kasan/common.c:275
kasan_slab_free include/linux/kasan.h:233 [inline]
slab_free_hook mm/slub.c:2417 [inline]
slab_free mm/slub.c:4680 [inline]
kmem_cache_free+0x2a0/0x470 mm/slub.c:4782
free_object_list.isra.0+0xf8/0x2a0 lib/debugobjects.c:326
free_obj_work+0x19f/0x3d0 lib/debugobjects.c:513
process_one_work+0x9cc/0x1b70 kernel/workqueue.c:3236
process_scheduled_works kernel/workqueue.c:3319 [inline]
worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400
kthread+0x3c5/0x780 kernel/kthread.c:463
ret_from_fork+0x5b6/0x6c0 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 ffff88814e07ffc0
which belongs to the cache debug_objects_cache of size 40
The buggy address is located 23 bytes to the right of
allocated 40-byte region [ffff88814e07ffc0, ffff88814e07ffe8)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88814e07f850 pfn:0x14e07f
flags: 0x200000000000200(workingset|node=0|zone=2)
page_type: f5(slab)
raw: 0200000000000200 ffff88810004b8c0 ffffea0005384510 ffffea0005378210
raw: ffff88814e07f850 0000000000490001 00000000f5000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x52020(__GFP_HIGH|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 14399, tgid 14399 (modprobe), ts 1055802946668, free_ts 1055800814678
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1851
prep_new_page mm/page_alloc.c:1859 [inline]
get_page_from_freelist+0xf98/0x2ce0 mm/page_alloc.c:3858
__alloc_frozen_pages_noprof+0x259/0x21e0 mm/page_alloc.c:5148
alloc_pages_mpol+0xe4/0x410 mm/mempolicy.c:2416
alloc_slab_page mm/slub.c:2487 [inline]
allocate_slab mm/slub.c:2655 [inline]
new_slab+0x247/0x330 mm/slub.c:2709
___slab_alloc+0xc78/0x1680 mm/slub.c:3891
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3981
__slab_alloc_node mm/slub.c:4056 [inline]
slab_alloc_node mm/slub.c:4217 [inline]
kmem_cache_alloc_noprof+0x1f9/0x3b0 mm/slub.c:4236
kmem_alloc_batch+0x49/0x170 lib/debugobjects.c:371
fill_pool lib/debugobjects.c:403 [inline]
debug_objects_fill_pool lib/debugobjects.c:725 [inline]
debug_objects_fill_pool+0x23f/0x520 lib/debugobjects.c:697
debug_object_activate+0x10b/0x4c0 lib/debugobjects.c:814
debug_rcu_head_queue kernel/rcu/rcu.h:236 [inline]
__call_rcu_common.constprop.0+0x35/0xa10 kernel/rcu/tree.c:3108
slab_free_hook mm/slub.c:2381 [inline]
slab_free mm/slub.c:4680 [inline]
kmem_cache_free+0x14e/0x470 mm/slub.c:4782
exit_mmap+0x511/0xb90 mm/mmap.c:1305
__mmput kernel/fork.c:1130 [inline]
mmput+0xdb/0x430 kernel/fork.c:1152
exit_mm kernel/exit.c:582 [inline]
do_exit+0x7c7/0x2bf0 kernel/exit.c:949
page last free pid 14399 tgid 14399 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1395 [inline]
__free_frozen_pages+0x78a/0xfd0 mm/page_alloc.c:2895
tlb_batch_list_free mm/mmu_gather.c:159 [inline]
tlb_finish_mmu+0x237/0x7c0 mm/mmu_gather.c:500
exit_mmap+0x403/0xb90 mm/mmap.c:1293
__mmput kernel/fork.c:1130 [inline]
mmput+0xdb/0x430 kernel/fork.c:1152
exit_mm kernel/exit.c:582 [inline]
do_exit+0x7c7/0x2bf0 kernel/exit.c:949
do_group_exit+0xd3/0x2a0 kernel/exit.c:1102
__do_sys_exit_group kernel/exit.c:1113 [inline]
__se_sys_exit_group kernel/exit.c:1111 [inline]
__x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1111
x64_sys_call+0x14fa/0x1720 arch/x86/include/generated/asm/syscalls_64.h:232
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88814e07fe80: fb fb fb fc fc fa fb fb fb fb fc fc 00 00 00 00
ffff88814e07ff00: 00 fc fc fa fb fb fb fb fc fc fa fb fb fb fb fc
>ffff88814e07ff80: fc fa fb fb fb fb fc fc fa fb fb fb fb fc fc fc
^
ffff88814e080000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88814e080080: 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 96 9e 1a fa call 0xfa1a9ea9
13: 48 89 df mov %rbx,%rdi
16: e8 7e f2 1a fa call 0xfa1af299
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 45 4c 0e fa call 0xfa0e4c79
34: 65 8b 05 2e 4e 52 05 mov %gs:0x5524e2e(%rip),%eax # 0x5524e69
3b: 85 c0 test %eax,%eax
3d: 74 16 je 0x55
3f: 5b pop %rbx