==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948
Read of size 1 at addr ffff88810cb1ffff by task swapper/1/0
CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Not tainted syzkaller #0 PREEMPT(voluntary)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/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+0x388/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+0x205/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:702
RIP: 0010:pv_native_safe_halt+0xf/0x20 arch/x86/kernel/paravirt.c:82
Code: 2a 9c 01 e9 53 b6 02 00 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 66 90 0f 00 2d d3 99 21 00 fb f4 cc cc cc cc 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90
RSP: 0018:ffffc9000013fdf8 EFLAGS: 000002c2
RAX: 00000000007825d3 RBX: 0000000000000001 RCX: ffffffff87444b79
RDX: 0000000000000000 RSI: ffffffff88c87017 RDI: ffffffff878973c0
RBP: ffffed10203da740 R08: 0000000000000001 R09: ffffed103eb26605
R10: ffff8881f593302b R11: 0000000000000000 R12: 0000000000000001
R13: ffff888101ed3a00 R14: ffffffff8aa0c8d0 R15: 0000000000000000
arch_safe_halt arch/x86/include/asm/paravirt.h:107 [inline]
default_idle+0x13/0x20 arch/x86/kernel/process.c:767
default_idle_call+0x6c/0xb0 kernel/sched/idle.c:122
cpuidle_idle_call kernel/sched/idle.c:190 [inline]
do_idle+0x38d/0x500 kernel/sched/idle.c:330
cpu_startup_entry+0x4f/0x60 kernel/sched/idle.c:428
start_secondary+0x21d/0x2b0 arch/x86/kernel/smpboot.c:315
common_startup_64+0x13e/0x148
Allocated by task 5236:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:56
kasan_save_track+0x14/0x30 mm/kasan/common.c:77
unpoison_slab_object mm/kasan/common.c:342 [inline]
__kasan_slab_alloc+0x6e/0x70 mm/kasan/common.c:368
kasan_slab_alloc include/linux/kasan.h:252 [inline]
slab_post_alloc_hook mm/slub.c:4946 [inline]
slab_alloc_node mm/slub.c:5245 [inline]
kmem_cache_alloc_noprof+0x260/0x6c0 mm/slub.c:5252
__kernfs_new_node+0xd2/0x8e0 fs/kernfs/dir.c:637
kernfs_new_node+0x13c/0x1e0 fs/kernfs/dir.c:713
__kernfs_create_file+0x53/0x350 fs/kernfs/file.c:1057
sysfs_add_file_mode_ns+0x207/0x3c0 fs/sysfs/file.c:313
sysfs_create_file_ns+0x13d/0x1d0 fs/sysfs/file.c:374
sysfs_create_file include/linux/sysfs.h:764 [inline]
device_create_file+0xf2/0x1e0 drivers/base/core.c:3055
device_add+0x2bf/0x1aa0 drivers/base/core.c:3636
usb_create_ep_devs+0x160/0x2b0 drivers/usb/core/endpoint.c:170
usb_new_device+0xfc1/0x1a60 drivers/usb/core/hub.c:2724
hub_port_connect drivers/usb/core/hub.c:5566 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5706 [inline]
port_event drivers/usb/core/hub.c:5870 [inline]
hub_event+0x2fce/0x5060 drivers/usb/core/hub.c:5952
process_one_work+0x9cc/0x1b70 kernel/workqueue.c:3263
process_scheduled_works kernel/workqueue.c:3346 [inline]
worker_thread+0x6c8/0xf10 kernel/workqueue.c:3427
kthread+0x3c5/0x780 kernel/kthread.c:463
ret_from_fork+0x56a/0x700 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Freed by task 0:
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:2514 [inline]
slab_free mm/slub.c:6566 [inline]
kmem_cache_free+0x2a4/0x660 mm/slub.c:6676
rcu_do_batch kernel/rcu/tree.c:2605 [inline]
rcu_core+0x79c/0x1530 kernel/rcu/tree.c:2861
handle_softirqs+0x205/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:702
Last potentially related work creation:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:56
kasan_record_aux_stack+0x8c/0xa0 mm/kasan/generic.c:559
__call_rcu_common.constprop.0+0xa5/0xa10 kernel/rcu/tree.c:3123
kernfs_put.part.0+0x162/0x640 fs/kernfs/dir.c:591
kernfs_put fs/kernfs/dir.c:1724 [inline]
kernfs_remove_by_name_ns+0xdf/0x110 fs/kernfs/dir.c:1718
sysfs_remove_file include/linux/sysfs.h:770 [inline]
device_remove_file drivers/base/core.c:3071 [inline]
device_remove_file drivers/base/core.c:3067 [inline]
device_del+0x381/0x9f0 drivers/base/core.c:3876
device_unregister+0x1d/0xc0 drivers/base/core.c:3919
usb_remove_ep_devs+0x42/0x80 drivers/usb/core/endpoint.c:189
usb_disconnect+0x56b/0x9c0 drivers/usb/core/hub.c:2365
hub_port_connect drivers/usb/core/hub.c:5406 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5706 [inline]
port_event drivers/usb/core/hub.c:5870 [inline]
hub_event+0x1aa2/0x5060 drivers/usb/core/hub.c:5952
process_one_work+0x9cc/0x1b70 kernel/workqueue.c:3263
process_scheduled_works kernel/workqueue.c:3346 [inline]
worker_thread+0x6c8/0xf10 kernel/workqueue.c:3427
kthread+0x3c5/0x780 kernel/kthread.c:463
ret_from_fork+0x56a/0x700 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
The buggy address belongs to the object at ffff88810cb1ff00
which belongs to the cache kernfs_node_cache of size 176
The buggy address is located 79 bytes to the right of
allocated 176-byte region [ffff88810cb1ff00, ffff88810cb1ffb0)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10cb1f
flags: 0x200000000000000(node=0|zone=2)
page_type: f5(slab)
raw: 0200000000000000 ffff8881012a5780 ffffea0004d8f840 dead000000000004
raw: 0000000000000000 0000000000110011 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 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5210, tgid 5210 (kworker/0:3), ts 118162898644, free_ts 118120254936
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:3030 [inline]
allocate_slab mm/slub.c:3203 [inline]
new_slab+0x24a/0x360 mm/slub.c:3257
___slab_alloc+0xdb7/0x1a70 mm/slub.c:4627
__slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4746
__slab_alloc_node mm/slub.c:4822 [inline]
slab_alloc_node mm/slub.c:5233 [inline]
kmem_cache_alloc_noprof+0x393/0x6c0 mm/slub.c:5252
__kernfs_new_node+0xd2/0x8e0 fs/kernfs/dir.c:637
kernfs_new_node+0x13c/0x1e0 fs/kernfs/dir.c:713
__kernfs_create_file+0x53/0x350 fs/kernfs/file.c:1057
sysfs_add_file_mode_ns+0x207/0x3c0 fs/sysfs/file.c:313
create_files fs/sysfs/group.c:76 [inline]
internal_create_group+0x578/0xf30 fs/sysfs/group.c:183
internal_create_groups+0x9d/0x150 fs/sysfs/group.c:223
device_add_groups drivers/base/core.c:2836 [inline]
device_add_attrs drivers/base/core.c:2911 [inline]
device_add+0x77f/0x1aa0 drivers/base/core.c:3643
usb_new_device+0xd07/0x1a60 drivers/usb/core/hub.c:2694
page last free pid 14 tgid 14 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1394 [inline]
__free_frozen_pages+0x78f/0x1000 mm/page_alloc.c:2906
pagetable_free include/linux/mm.h:2992 [inline]
pagetable_dtor_free include/linux/mm.h:3095 [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+0x121/0x320 mm/mmu_gather.c:290
rcu_do_batch kernel/rcu/tree.c:2605 [inline]
rcu_core+0x79c/0x1530 kernel/rcu/tree.c:2861
handle_softirqs+0x205/0x8d0 kernel/softirq.c:622
run_ksoftirqd kernel/softirq.c:1063 [inline]
run_ksoftirqd+0x3a/0x60 kernel/softirq.c:1055
smpboot_thread_fn+0x3f4/0xae0 kernel/smpboot.c:160
kthread+0x3c5/0x780 kernel/kthread.c:463
ret_from_fork+0x56a/0x700 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Memory state around the buggy address:
ffff88810cb1fe80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
ffff88810cb1ff00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88810cb1ff80: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc
^
ffff88810cb20000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88810cb20080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess), 3 bytes skipped:
0: e9 53 b6 02 00 jmp 0x2b658
5: 0f 1f 00 nopl (%rax)
8: 90 nop
9: 90 nop
a: 90 nop
b: 90 nop
c: 90 nop
d: 90 nop
e: 90 nop
f: 90 nop
10: 90 nop
11: 90 nop
12: 90 nop
13: 90 nop
14: 90 nop
15: 90 nop
16: 90 nop
17: 90 nop
18: f3 0f 1e fa endbr64
1c: 66 90 xchg %ax,%ax
1e: 0f 00 2d d3 99 21 00 verw 0x2199d3(%rip) # 0x2199f8
25: fb sti
26: f4 hlt
* 27: c3 ret <-- trapping instruction
28: cc int3
29: cc int3
2a: cc int3
2b: cc int3
2c: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1)
33: 00 00 00
36: 66 90 xchg %ax,%ax
38: 90 nop
39: 90 nop
3a: 90 nop
3b: 90 nop
3c: 90 nop