==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x103c/0x10a0 drivers/hid/hid-mcp2221.c:948
Read of size 1 at addr ffff88813d987fff by task udevd/11700
CPU: 0 UID: 0 PID: 11700 Comm: udevd Not tainted syzkaller #0 PREEMPT(voluntary)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0x156/0x4c9 mm/kasan/report.c:482
kasan_report+0xdf/0x1a0 mm/kasan/report.c:595
mcp2221_raw_event+0x103c/0x10a0 drivers/hid/hid-mcp2221.c:948
__hid_input_report.constprop.0+0x314/0x460 drivers/hid/hid-core.c:2139
hid_irq_in+0x52e/0x6b0 drivers/hid/usbhid/hid-core.c:286
__usb_hcd_giveback_urb+0x38d/0x610 drivers/usb/core/hcd.c:1657
usb_hcd_giveback_urb+0x3ca/0x4a0 drivers/usb/core/hcd.c:1741
dummy_timer+0xd85/0x3670 drivers/usb/gadget/udc/dummy_hcd.c:1995
__run_hrtimer kernel/time/hrtimer.c:1777 [inline]
__hrtimer_run_queues+0x516/0x990 kernel/time/hrtimer.c:1841
hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1858
handle_softirqs+0x1dd/0x8f0 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0xed/0x150 kernel/softirq.c:723
irq_exit_rcu+0x9/0x30 kernel/softirq.c:739
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline]
sysvec_apic_timer_interrupt+0x8f/0xb0 arch/x86/kernel/apic/apic.c:1056
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:finish_task_switch.isra.0+0x160/0x700 kernel/sched/core.c:5118
Code: 8d 7b 18 31 f6 e8 40 c0 0a 00 31 f6 48 89 df e8 d6 f9 ff ff 48 89 df e8 ae de d2 05 e8 29 b6 35 00 fb 49 8d bc 24 40 15 00 00 <48> b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 0f b6 04 02 5a
RSP: 0018:ffffc90002e0fd80 EFLAGS: 00000206
RAX: 000000000093740f RBX: ffff8881f56390c0 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff88d596d3 RDI: ffff88811485cfc0
RBP: ffffc90002e0fdc8 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff88811485ba80
R13: ffff888115c457c0 R14: 0000000000000000 R15: 0000000000002001
context_switch kernel/sched/core.c:5263 [inline]
__schedule+0xeb8/0x3e50 kernel/sched/core.c:6867
__schedule_loop kernel/sched/core.c:6949 [inline]
schedule+0xdd/0x390 kernel/sched/core.c:6964
__exit_to_user_mode_loop kernel/entry/common.c:32 [inline]
exit_to_user_mode_loop+0x64/0x430 kernel/entry/common.c:75
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:159 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:194 [inline]
do_syscall_64+0x4a8/0x570 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f670bd33407
Code: 48 89 fa 4c 89 df e8 38 aa 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff
RSP: 002b:00007ffeacab94e0 EFLAGS: 00000202 ORIG_RAX: 0000000000000101
RAX: fffffffffffffffe RBX: 00007f670bc45880 RCX: 00007f670bd33407
RDX: 0000000000080000 RSI: 00007ffeacab9660 RDI: ffffffffffffff9c
RBP: 0000000000000008 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 00005573aa0aa7f5
R13: 00005573aa0aa7f5 R14: 0000000000000001 R15: 0000000000000000
Allocated by task 24468:
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
unpoison_slab_object mm/kasan/common.c:340 [inline]
__kasan_slab_alloc+0x6e/0x70 mm/kasan/common.c:366
kasan_slab_alloc include/linux/kasan.h:253 [inline]
slab_post_alloc_hook mm/slub.c:4953 [inline]
slab_alloc_node mm/slub.c:5263 [inline]
kmem_cache_alloc_noprof+0x266/0x760 mm/slub.c:5270
vm_area_dup+0x25/0x6e0 mm/vma_init.c:123
dup_mmap+0x6a3/0x1c30 mm/mmap.c:1773
dup_mm kernel/fork.c:1529 [inline]
copy_mm kernel/fork.c:1581 [inline]
copy_process+0x718c/0x77a0 kernel/fork.c:2221
kernel_clone+0xfc/0x930 kernel/fork.c:2651
__do_sys_clone+0xd9/0x120 kernel/fork.c:2792
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xc9/0x570 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 14:
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:253 [inline]
__kasan_slab_free+0x43/0x70 mm/kasan/common.c:285
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2540 [inline]
slab_free_after_rcu_debug+0xac/0x150 mm/slub.c:6729
rcu_do_batch kernel/rcu/tree.c:2605 [inline]
rcu_core+0x7c0/0x15c0 kernel/rcu/tree.c:2857
handle_softirqs+0x1dd/0x8f0 kernel/softirq.c:622
run_ksoftirqd kernel/softirq.c:1063 [inline]
run_ksoftirqd+0x38/0x60 kernel/softirq.c:1055
smpboot_thread_fn+0x3d3/0xaa0 kernel/smpboot.c:160
kthread+0x3b3/0x730 kernel/kthread.c:463
ret_from_fork+0x6c3/0xa20 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
Last potentially related work creation:
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_record_aux_stack+0x8c/0xa0 mm/kasan/generic.c:556
slab_free_hook mm/slub.c:2501 [inline]
slab_free mm/slub.c:6670 [inline]
kmem_cache_free+0x458/0x6d0 mm/slub.c:6781
exit_mmap+0x503/0xb30 mm/mmap.c:1302
__mmput kernel/fork.c:1173 [inline]
mmput+0xe0/0x430 kernel/fork.c:1196
exit_mm kernel/exit.c:581 [inline]
do_exit+0x78a/0x2a30 kernel/exit.c:959
do_group_exit+0xd5/0x2a0 kernel/exit.c:1112
get_signal+0x1ec7/0x21e0 kernel/signal.c:3034
arch_do_signal_or_restart+0x91/0x7a0 arch/x86/kernel/signal.c:337
__exit_to_user_mode_loop kernel/entry/common.c:41 [inline]
exit_to_user_mode_loop+0x7e/0x430 kernel/entry/common.c:75
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:159 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:194 [inline]
do_syscall_64+0x4a8/0x570 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff88813d987dc0
which belongs to the cache vm_area_struct of size 256
The buggy address is located 319 bytes to the right of
allocated 256-byte region [ffff88813d987dc0, ffff88813d987ec0)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13d987
memcg:ffff888120aa1a01
anon flags: 0x200000000000000(node=0|zone=2)
page_type: f5(slab)
raw: 0200000000000000 ffff88810129db40 0000000000000000 dead000000000001
raw: 0000000000000000 00000000000c000c 00000000f5000000 ffff888120aa1a01
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 22822, tgid 22822 (modprobe), ts 2019106810914, free_ts 2019038826890
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1e1/0x250 mm/page_alloc.c:1884
prep_new_page mm/page_alloc.c:1892 [inline]
get_page_from_freelist+0xd57/0x3b20 mm/page_alloc.c:3945
__alloc_frozen_pages_noprof+0x269/0x2230 mm/page_alloc.c:5240
alloc_pages_mpol+0xe8/0x410 mm/mempolicy.c:2486
alloc_slab_page mm/slub.c:3075 [inline]
allocate_slab mm/slub.c:3248 [inline]
new_slab+0x2c4/0x440 mm/slub.c:3302
___slab_alloc+0xda3/0x1ca0 mm/slub.c:4656
__kmem_cache_alloc_bulk+0x20f/0x700 mm/slub.c:7431
refill_sheaf mm/slub.c:2650 [inline]
alloc_full_sheaf mm/slub.c:2671 [inline]
__pcs_replace_empty_main+0x347/0x4f0 mm/slub.c:5033
alloc_from_pcs mm/slub.c:5121 [inline]
slab_alloc_node mm/slub.c:5248 [inline]
kmem_cache_alloc_noprof+0x5ca/0x760 mm/slub.c:5270
vm_area_alloc+0x1f/0x160 mm/vma_init.c:32
__mmap_new_vma mm/vma.c:2506 [inline]
__mmap_region+0xf19/0x2430 mm/vma.c:2745
mmap_region+0x180/0x3e0 mm/vma.c:2823
do_mmap+0xc53/0x12d0 mm/mmap.c:558
vm_mmap_pgoff+0x201/0x390 mm/util.c:581
vm_mmap+0x8e/0xc0 mm/util.c:617
elf_map fs/binfmt_elf.c:399 [inline]
elf_load+0x29a/0x700 fs/binfmt_elf.c:422
page last free pid 22821 tgid 22821 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1433 [inline]
__free_frozen_pages+0x7d1/0x1010 mm/page_alloc.c:2973
__pagetable_free include/linux/mm.h:3200 [inline]
pagetable_free include/linux/mm.h:3224 [inline]
pagetable_dtor_free include/linux/mm.h:3328 [inline]
__tlb_remove_table include/asm-generic/tlb.h:220 [inline]
__tlb_remove_table_free mm/mmu_gather.c:227 [inline]
tlb_remove_table_rcu+0x2b2/0x390 mm/mmu_gather.c:290
rcu_do_batch kernel/rcu/tree.c:2605 [inline]
rcu_core+0x7c0/0x15c0 kernel/rcu/tree.c:2857
handle_softirqs+0x1dd/0x8f0 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0xed/0x150 kernel/softirq.c:723
irq_exit_rcu+0x9/0x30 kernel/softirq.c:739
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline]
sysvec_apic_timer_interrupt+0x8f/0xb0 arch/x86/kernel/apic/apic.c:1056
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
Memory state around the buggy address:
ffff88813d987e80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
ffff88813d987f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88813d987f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff88813d988000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88813d988080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: 8d 7b 18 lea 0x18(%rbx),%edi
3: 31 f6 xor %esi,%esi
5: e8 40 c0 0a 00 call 0xac04a
a: 31 f6 xor %esi,%esi
c: 48 89 df mov %rbx,%rdi
f: e8 d6 f9 ff ff call 0xfffff9ea
14: 48 89 df mov %rbx,%rdi
17: e8 ae de d2 05 call 0x5d2deca
1c: e8 29 b6 35 00 call 0x35b64a
21: fb sti
22: 49 8d bc 24 40 15 00 lea 0x1540(%r12),%rdi
29: 00
* 2a: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax <-- trapping instruction
31: fc ff df
34: 48 89 fa mov %rdi,%rdx
37: 48 c1 ea 03 shr $0x3,%rdx
3b: 0f b6 04 02 movzbl (%rdx,%rax,1),%eax
3f: 5a pop %rdx