==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948
Read of size 1 at addr ffff88811968ffff by task udevd/2860
CPU: 0 UID: 0 PID: 2860 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+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/0x470 drivers/hid/hid-core.c:2139
hid_irq_in+0x35e/0x870 drivers/hid/usbhid/hid-core.c:286
__usb_hcd_giveback_urb+0x38b/0x610 drivers/usb/core/hcd.c:1657
usb_hcd_giveback_urb+0x39b/0x450 drivers/usb/core/hcd.c:1741
dummy_timer+0x1809/0x3ad0 drivers/usb/gadget/udc/dummy_hcd.c:1995
__run_hrtimer kernel/time/hrtimer.c:1777 [inline]
__hrtimer_run_queues+0x202/0xc40 kernel/time/hrtimer.c:1841
hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1858
handle_softirqs+0x208/0x940 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:1056 [inline]
sysvec_apic_timer_interrupt+0x90/0xb0 arch/x86/kernel/apic/apic.c:1056
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:lock_acquire+0x62/0x330 kernel/locking/lockdep.c:5872
Code: 01 47 0b 83 f8 07 0f 87 a2 02 00 00 89 c0 48 0f a3 05 c2 d1 48 09 0f 82 74 02 00 00 8b 35 5a de 48 09 85 f6 0f 85 8d 00 00 00 <48> 8b 44 24 30 65 48 2b 05 d9 00 47 0b 0f 85 ad 02 00 00 48 83 c4
RSP: 0018:ffffc90001547990 EFLAGS: 00000206
RAX: 0000000000000046 RBX: ffffffff8946b0c0 RCX: 95025112869c748e
RDX: 0000000000000000 RSI: ffffffff88ce34cf RDI: ffffffff878a7380
RBP: 0000000000000000 R08: 00000000ffffffff R09: 00000000ffffffff
R10: 0000000000000000 R11: ffff8881179a0aa8 R12: 0000000000000001
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
__fs_reclaim_acquire mm/page_alloc.c:4301 [inline]
fs_reclaim_acquire+0x102/0x150 mm/page_alloc.c:4315
might_alloc include/linux/sched/mm.h:317 [inline]
slab_pre_alloc_hook mm/slub.c:4904 [inline]
slab_alloc_node mm/slub.c:5239 [inline]
kmem_cache_alloc_noprof+0x5b/0x740 mm/slub.c:5270
alloc_empty_file+0x55/0x1e0 fs/file_table.c:237
path_openat+0xde/0x3140 fs/namei.c:4773
do_filp_open+0x20b/0x470 fs/namei.c:4814
do_sys_openat2+0x120/0x260 fs/open.c:1430
do_sys_open fs/open.c:1436 [inline]
__do_sys_openat fs/open.c:1452 [inline]
__se_sys_openat fs/open.c:1447 [inline]
__x64_sys_openat+0x174/0x210 fs/open.c:1447
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x570 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f35943f8407
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:00007fffbec86b00 EFLAGS: 00000202 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f359430a880 RCX: 00007f35943f8407
RDX: 0000000000080141 RSI: 000055fa2955b02e RDI: ffffffffffffff9c
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000000001a4 R11: 0000000000000202 R12: 00000000ffffffff
R13: 00000000ffffffff R14: ffffffffffffffff R15: 0000000000000000
Allocated by task 6268:
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:339 [inline]
__kasan_slab_alloc+0x6e/0x70 mm/kasan/common.c:365
kasan_slab_alloc include/linux/kasan.h:252 [inline]
slab_post_alloc_hook mm/slub.c:4953 [inline]
slab_alloc_node mm/slub.c:5263 [inline]
kmem_cache_alloc_noprof+0x26e/0x740 mm/slub.c:5270
getname_flags.part.0+0x4c/0x550 fs/namei.c:146
getname_flags+0x93/0xf0 include/linux/audit.h:345
getname include/linux/fs.h:2498 [inline]
__do_sys_symlinkat fs/namei.c:5562 [inline]
__se_sys_symlinkat fs/namei.c:5559 [inline]
__x64_sys_symlinkat+0x79/0xc0 fs/namei.c:5559
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x570 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 6268:
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:584
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:2540 [inline]
slab_free mm/slub.c:6670 [inline]
kmem_cache_free+0x2a7/0x710 mm/slub.c:6781
putname+0xf5/0x1a0 fs/namei.c:297
do_symlinkat+0x2b1/0x440 fs/namei.c:5554
__do_sys_symlinkat fs/namei.c:5562 [inline]
__se_sys_symlinkat fs/namei.c:5559 [inline]
__x64_sys_symlinkat+0x93/0xc0 fs/namei.c:5559
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x570 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff88811968e600
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 [ffff88811968e600, ffff88811968f600)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x119688
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x200000000000040(head|node=0|zone=2)
page_type: f5(slab)
raw: 0200000000000040 ffff8881012a1000 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000070007 00000000f5000000 0000000000000000
head: 0200000000000040 ffff8881012a1000 dead000000000122 0000000000000000
head: 0000000000000000 0000000000070007 00000000f5000000 0000000000000000
head: 0200000000000003 ffffea000465a201 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 6268, tgid 6268 (syz-executor), ts 223696075794, free_ts 223456468632
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1af/0x220 mm/page_alloc.c:1846
prep_new_page mm/page_alloc.c:1854 [inline]
get_page_from_freelist+0x1058/0x3cb0 mm/page_alloc.c:3915
__alloc_frozen_pages_noprof+0x259/0x21c0 mm/page_alloc.c:5210
alloc_pages_mpol+0xe4/0x410 mm/mempolicy.c:2486
alloc_slab_page mm/slub.c:3075 [inline]
allocate_slab mm/slub.c:3248 [inline]
new_slab+0x2c3/0x430 mm/slub.c:3302
___slab_alloc+0xe20/0x1ca0 mm/slub.c:4656
__slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4779
__slab_alloc_node mm/slub.c:4855 [inline]
slab_alloc_node mm/slub.c:5251 [inline]
kmem_cache_alloc_noprof+0x3a1/0x740 mm/slub.c:5270
getname_flags.part.0+0x4c/0x550 fs/namei.c:146
getname_flags+0x93/0xf0 include/linux/audit.h:345
user_path_at+0x24/0x60 fs/namei.c:3566
__do_sys_chdir fs/open.c:558 [inline]
__se_sys_chdir fs/open.c:552 [inline]
__x64_sys_chdir+0xbe/0x270 fs/open.c:552
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x570 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 5890 tgid 5890 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1395 [inline]
__free_frozen_pages+0x795/0x1010 mm/page_alloc.c:2943
discard_slab mm/slub.c:3346 [inline]
__put_partials+0x130/0x170 mm/slub.c:3886
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x4c/0xf0 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x4e/0x70 mm/kasan/common.c:349
kasan_slab_alloc include/linux/kasan.h:252 [inline]
slab_post_alloc_hook mm/slub.c:4953 [inline]
slab_alloc_node mm/slub.c:5263 [inline]
kmem_cache_alloc_noprof+0x26e/0x740 mm/slub.c:5270
getname_flags.part.0+0x4c/0x550 fs/namei.c:146
getname_flags include/linux/audit.h:345 [inline]
getname include/linux/fs.h:2498 [inline]
__do_sys_unlink fs/namei.c:5474 [inline]
__se_sys_unlink fs/namei.c:5472 [inline]
__x64_sys_unlink+0xb0/0x110 fs/namei.c:5472
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x570 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88811968fe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88811968ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88811968ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff888119690000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888119690080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: 01 47 0b add %eax,0xb(%rdi)
3: 83 f8 07 cmp $0x7,%eax
6: 0f 87 a2 02 00 00 ja 0x2ae
c: 89 c0 mov %eax,%eax
e: 48 0f a3 05 c2 d1 48 bt %rax,0x948d1c2(%rip) # 0x948d1d8
15: 09
16: 0f 82 74 02 00 00 jb 0x290
1c: 8b 35 5a de 48 09 mov 0x948de5a(%rip),%esi # 0x948de7c
22: 85 f6 test %esi,%esi
24: 0f 85 8d 00 00 00 jne 0xb7
* 2a: 48 8b 44 24 30 mov 0x30(%rsp),%rax <-- trapping instruction
2f: 65 48 2b 05 d9 00 47 sub %gs:0xb4700d9(%rip),%rax # 0xb470110
36: 0b
37: 0f 85 ad 02 00 00 jne 0x2ea
3d: 48 rex.W
3e: 83 .byte 0x83
3f: c4 .byte 0xc4