==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948
Read of size 1 at addr ffff888135ddbfff by task udevd/2850
CPU: 1 UID: 0 PID: 2850 Comm: udevd 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+0x311/0x450 drivers/hid/hid-core.c:2130
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+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:bytes_is_nonzero mm/kasan/generic.c:87 [inline]
RIP: 0010:memory_is_nonzero mm/kasan/generic.c:104 [inline]
RIP: 0010:memory_is_poisoned_n mm/kasan/generic.c:129 [inline]
RIP: 0010:memory_is_poisoned mm/kasan/generic.c:161 [inline]
RIP: 0010:check_region_inline mm/kasan/generic.c:180 [inline]
RIP: 0010:kasan_check_range+0x15c/0x1b0 mm/kasan/generic.c:189
Code: c2 48 85 c0 75 ad 48 89 da 4c 89 d8 4c 29 da e9 46 ff ff ff 48 85 d2 74 18 48 01 ea eb 09 48 83 c0 01 48 39 d0 74 0a 80 38 00 <74> f2 e9 75 ff ff ff 5b b8 01 00 00 00 5d 41 5c e9 bf 97 64 05 b8
RSP: 0018:ffffc900016afb78 EFLAGS: 00000246
RAX: ffffed1022dfb02c RBX: ffffed1022dfb02d RCX: ffffffff81fc965c
RDX: ffffed1022dfb02d RSI: 0000000000000008 RDI: ffff888116fd8160
RBP: ffffed1022dfb02c R08: 0000000000000001 R09: ffffed1022dfb02c
R10: ffff888116fd8167 R11: 0000000000000000 R12: ffffc900016afc70
R13: 0000000000000001 R14: ffffc900016afc38 R15: ffffc900016afc50
instrument_atomic_read_write include/linux/instrumented.h:96 [inline]
atomic_long_add_negative include/linux/atomic/atomic-instrumented.h:4576 [inline]
file_ref_get include/linux/file_ref.h:108 [inline]
epi_fget fs/eventpoll.c:1034 [inline]
ep_item_poll+0x4c/0x1f0 fs/eventpoll.c:1047
ep_send_events+0x281/0xc40 fs/eventpoll.c:1905
ep_try_send_events fs/eventpoll.c:1992 [inline]
ep_poll fs/eventpoll.c:2057 [inline]
do_epoll_wait+0x91b/0x1040 fs/eventpoll.c:2560
__do_sys_epoll_wait fs/eventpoll.c:2568 [inline]
__se_sys_epoll_wait fs/eventpoll.c:2563 [inline]
__x64_sys_epoll_wait+0x194/0x290 fs/eventpoll.c:2563
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:0x7f9ff8e3f407
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:00007ffd68d8ae40 EFLAGS: 00000202 ORIG_RAX: 00000000000000e8
RAX: ffffffffffffffda RBX: 00007f9ff8d51880 RCX: 00007f9ff8e3f407
RDX: 0000000000000008 RSI: 00007ffd68d8afa0 RDI: 000000000000000b
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000bb8 R11: 0000000000000202 R12: 0000000000000000
R13: 000055bbb5dc0100 R14: 0000000000000000 R15: 0000000000000000
Allocated by task 18383:
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:4191 [inline]
slab_alloc_node mm/slub.c:4240 [inline]
kmem_cache_alloc_noprof+0x14f/0x3b0 mm/slub.c:4247
__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:319
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
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+0x9cf/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+0x56d/0x700 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Freed by task 22:
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:2422 [inline]
slab_free mm/slub.c:4695 [inline]
kmem_cache_free+0x2a0/0x470 mm/slub.c:4797
rcu_do_batch kernel/rcu/tree.c:2605 [inline]
rcu_core+0x79c/0x1530 kernel/rcu/tree.c:2861
handle_softirqs+0x208/0x8d0 kernel/softirq.c:579
run_ksoftirqd kernel/softirq.c:968 [inline]
run_ksoftirqd+0x3a/0x60 kernel/softirq.c:960
smpboot_thread_fn+0x3f7/0xae0 kernel/smpboot.c:160
kthread+0x3c5/0x780 kernel/kthread.c:463
ret_from_fork+0x56d/0x700 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Last potentially related work creation:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_record_aux_stack+0x8c/0xa0 mm/kasan/generic.c:548
__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
kernfs_remove_by_name include/linux/kernfs.h:633 [inline]
remove_files+0x96/0x1c0 fs/sysfs/group.c:28
sysfs_remove_group+0x8b/0x180 fs/sysfs/group.c:322
sysfs_remove_groups fs/sysfs/group.c:346 [inline]
sysfs_remove_groups+0x60/0xa0 fs/sysfs/group.c:338
device_remove_groups drivers/base/core.c:2843 [inline]
device_remove_attrs+0x192/0x290 drivers/base/core.c:2973
device_del+0x38e/0x9f0 drivers/base/core.c:3877
usb_disconnect+0x5bf/0x9c0 drivers/usb/core/hub.c:2375
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+0x9cf/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+0x56d/0x700 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 ffff888135ddbf00
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 [ffff888135ddbf00, ffff888135ddbfb0)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x135ddb
flags: 0x200000000000000(node=0|zone=2)
page_type: f5(slab)
raw: 0200000000000000 ffff8881012a1780 ffffea0004d94300 dead000000000002
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 5444, tgid 5443 (syz.1.58), ts 122112704803, free_ts 121951811478
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:2492 [inline]
allocate_slab mm/slub.c:2660 [inline]
new_slab+0x247/0x330 mm/slub.c:2714
___slab_alloc+0xc55/0x1620 mm/slub.c:3901
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3992
__slab_alloc_node mm/slub.c:4067 [inline]
slab_alloc_node mm/slub.c:4228 [inline]
kmem_cache_alloc_noprof+0x1f9/0x3b0 mm/slub.c:4247
__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:319
sysfs_create_file_ns+0x13d/0x1d0 fs/sysfs/file.c:386
sysfs_create_file include/linux/sysfs.h:771 [inline]
driver_create_file+0x4a/0x70 drivers/base/driver.c:185
add_bind_files drivers/base/bus.c:596 [inline]
bus_add_driver+0x55c/0x690 drivers/base/bus.c:702
driver_register+0x15c/0x4b0 drivers/base/driver.c:249
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:1395 [inline]
__free_frozen_pages+0x78a/0xfd0 mm/page_alloc.c:2895
pagetable_free include/linux/mm.h:2898 [inline]
pagetable_dtor_free include/linux/mm.h:2996 [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+0x116/0x1a0 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+0x208/0x8d0 kernel/softirq.c:579
run_ksoftirqd kernel/softirq.c:968 [inline]
run_ksoftirqd+0x3a/0x60 kernel/softirq.c:960
smpboot_thread_fn+0x3f7/0xae0 kernel/smpboot.c:160
kthread+0x3c5/0x780 kernel/kthread.c:463
ret_from_fork+0x56d/0x700 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Memory state around the buggy address:
ffff888135ddbe80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
ffff888135ddbf00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888135ddbf80: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc
^
ffff888135ddc000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888135ddc080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: c2 48 85 ret $0x8548
3: c0 75 ad 48 shlb $0x48,-0x53(%rbp)
7: 89 da mov %ebx,%edx
9: 4c 89 d8 mov %r11,%rax
c: 4c 29 da sub %r11,%rdx
f: e9 46 ff ff ff jmp 0xffffff5a
14: 48 85 d2 test %rdx,%rdx
17: 74 18 je 0x31
19: 48 01 ea add %rbp,%rdx
1c: eb 09 jmp 0x27
1e: 48 83 c0 01 add $0x1,%rax
22: 48 39 d0 cmp %rdx,%rax
25: 74 0a je 0x31
27: 80 38 00 cmpb $0x0,(%rax)
* 2a: 74 f2 je 0x1e <-- trapping instruction
2c: e9 75 ff ff ff jmp 0xffffffa6
31: 5b pop %rbx
32: b8 01 00 00 00 mov $0x1,%eax
37: 5d pop %rbp
38: 41 5c pop %r12
3a: e9 bf 97 64 05 jmp 0x56497fe
3f: b8 .byte 0xb8