==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0xf94/0x1030 drivers/hid/hid-mcp2221.c:944
Read of size 1 at addr ffff88812c277fff by task kworker/1:2/2501
CPU: 1 UID: 0 PID: 2501 Comm: kworker/1:2 Not tainted syzkaller #0 PREEMPT(voluntary)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Workqueue: usb_hub_wq hub_event
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+0x38a/0x6e0 drivers/usb/core/hcd.c:1663
usb_hcd_giveback_urb+0x39b/0x450 drivers/usb/core/hcd.c:1747
dummy_timer+0x1814/0x3a30 drivers/usb/gadget/udc/dummy_hcd.c:1995
__run_hrtimer kernel/time/hrtimer.c:1761 [inline]
__hrtimer_run_queues+0x202/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:rcu_preempt_read_exit kernel/rcu/tree_plugin.h:396 [inline]
RIP: 0010:__rcu_read_unlock+0x30/0x620 kernel/rcu/tree_plugin.h:435
Code: 41 55 41 54 55 65 48 8b 2d 55 a8 2d 0b 53 48 8d bd fc 03 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 0f b6 14 02 <48> 89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 4a 02 00 00 65
RSP: 0018:ffffc900039ef0c8 EFLAGS: 00000a03
RAX: dffffc0000000000 RBX: ffffc900039ef298 RCX: ffffc900039ef0bc
RDX: 0000000000000000 RSI: ffffffff88d05ea6 RDI: ffff88811472bdfc
RBP: ffff88811472ba00 R08: ffffffff8afc85ee R09: 0000000000000000
R10: 0000000000000003 R11: 0000000000006971 R12: ffffc900039ef1b8
R13: ffffc900039ef168 R14: ffffc900039ef298 R15: ffffc900039ef19c
rcu_read_unlock include/linux/rcupdate.h:873 [inline]
class_rcu_destructor include/linux/rcupdate.h:1155 [inline]
unwind_next_frame+0x3fe/0x20a0 arch/x86/kernel/unwind_orc.c:479
arch_stack_walk+0x94/0x100 arch/x86/kernel/stacktrace.c:25
stack_trace_save+0x8e/0xc0 kernel/stacktrace.c:122
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:388 [inline]
__kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:405
kmalloc_noprof include/linux/slab.h:905 [inline]
dummy_urb_enqueue+0xa3/0x920 drivers/usb/gadget/udc/dummy_hcd.c:1273
usb_hcd_submit_urb+0x25b/0x1c60 drivers/usb/core/hcd.c:1546
usb_submit_urb+0x890/0x1770 drivers/usb/core/urb.c:581
usb_start_wait_urb+0x104/0x4b0 drivers/usb/core/message.c:59
usb_internal_control_msg drivers/usb/core/message.c:103 [inline]
usb_control_msg+0x326/0x4a0 drivers/usb/core/message.c:154
usb_get_string+0xab/0x1a0 drivers/usb/core/message.c:844
usb_string_sub+0x107/0x390 drivers/usb/core/message.c:883
usb_get_langid drivers/usb/core/message.c:920 [inline]
usb_string+0x1d6/0x670 drivers/usb/core/message.c:984
usb_cache_string+0x80/0x150 drivers/usb/core/message.c:1030
usb_enumerate_device drivers/usb/core/hub.c:2536 [inline]
usb_new_device+0x169/0x1a60 drivers/usb/core/hub.c:2664
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+0x3c2/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
Allocated by task 22385:
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
getname_kernel+0x52/0x370 fs/namei.c:249
open_exec+0x16/0x80 fs/exec.c:818
load_elf_binary+0x52e/0x4ef0 fs/binfmt_elf.c:892
search_binary_handler fs/exec.c:1670 [inline]
exec_binprm fs/exec.c:1702 [inline]
bprm_execve fs/exec.c:1754 [inline]
bprm_execve+0x8c0/0x1600 fs/exec.c:1730
kernel_execve+0x2ef/0x3b0 fs/exec.c:1920
call_usermodehelper_exec_async+0x255/0x4c0 kernel/umh.c:109
ret_from_fork+0x5b6/0x6c0 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Freed by task 22385:
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
putname+0x154/0x1a0 fs/namei.c:297
open_exec+0x50/0x80 fs/exec.c:823
load_elf_binary+0x52e/0x4ef0 fs/binfmt_elf.c:892
search_binary_handler fs/exec.c:1670 [inline]
exec_binprm fs/exec.c:1702 [inline]
bprm_execve fs/exec.c:1754 [inline]
bprm_execve+0x8c0/0x1600 fs/exec.c:1730
kernel_execve+0x2ef/0x3b0 fs/exec.c:1920
call_usermodehelper_exec_async+0x255/0x4c0 kernel/umh.c:109
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 ffff88812c276600
which belongs to the cache names_cache of size 4096
The buggy address is located 2559 bytes to the right of
allocated 4096-byte region [ffff88812c276600, ffff88812c277600)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12c270
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0x200000000000040(head|node=0|zone=2)
page_type: f5(slab)
raw: 0200000000000040 ffff8881012a2000 0000000000000000 0000000000000001
raw: 0000000000000000 0000000000070007 00000000f5000000 0000000000000000
head: 0200000000000040 ffff8881012a2000 0000000000000000 0000000000000001
head: 0000000000000000 0000000000070007 00000000f5000000 0000000000000000
head: 0200000000000003 ffffea0004b09c01 00000000ffffffff 00000000ffffffff
head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5445, tgid 5445 (udevd), ts 1990962773153, free_ts 1983588617197
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
getname_flags.part.0+0x4c/0x550 fs/namei.c:146
getname_flags+0x93/0xf0 include/linux/audit.h:322
getname include/linux/fs.h:2918 [inline]
do_sys_openat2+0xb8/0x1d0 fs/open.c:1429
do_sys_open fs/open.c:1450 [inline]
__do_sys_openat fs/open.c:1466 [inline]
__se_sys_openat fs/open.c:1461 [inline]
__x64_sys_openat+0x174/0x210 fs/open.c:1461
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
page last free pid 6552 tgid 6552 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
kasan_depopulate_vmalloc_pte+0x5f/0x80 mm/kasan/shadow.c:472
apply_to_pte_range mm/memory.c:3015 [inline]
apply_to_pmd_range mm/memory.c:3059 [inline]
apply_to_pud_range mm/memory.c:3095 [inline]
apply_to_p4d_range mm/memory.c:3131 [inline]
__apply_to_page_range+0xa92/0x1350 mm/memory.c:3167
kasan_release_vmalloc+0xd1/0xe0 mm/kasan/shadow.c:593
kasan_release_vmalloc_node mm/vmalloc.c:2249 [inline]
purge_vmap_node+0x1c4/0xa30 mm/vmalloc.c:2266
__purge_vmap_area_lazy+0xa06/0xc60 mm/vmalloc.c:2356
drain_vmap_area_work+0x27/0x40 mm/vmalloc.c:2390
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+0x3c2/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
Memory state around the buggy address:
ffff88812c277e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88812c277f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88812c277f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff88812c278000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88812c278080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: 41 55 push %r13
2: 41 54 push %r12
4: 55 push %rbp
5: 65 48 8b 2d 55 a8 2d mov %gs:0xb2da855(%rip),%rbp # 0xb2da862
c: 0b
d: 53 push %rbx
e: 48 8d bd fc 03 00 00 lea 0x3fc(%rbp),%rdi
15: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
1c: fc ff df
1f: 48 89 fa mov %rdi,%rdx
22: 48 c1 ea 03 shr $0x3,%rdx
26: 0f b6 14 02 movzbl (%rdx,%rax,1),%edx
* 2a: 48 89 f8 mov %rdi,%rax <-- trapping instruction
2d: 83 e0 07 and $0x7,%eax
30: 83 c0 03 add $0x3,%eax
33: 38 d0 cmp %dl,%al
35: 7c 08 jl 0x3f
37: 84 d2 test %dl,%dl
39: 0f 85 4a 02 00 00 jne 0x289
3f: 65 gs