==================================================================
BUG: KASAN: use-after-free in mcp2221_raw_event+0x103c/0x10a0 drivers/hid/hid-mcp2221.c:948
Read of size 1 at addr ffff888140dd7fff by task syz.1.2245/13322
CPU: 0 UID: 0 PID: 13322 Comm: syz.1.2245 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+0x100/0x190 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0x156/0x4c9 mm/kasan/report.c:482
kasan_report+0xdf/0x1a0 mm/kasan/report.c:595
mcp2221_raw_event+0x103c/0x10a0 drivers/hid/hid-mcp2221.c:948
__hid_input_report.constprop.0+0x314/0x460 drivers/hid/hid-core.c:2139
hid_irq_in+0x52e/0x6b0 drivers/hid/usbhid/hid-core.c:286
__usb_hcd_giveback_urb+0x38d/0x610 drivers/usb/core/hcd.c:1657
usb_hcd_giveback_urb+0x3ca/0x4a0 drivers/usb/core/hcd.c:1741
dummy_timer+0xd85/0x3670 drivers/usb/gadget/udc/dummy_hcd.c:1995
__run_hrtimer kernel/time/hrtimer.c:1777 [inline]
__hrtimer_run_queues+0x516/0x990 kernel/time/hrtimer.c:1841
hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1858
handle_softirqs+0x1dd/0x8f0 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0xed/0x150 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+0x8f/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+0x5e/0x330 kernel/locking/lockdep.c:5872
Code: 05 7b 34 3d 0b 83 f8 07 0f 87 a4 02 00 00 48 0f a3 05 06 a8 3e 09 0f 82 6f 02 00 00 8b 35 9e b4 3e 09 85 f6 0f 85 8a 00 00 00 <48> 8b 44 24 30 65 48 2b 05 1d 34 3d 0b 0f 85 b8 02 00 00 48 83 c4
RSP: 0018:ffffc90013c9f838 EFLAGS: 00000206
RAX: 0000000000000046 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff88dcb9c1 RDI: ffffffff878e97a0
RBP: ffffffff894da3a0 R08: 0000000086db7919 R09: 0000000000000007
R10: 0000000000000200 R11: 0000000000000000 R12: 0000000000000002
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
rcu_lock_acquire include/linux/rcupdate.h:331 [inline]
rcu_read_lock include/linux/rcupdate.h:867 [inline]
class_rcu_constructor include/linux/rcupdate.h:1195 [inline]
unwind_next_frame+0xd1/0x1ea0 arch/x86/kernel/unwind_orc.c:495
__unwind_start+0x3d1/0x7f0 arch/x86/kernel/unwind_orc.c:773
unwind_start arch/x86/include/asm/unwind.h:64 [inline]
arch_stack_walk+0x73/0xf0 arch/x86/kernel/stacktrace.c:24
stack_trace_save+0x8e/0xc0 kernel/stacktrace.c:122
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:253 [inline]
__kasan_slab_free+0x43/0x70 mm/kasan/common.c:285
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2540 [inline]
slab_free mm/slub.c:6670 [inline]
kmem_cache_free+0x124/0x6d0 mm/slub.c:6781
putname+0xf5/0x1a0 fs/namei.c:297
__free_putname include/linux/fs.h:2512 [inline]
do_sys_openat2+0x181/0x220 fs/open.c:1419
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+0x12d/0x210 fs/open.c:1447
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xc9/0x570 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fb93b1cb78e
Code: 08 0f 85 a5 a8 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 48 83 ec 08
RSP: 002b:00007fb939c64ea8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fb939c676c0 RCX: 00007fb93b1cb78e
RDX: 0000000000000002 RSI: 00007fb93b274178 RDI: ffffffffffffff9c
RBP: 00007fb93b278c1f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000002d
R13: 0000200000000100 R14: 0000000000000000 R15: 00007fff74114a08
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x140dd7
flags: 0x200000000000000(node=0|zone=2)
raw: 0200000000000000 ffffea0004508c88 ffffea0004f38548 0000000000000000
raw: 0000000000000000 ffff888103efbae0 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x440dc0(GFP_KERNEL_ACCOUNT|__GFP_ZERO|__GFP_COMP), pid 13221, tgid 13220 (syz.2.2216), ts 1137767538146, free_ts 1140394345869
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1e1/0x250 mm/page_alloc.c:1884
prep_new_page mm/page_alloc.c:1892 [inline]
get_page_from_freelist+0xd57/0x3b20 mm/page_alloc.c:3945
__alloc_frozen_pages_noprof+0x269/0x2230 mm/page_alloc.c:5240
alloc_pages_mpol+0xe8/0x410 mm/mempolicy.c:2486
alloc_frozen_pages_noprof mm/mempolicy.c:2557 [inline]
alloc_pages_noprof+0x131/0x390 mm/mempolicy.c:2577
pagetable_alloc_noprof include/linux/mm.h:3190 [inline]
__pte_alloc_one_noprof include/asm-generic/pgalloc.h:76 [inline]
pte_alloc_one+0x1e/0x3e0 arch/x86/mm/pgtable.c:18
__pte_alloc+0x6d/0x3f0 mm/memory.c:453
do_anonymous_page mm/memory.c:5190 [inline]
do_pte_missing mm/memory.c:4399 [inline]
handle_pte_fault mm/memory.c:6273 [inline]
__handle_mm_fault+0x21a7/0x2d30 mm/memory.c:6411
handle_mm_fault+0x36d/0xa20 mm/memory.c:6580
do_user_addr_fault+0x5ae/0x11d0 arch/x86/mm/fault.c:1336
handle_page_fault arch/x86/mm/fault.c:1476 [inline]
exc_page_fault+0x66/0xc0 arch/x86/mm/fault.c:1532
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:618
page last free pid 14 tgid 14 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1433 [inline]
__free_frozen_pages+0x7d1/0x1010 mm/page_alloc.c:2973
__pagetable_free include/linux/mm.h:3200 [inline]
pagetable_free include/linux/mm.h:3224 [inline]
pagetable_dtor_free include/linux/mm.h:3328 [inline]
__tlb_remove_table include/asm-generic/tlb.h:220 [inline]
__tlb_remove_table_free mm/mmu_gather.c:227 [inline]
tlb_remove_table_rcu+0x2b2/0x390 mm/mmu_gather.c:290
rcu_do_batch kernel/rcu/tree.c:2605 [inline]
rcu_core+0x7c0/0x15c0 kernel/rcu/tree.c:2857
handle_softirqs+0x1dd/0x8f0 kernel/softirq.c:622
run_ksoftirqd kernel/softirq.c:1063 [inline]
run_ksoftirqd+0x38/0x60 kernel/softirq.c:1055
smpboot_thread_fn+0x3d3/0xaa0 kernel/smpboot.c:160
kthread+0x3b3/0x730 kernel/kthread.c:463
ret_from_fork+0x6c3/0xa20 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
Memory state around the buggy address:
ffff888140dd7e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff888140dd7f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff888140dd7f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff888140dd8000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888140dd8080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: 05 7b 34 3d 0b add $0xb3d347b,%eax
5: 83 f8 07 cmp $0x7,%eax
8: 0f 87 a4 02 00 00 ja 0x2b2
e: 48 0f a3 05 06 a8 3e bt %rax,0x93ea806(%rip) # 0x93ea81c
15: 09
16: 0f 82 6f 02 00 00 jb 0x28b
1c: 8b 35 9e b4 3e 09 mov 0x93eb49e(%rip),%esi # 0x93eb4c0
22: 85 f6 test %esi,%esi
24: 0f 85 8a 00 00 00 jne 0xb4
* 2a: 48 8b 44 24 30 mov 0x30(%rsp),%rax <-- trapping instruction
2f: 65 48 2b 05 1d 34 3d sub %gs:0xb3d341d(%rip),%rax # 0xb3d3454
36: 0b
37: 0f 85 b8 02 00 00 jne 0x2f5
3d: 48 rex.W
3e: 83 .byte 0x83
3f: c4 .byte 0xc4