==================================================================
BUG: KASAN: slab-out-of-bounds in mcp2221_raw_event+0xf94/0x1030 drivers/hid/hid-mcp2221.c:852
Read of size 1 at addr ffff8880361abfff by task syz-executor/5811
CPU: 1 UID: 0 PID: 5811 Comm: syz-executor Not tainted 6.15.0-rc6-syzkaller-00208-g3c21441eeffc #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/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:408 [inline]
print_report+0xc3/0x670 mm/kasan/report.c:521
kasan_report+0xe0/0x110 mm/kasan/report.c:634
mcp2221_raw_event+0xf94/0x1030 drivers/hid/hid-mcp2221.c:852
__hid_input_report.constprop.0+0x311/0x450 drivers/hid/hid-core.c:2117
hid_irq_in+0x35e/0x870 drivers/hid/usbhid/hid-core.c:286
__usb_hcd_giveback_urb+0x38d/0x6e0 drivers/usb/core/hcd.c:1650
usb_hcd_giveback_urb+0x39b/0x450 drivers/usb/core/hcd.c:1734
dummy_timer+0x180e/0x3a20 drivers/usb/gadget/udc/dummy_hcd.c:1994
__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+0x216/0x8e0 kernel/softirq.c:579
__do_softirq kernel/softirq.c:613 [inline]
invoke_softirq kernel/softirq.c:453 [inline]
__irq_exit_rcu+0x109/0x170 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+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1049
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:preempt_schedule_irq+0x4c/0x90 kernel/sched/core.c:7090
Code: df 55 65 48 8b 2d cc d2 35 08 53 48 89 eb 48 c1 eb 03 48 01 c3 bf 01 00 00 00 e8 5f f8 1a f6 e8 6a cd 54 f6 fb bf 01 00 00 00 af 99 ff ff 9c 58 fa f6 c4 02 75 1e bf 01 00 00 00 e8 ad a2 1a
RSP: 0018:ffffc90004dff708 EFLAGS: 00000206
RAX: 000000000011a72b RBX: ffffed1004c73488 RCX: 0000000000000006
RDX: 0000000000000000 RSI: ffffffff8dbe28e5 RDI: 0000000000000001
RBP: ffff88802639a440 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff90850017 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
irqentry_exit+0x36/0x90 kernel/entry/common.c:354
asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:707
RIP: 0010:orc_ip arch/x86/kernel/unwind_orc.c:80 [inline]
RIP: 0010:__orc_find+0x70/0xf0 arch/x86/kernel/unwind_orc.c:102
Code: ec 72 4e 4c 89 e2 48 29 ea 48 89 d6 48 c1 ea 3f 48 c1 fe 02 48 01 f2 48 d1 fa 48 8d 5c 95 00 48 89 da 48 c1 ea 03 0f b6 34 0a <48> 89 da 83 e2 07 83 c2 03 40 38 f2 7c 05 40 84 f6 75 4b 48 63 13
RSP: 0018:ffffc90004dff7d8 EFLAGS: 00000a06
RAX: ffffffff9150af88 RBX: ffffffff90baffa8 RCX: dffffc0000000000
RDX: 1ffffffff2175ff5 RSI: 0000000000000000 RDI: ffffffff90baffa8
RBP: ffffffff90baffa8 R08: ffffffff9150af8e R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000038cda R12: ffffffff90baffa8
R13: ffffffff848cda5c R14: ffffffff90baffa8 R15: ffffffff90baffa8
orc_find arch/x86/kernel/unwind_orc.c:227 [inline]
unwind_next_frame+0x2ec/0x20a0 arch/x86/kernel/unwind_orc.c:494
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
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:576
poison_slab_object mm/kasan/common.c:247 [inline]
__kasan_slab_free+0x51/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+0x2b6/0x4d0 mm/slub.c:4841
netlbl_secattr_destroy include/net/netlabel.h:367 [inline]
netlbl_secattr_free include/net/netlabel.h:399 [inline]
selinux_netlbl_sk_security_free+0x24d/0x3e0 security/selinux/netlabel.c:162
security_sk_free+0xd7/0x1a0 security/security.c:4873
sk_prot_free net/core/sock.c:2230 [inline]
__sk_destruct+0x572/0x980 net/core/sock.c:2332
sk_destruct+0xc2/0xf0 net/core/sock.c:2360
__sk_free+0xf4/0x3e0 net/core/sock.c:2371
sk_free+0x6a/0x90 net/core/sock.c:2382
sock_put include/net/sock.h:1944 [inline]
tcp_close+0xd3/0x120 net/ipv4/tcp.c:3251
inet_release+0x13c/0x280 net/ipv4/af_inet.c:435
__sock_release+0xb3/0x270 net/socket.c:647
sock_close+0x1c/0x30 net/socket.c:1391
__fput+0x402/0xb70 fs/file_table.c:465
fput_close_sync+0x118/0x260 fs/file_table.c:570
__do_sys_close fs/open.c:1581 [inline]
__se_sys_close fs/open.c:1566 [inline]
__x64_sys_close+0x8b/0x120 fs/open.c:1566
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f13b098d5ca
Code: 48 3d 00 f0 ff ff 77 48 c3 0f 1f 80 00 00 00 00 48 83 ec 18 89 7c 24 0c e8 43 91 02 00 8b 7c 24 0c 89 c2 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 36 89 d7 89 44 24 0c e8 a3 91 02 00 8b 44 24
RSP: 002b:00007ffe6581d690 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f13b098d5ca
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 00007ffe6581d6ec R08: 00007ffe6581cfdc R09: 0079746972756365
R10: 00007ffe6581d040 R11: 0000000000000293 R12: 0000000000000083
R13: 00000000000927c0 R14: 000000000004db06 R15: 00007ffe6581d740
Allocated by task 8374:
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:377 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:394
kmalloc_noprof include/linux/slab.h:905 [inline]
slab_free_hook mm/slub.c:2332 [inline]
slab_free mm/slub.c:4642 [inline]
kmem_cache_free+0x148/0x4d0 mm/slub.c:4744
anon_vma_free mm/rmap.c:137 [inline]
__put_anon_vma+0x114/0x3a0 mm/rmap.c:2756
put_anon_vma include/linux/rmap.h:117 [inline]
unlink_anon_vmas+0x58a/0x820 mm/rmap.c:444
free_pgtables+0x2d4/0x810 mm/memory.c:391
exit_mmap+0x3fb/0xb90 mm/mmap.c:1295
__mmput+0x12a/0x410 kernel/fork.c:1379
mmput+0x62/0x70 kernel/fork.c:1401
exit_mm kernel/exit.c:589 [inline]
do_exit+0x9d1/0x2c30 kernel/exit.c:940
do_group_exit+0xd3/0x2a0 kernel/exit.c:1102
get_signal+0x2673/0x26d0 kernel/signal.c:3034
arch_do_signal_or_restart+0x8f/0x7d0 arch/x86/kernel/signal.c:337
exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
syscall_exit_to_user_mode+0x150/0x2a0 kernel/entry/common.c:218
do_syscall_64+0xda/0x260 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 0:
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:247 [inline]
__kasan_slab_free+0x51/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+0x2b6/0x4d0 mm/slub.c:4841
slab_free_after_rcu_debug+0x69/0x350 mm/slub.c:4679
rcu_do_batch kernel/rcu/tree.c:2568 [inline]
rcu_core+0x79c/0x14e0 kernel/rcu/tree.c:2824
handle_softirqs+0x216/0x8e0 kernel/softirq.c:579
__do_softirq kernel/softirq.c:613 [inline]
invoke_softirq kernel/softirq.c:453 [inline]
__irq_exit_rcu+0x109/0x170 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+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1049
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
Last potentially related work creation:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_record_aux_stack+0xb8/0xd0 mm/kasan/generic.c:548
__call_rcu_common.constprop.0+0x9a/0x9f0 kernel/rcu/tree.c:3082
slab_free_hook mm/slub.c:2344 [inline]
slab_free mm/slub.c:4642 [inline]
kmem_cache_free+0x173/0x4d0 mm/slub.c:4744
anon_vma_free mm/rmap.c:137 [inline]
__put_anon_vma+0x114/0x3a0 mm/rmap.c:2756
put_anon_vma include/linux/rmap.h:117 [inline]
unlink_anon_vmas+0x58a/0x820 mm/rmap.c:444
free_pgtables+0x2d4/0x810 mm/memory.c:391
exit_mmap+0x3fb/0xb90 mm/mmap.c:1295
__mmput+0x12a/0x410 kernel/fork.c:1379
mmput+0x62/0x70 kernel/fork.c:1401
exit_mm kernel/exit.c:589 [inline]
do_exit+0x9d1/0x2c30 kernel/exit.c:940
do_group_exit+0xd3/0x2a0 kernel/exit.c:1102
get_signal+0x2673/0x26d0 kernel/signal.c:3034
arch_do_signal_or_restart+0x8f/0x7d0 arch/x86/kernel/signal.c:337
exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
syscall_exit_to_user_mode+0x150/0x2a0 kernel/entry/common.c:218
do_syscall_64+0xda/0x260 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff8880361abfc0
which belongs to the cache kmalloc-32 of size 32
The buggy address is located 31 bytes to the right of
allocated 32-byte region [ffff8880361abfc0, ffff8880361abfe0)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x361ab
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000000 ffff88801b441780 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000400040 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 0x52800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP), pid 5708, tgid 5708 (dhcpcd-run-hook), ts 49362259424, free_ts 49361244317
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1718
prep_new_page mm/page_alloc.c:1726 [inline]
get_page_from_freelist+0x135c/0x3920 mm/page_alloc.c:3688
__alloc_frozen_pages_noprof+0x263/0x23a0 mm/page_alloc.c:4970
alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2301
alloc_slab_page mm/slub.c:2450 [inline]
allocate_slab mm/slub.c:2618 [inline]
new_slab+0x244/0x340 mm/slub.c:2672
___slab_alloc+0xd9c/0x1940 mm/slub.c:3858
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3948
__slab_alloc_node mm/slub.c:4023 [inline]
slab_alloc_node mm/slub.c:4184 [inline]
__kmalloc_cache_noprof+0xfb/0x3e0 mm/slub.c:4353
kmalloc_noprof include/linux/slab.h:905 [inline]
slab_free_hook mm/slub.c:2332 [inline]
slab_free mm/slub.c:4642 [inline]
kmem_cache_free+0x148/0x4d0 mm/slub.c:4744
exit_mmap+0x511/0xb90 mm/mmap.c:1309
__mmput+0x12a/0x410 kernel/fork.c:1379
mmput+0x62/0x70 kernel/fork.c:1401
exec_mmap fs/exec.c:1009 [inline]
begin_new_exec+0x15a7/0x38b0 fs/exec.c:1264
load_elf_binary+0x88c/0x4eb0 fs/binfmt_elf.c:1002
search_binary_handler fs/exec.c:1778 [inline]
exec_binprm fs/exec.c:1810 [inline]
bprm_execve fs/exec.c:1862 [inline]
bprm_execve+0x8c3/0x1650 fs/exec.c:1838
do_execveat_common.isra.0+0x4a5/0x610 fs/exec.c:1968
page last free pid 5708 tgid 5708 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1262 [inline]
__free_frozen_pages+0x69d/0xff0 mm/page_alloc.c:2725
tlb_batch_list_free mm/mmu_gather.c:159 [inline]
tlb_finish_mmu+0x237/0x7b0 mm/mmu_gather.c:499
exit_mmap+0x403/0xb90 mm/mmap.c:1297
__mmput+0x12a/0x410 kernel/fork.c:1379
mmput+0x62/0x70 kernel/fork.c:1401
exec_mmap fs/exec.c:1009 [inline]
begin_new_exec+0x15a7/0x38b0 fs/exec.c:1264
load_elf_binary+0x88c/0x4eb0 fs/binfmt_elf.c:1002
search_binary_handler fs/exec.c:1778 [inline]
exec_binprm fs/exec.c:1810 [inline]
bprm_execve fs/exec.c:1862 [inline]
bprm_execve+0x8c3/0x1650 fs/exec.c:1838
do_execveat_common.isra.0+0x4a5/0x610 fs/exec.c:1968
do_execve fs/exec.c:2042 [inline]
__do_sys_execve fs/exec.c:2118 [inline]
__se_sys_execve fs/exec.c:2113 [inline]
__x64_sys_execve+0x8e/0xb0 fs/exec.c:2113
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff8880361abe80: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc
ffff8880361abf00: 00 00 00 00 fc fc fc fc 00 00 00 00 fc fc fc fc
>ffff8880361abf80: 00 00 00 00 fc fc fc fc fa fb fb fb fc fc fc fc
^
ffff8880361ac000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8880361ac080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: df 55 65 fists 0x65(%rbp)
3: 48 8b 2d cc d2 35 08 mov 0x835d2cc(%rip),%rbp # 0x835d2d6
a: 53 push %rbx
b: 48 89 eb mov %rbp,%rbx
e: 48 c1 eb 03 shr $0x3,%rbx
12: 48 01 c3 add %rax,%rbx
15: bf 01 00 00 00 mov $0x1,%edi
1a: e8 5f f8 1a f6 call 0xf61af87e
1f: e8 6a cd 54 f6 call 0xf654cd8e
24: fb sti
25: bf 01 00 00 00 mov $0x1,%edi
* 2a: e8 af 99 ff ff call 0xffff99de <-- trapping instruction
2f: 9c pushf
30: 58 pop %rax
31: fa cli
32: f6 c4 02 test $0x2,%ah
35: 75 1e jne 0x55
37: bf 01 00 00 00 mov $0x1,%edi
3c: e8 .byte 0xe8
3d: ad lods %ds:(%rsi),%eax
3e: a2 .byte 0xa2
3f: 1a .byte 0x1a