==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0xfcd/0x1190 drivers/hid/hid-mcp2221.c:852
Read of size 1 at addr ffff88805cfb7fff by task swapper/0/0
CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.15.0-rc5-syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/29/2025
Call Trace:
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:408 [inline]
print_report+0xb4/0x290 mm/kasan/report.c:521
kasan_report+0x118/0x150 mm/kasan/report.c:634
mcp2221_raw_event+0xfcd/0x1190 drivers/hid/hid-mcp2221.c:852
__hid_input_report drivers/hid/hid-core.c:2117 [inline]
hid_input_report+0x407/0x520 drivers/hid/hid-core.c:2144
hid_irq_in+0x47e/0x6d0 drivers/hid/usbhid/hid-core.c:286
__usb_hcd_giveback_urb+0x417/0x690 drivers/usb/core/hcd.c:1650
dummy_timer+0x862/0x4550 drivers/usb/gadget/udc/dummy_hcd.c:1994
__run_hrtimer kernel/time/hrtimer.c:1761 [inline]
__hrtimer_run_queues+0x529/0xc60 kernel/time/hrtimer.c:1825
hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1842
handle_softirqs+0x283/0x870 kernel/softirq.c:579
__do_softirq kernel/softirq.c:613 [inline]
invoke_softirq kernel/softirq.c:453 [inline]
__irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:680
irq_exit_rcu+0x9/0x30 kernel/softirq.c:696
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1049
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:pv_native_safe_halt+0x13/0x20 arch/x86/kernel/paravirt.c:81
Code: cc cc cc cc cc cc cc 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 c3 ea 11 00 f3 0f 1e fa fb f4 cc cc cc cc cc cc cc cc cc cc cc cc 90 90 90 90 90 90 90 90 90
RSP: 0018:ffffffff8dc07d80 EFLAGS: 000002c6
RAX: 136f519b93a4ad00 RBX: ffffffff81974f28 RCX: 136f519b93a4ad00
RDX: 0000000000000001 RSI: ffffffff8d74aa77 RDI: ffffffff8bc1d1e0
RBP: ffffffff8dc07ec0 R08: ffff8880b8832b5b R09: 1ffff1101710656b
R10: dffffc0000000000 R11: ffffed101710656c R12: ffffffff8f7ed970
R13: 0000000000000000 R14: 0000000000000000 R15: 1ffffffff1b92a48
arch_safe_halt arch/x86/include/asm/paravirt.h:107 [inline]
default_idle+0x13/0x20 arch/x86/kernel/process.c:748
default_idle_call+0x74/0xb0 kernel/sched/idle.c:117
cpuidle_idle_call kernel/sched/idle.c:185 [inline]
do_idle+0x1e8/0x510 kernel/sched/idle.c:325
cpu_startup_entry+0x44/0x60 kernel/sched/idle.c:423
rest_init+0x2de/0x300 init/main.c:743
start_kernel+0x470/0x4f0 init/main.c:1099
x86_64_start_reservations+0x2a/0x30 arch/x86/kernel/head64.c:513
x86_64_start_kernel+0x66/0x70 arch/x86/kernel/head64.c:494
common_startup_64+0x13e/0x147
Allocated by task 4994:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:377 [inline]
__kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:394
kasan_kmalloc include/linux/kasan.h:260 [inline]
__kmalloc_cache_noprof+0x230/0x3d0 mm/slub.c:4358
kmalloc_noprof include/linux/slab.h:905 [inline]
audit_log_d_path+0xb5/0x190 kernel/audit.c:2149
audit_log_d_path_exe+0x42/0x70 kernel/audit.c:2219
audit_log_task+0x2b3/0x3c0 kernel/auditsc.c:2957
audit_seccomp+0x86/0x190 kernel/auditsc.c:3004
seccomp_log kernel/seccomp.c:1033 [inline]
__seccomp_filter+0x9aa/0x1a40 kernel/seccomp.c:1328
syscall_trace_enter+0xaa/0x160 kernel/entry/common.c:52
syscall_enter_from_user_mode_work include/linux/entry-common.h:169 [inline]
__do_fast_syscall_32+0x9b/0x110 arch/x86/entry/syscall_32.c:303
do_fast_syscall_32+0x34/0x80 arch/x86/entry/syscall_32.c:331
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
Freed by task 4994:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576
poison_slab_object mm/kasan/common.c:247 [inline]
__kasan_slab_free+0x62/0x70 mm/kasan/common.c:264
kasan_slab_free include/linux/kasan.h:233 [inline]
slab_free_hook mm/slub.c:2380 [inline]
slab_free mm/slub.c:4642 [inline]
kfree+0x193/0x440 mm/slub.c:4841
audit_log_d_path_exe+0x42/0x70 kernel/audit.c:2219
audit_log_task+0x2b3/0x3c0 kernel/auditsc.c:2957
audit_seccomp+0x86/0x190 kernel/auditsc.c:3004
seccomp_log kernel/seccomp.c:1033 [inline]
__seccomp_filter+0x9aa/0x1a40 kernel/seccomp.c:1328
syscall_trace_enter+0xaa/0x160 kernel/entry/common.c:52
syscall_enter_from_user_mode_work include/linux/entry-common.h:169 [inline]
__do_fast_syscall_32+0x9b/0x110 arch/x86/entry/syscall_32.c:303
do_fast_syscall_32+0x34/0x80 arch/x86/entry/syscall_32.c:331
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
The buggy address belongs to the object at ffff88805cfb4000
which belongs to the cache kmalloc-8k of size 8192
The buggy address is located 8191 bytes to the right of
allocated 8192-byte region [ffff88805cfb4000, ffff88805cfb6000)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5cfb0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88801a042280 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000020002 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88801a042280 dead000000000100 dead000000000122
head: 0000000000000000 0000000000020002 00000000f5000000 0000000000000000
head: 00fff00000000003 ffffea000173ec01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 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 5498, tgid 5498 (dhcpcd), ts 43208361470, free_ts 18643120660
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1718
prep_new_page mm/page_alloc.c:1726 [inline]
get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3688
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4970
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301
alloc_slab_page mm/slub.c:2450 [inline]
allocate_slab+0x8a/0x3b0 mm/slub.c:2618
new_slab mm/slub.c:2672 [inline]
___slab_alloc+0xbfc/0x1480 mm/slub.c:3858
__slab_alloc mm/slub.c:3948 [inline]
__slab_alloc_node mm/slub.c:4023 [inline]
slab_alloc_node mm/slub.c:4184 [inline]
__do_kmalloc_node mm/slub.c:4326 [inline]
__kvmalloc_node_noprof+0x411/0x5e0 mm/slub.c:5012
kvmalloc_array_node_noprof include/linux/slab.h:1065 [inline]
__ptr_ring_init_queue_alloc_noprof include/linux/ptr_ring.h:471 [inline]
ptr_ring_init_noprof include/linux/ptr_ring.h:489 [inline]
skb_array_init_noprof include/linux/skb_array.h:182 [inline]
pfifo_fast_init+0x363/0x6b0 net/sched/sch_generic.c:866
qdisc_create_dflt+0x11f/0x470 net/sched/sch_generic.c:1016
mq_init+0x2dc/0x660 net/sched/sch_mq.c:90
qdisc_create_dflt+0x11f/0x470 net/sched/sch_generic.c:1016
attach_default_qdiscs net/sched/sch_generic.c:1198 [inline]
dev_activate+0x1ce/0x1150 net/sched/sch_generic.c:1252
__dev_open+0x69c/0x880 net/core/dev.c:1638
__dev_change_flags+0x1ea/0x6d0 net/core/dev.c:9366
netif_change_flags+0x88/0x1a0 net/core/dev.c:9429
dev_change_flags+0x130/0x260 net/core/dev_api.c:68
page last free pid 1 tgid 1 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1262 [inline]
__free_frozen_pages+0xb0e/0xcd0 mm/page_alloc.c:2725
__free_pages mm/page_alloc.c:5080 [inline]
free_contig_range+0x159/0x440 mm/page_alloc.c:6936
destroy_args+0x86/0x460 mm/debug_vm_pgtable.c:1017
debug_vm_pgtable+0x3cf/0x410 mm/debug_vm_pgtable.c:1397
do_one_initcall+0x233/0x820 init/main.c:1257
do_initcall_level+0x137/0x1f0 init/main.c:1319
do_initcalls+0x69/0xd0 init/main.c:1335
kernel_init_freeable+0x3d9/0x570 init/main.c:1567
kernel_init+0x1d/0x1d0 init/main.c:1457
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:153
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Memory state around the buggy address:
ffff88805cfb7e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88805cfb7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88805cfb7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff88805cfb8000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88805cfb8080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: cc int3
1: cc int3
2: cc int3
3: cc int3
4: cc int3
5: cc int3
6: cc int3
7: 90 nop
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: f3 0f 1e fa endbr64
1b: 66 90 xchg %ax,%ax
1d: 0f 00 2d c3 ea 11 00 verw 0x11eac3(%rip) # 0x11eae7
24: f3 0f 1e fa endbr64
28: fb sti
29: f4 hlt
* 2a: c3 ret <-- trapping instruction
2b: cc int3
2c: cc int3
2d: cc int3
2e: cc int3
2f: cc int3
30: cc int3
31: cc int3
32: cc int3
33: cc int3
34: cc int3
35: cc int3
36: cc int3
37: 90 nop
38: 90 nop
39: 90 nop
3a: 90 nop
3b: 90 nop
3c: 90 nop
3d: 90 nop
3e: 90 nop
3f: 90 nop