==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0x1070/0x10a0 drivers/hid/hid-mcp2221.c:948
Read of size 1 at addr ffff88813754bfff by task udevd/24756
CPU: 1 UID: 0 PID: 24756 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+0x314/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+0x1809/0x3a00 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:lock_release+0x183/0x2f0 kernel/locking/lockdep.c:5893
Code: 0f c1 05 28 8a 38 0b 83 f8 01 0f 85 1d 01 00 00 9c 58 f6 c4 02 0f 85 08 01 00 00 41 f7 c5 00 02 00 00 74 01 fb 48 8b 44 24 10 <65> 48 2b 05 7d 4a 38 0b 0f 85 58 01 00 00 48 83 c4 18 5b 41 5c 41
RSP: 0018:ffffc9001252fd90 EFLAGS: 00000206
RAX: fc6ea9409a4b7500 RBX: ffff888113b72160 RCX: ffffc9001252fd9c
RDX: 0000000000000000 RSI: ffffffff88d07fe6 RDI: ffffffff878966e0
RBP: ffffffff81c6c113 R08: 7a63e2a507f03fd5 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff81c6c16b
R13: 0000000000000287 R14: ffff888114255700 R15: 0000000000000001
__might_fault mm/memory.c:6958 [inline]
__might_fault+0x154/0x190 mm/memory.c:6952
rseq_get_rseq_cs_ptr_val kernel/rseq.c:248 [inline]
rseq_get_rseq_cs kernel/rseq.c:270 [inline]
rseq_ip_fixup kernel/rseq.c:390 [inline]
__rseq_handle_notify_resume+0x177/0x10e0 kernel/rseq.c:438
rseq_handle_notify_resume include/linux/rseq.h:38 [inline]
resume_user_mode_work include/linux/resume_user_mode.h:62 [inline]
exit_to_user_mode_loop+0xb5/0xe0 kernel/entry/common.c:43
exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline]
ret_from_fork+0x5a9/0x700 arch/x86/kernel/process.c:157
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Allocated by task 12959:
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]
kzalloc_noprof include/linux/slab.h:1039 [inline]
rpc_mkpipe_data+0x49/0x460 net/sunrpc/rpc_pipe.c:514
rpc_pipefs_init_net+0x5b/0x140 net/sunrpc/rpc_pipe.c:1019
sunrpc_init_net+0xb7/0x190 net/sunrpc/sunrpc_syms.c:50
ops_init+0x1df/0x5f0 net/core/net_namespace.c:136
setup_net+0x10f/0x380 net/core/net_namespace.c:438
copy_net_ns+0x2a6/0x5f0 net/core/net_namespace.c:570
create_new_namespaces+0x3ea/0xa90 kernel/nsproxy.c:110
unshare_nsproxy_namespaces+0xc0/0x1f0 kernel/nsproxy.c:218
ksys_unshare+0x45b/0xa40 kernel/fork.c:3127
__do_sys_unshare kernel/fork.c:3198 [inline]
__se_sys_unshare kernel/fork.c:3196 [inline]
__x64_sys_unshare+0x31/0x40 kernel/fork.c:3196
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
The buggy address belongs to the object at ffff88813754bc00
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 711 bytes to the right of
allocated 312-byte region [ffff88813754bc00, ffff88813754bd38)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x137548
head: order:2 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 ffff888100041c80 0000000000000000 dead000000000001
raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 0200000000000040 ffff888100041c80 0000000000000000 dead000000000001
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 0200000000000002 ffffea0004dd5201 00000000ffffffff 00000000ffffffff
head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000004
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5232, tgid 5232 (udevd), ts 104869852610, free_ts 0
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]
__kmalloc_cache_noprof+0x209/0x3c0 mm/slub.c:4402
kmalloc_noprof include/linux/slab.h:905 [inline]
kzalloc_noprof include/linux/slab.h:1039 [inline]
kernfs_fop_open+0x244/0xda0 fs/kernfs/file.c:641
do_dentry_open+0x6d7/0x13a0 fs/open.c:965
vfs_open+0x82/0x3f0 fs/open.c:1095
do_open fs/namei.c:3887 [inline]
path_openat+0x1de4/0x2cb0 fs/namei.c:4046
do_filp_open+0x20b/0x470 fs/namei.c:4073
do_sys_openat2+0x11b/0x1d0 fs/open.c:1435
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/0x4d0 arch/x86/entry/syscall_64.c:94
page_owner free stack trace missing
Memory state around the buggy address:
ffff88813754be80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88813754bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88813754bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff88813754c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88813754c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: 0f c1 05 28 8a 38 0b xadd %eax,0xb388a28(%rip) # 0xb388a2f
7: 83 f8 01 cmp $0x1,%eax
a: 0f 85 1d 01 00 00 jne 0x12d
10: 9c pushf
11: 58 pop %rax
12: f6 c4 02 test $0x2,%ah
15: 0f 85 08 01 00 00 jne 0x123
1b: 41 f7 c5 00 02 00 00 test $0x200,%r13d
22: 74 01 je 0x25
24: fb sti
25: 48 8b 44 24 10 mov 0x10(%rsp),%rax
* 2a: 65 48 2b 05 7d 4a 38 sub %gs:0xb384a7d(%rip),%rax # 0xb384aaf <-- trapping instruction
31: 0b
32: 0f 85 58 01 00 00 jne 0x190
38: 48 83 c4 18 add $0x18,%rsp
3c: 5b pop %rbx
3d: 41 5c pop %r12
3f: 41 rex.B