==================================================================
BUG: KASAN: use-after-free in mcp2221_raw_event+0x103c/0x10a0 drivers/hid/hid-mcp2221.c:950
Read of size 1 at addr ffff88810e2abfff by task swapper/0/0
CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026
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/0x1e0 mm/kasan/report.c:595
mcp2221_raw_event+0x103c/0x10a0 drivers/hid/hid-mcp2221.c:950
__hid_input_report.constprop.0+0x314/0x460 drivers/hid/hid-core.c:2140
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+0xda1/0x36c0 drivers/usb/gadget/udc/dummy_hcd.c:2005
__run_hrtimer kernel/time/hrtimer.c:1785 [inline]
__hrtimer_run_queues+0x50e/0xa70 kernel/time/hrtimer.c:1849
hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1866
handle_softirqs+0x1de/0x9d0 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:pv_native_safe_halt+0xf/0x20 arch/x86/kernel/paravirt.c:63
Code: ce b0 01 e9 53 e8 02 00 0f 1f 00 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 33 87 1c 00 fb f4 cc cc cc cc 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90
RSP: 0018:ffffffff89407e10 EFLAGS: 00000246
RAX: 000000000022418d RBX: ffffffff8942ea40 RCX: ffffffff8769f8d5
RDX: 0000000000000000 RSI: ffffffff89024e74 RDI: ffffffff87afd320
RBP: 0000000000000000 R08: 0000000000000001 R09: ffffed103eac672d
R10: ffff8881f563396b R11: 0000000000000000 R12: 0000000000000000
R13: fffffbfff1285d48 R14: 0000000000000000 R15: ffffffff8af01fd0
arch_safe_halt arch/x86/include/asm/paravirt.h:73 [inline]
default_idle+0x9/0x10 arch/x86/kernel/process.c:767
default_idle_call+0x6c/0xb0 kernel/sched/idle.c:122
cpuidle_idle_call kernel/sched/idle.c:199 [inline]
do_idle+0x464/0x590 kernel/sched/idle.c:352
cpu_startup_entry+0x4f/0x60 kernel/sched/idle.c:451
rest_init+0x251/0x260 init/main.c:760
start_kernel+0x47a/0x480 init/main.c:1210
x86_64_start_reservations+0x24/0x30 arch/x86/kernel/head64.c:310
x86_64_start_kernel+0x12b/0x130 arch/x86/kernel/head64.c:291
common_startup_64+0x13e/0x148
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10e2ab
flags: 0x200000000000000(node=0|zone=2)
raw: 0200000000000000 0000000000000000 00000000ffffffff 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4893, tgid 4893 (modprobe), ts 96848209805, free_ts 142214239258
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x153/0x170 mm/page_alloc.c:1889
prep_new_page mm/page_alloc.c:1897 [inline]
get_page_from_freelist+0xf10/0x39f0 mm/page_alloc.c:3962
__alloc_frozen_pages_noprof+0x273/0x2860 mm/page_alloc.c:5250
alloc_slab_page mm/slub.c:3292 [inline]
allocate_slab mm/slub.c:3481 [inline]
new_slab+0xa6/0x6c0 mm/slub.c:3539
refill_objects+0x26b/0x400 mm/slub.c:7175
refill_sheaf mm/slub.c:2812 [inline]
__prefill_sheaf_pfmemalloc+0x5f/0xb0 mm/slub.c:4936
kmem_cache_prefill_sheaf+0x1ba/0x4c0 mm/slub.c:5025
mt_get_sheaf lib/maple_tree.c:189 [inline]
mas_alloc_nodes+0x2c3/0x390 lib/maple_tree.c:1140
mas_preallocate+0x39c/0xf10 lib/maple_tree.c:5194
vma_iter_prealloc mm/vma.h:568 [inline]
__mmap_new_vma mm/vma.c:2526 [inline]
__mmap_region+0x11c9/0x26e0 mm/vma.c:2759
mmap_region+0x180/0x3e0 mm/vma.c:2837
do_mmap+0xc53/0x12d0 mm/mmap.c:559
vm_mmap_pgoff+0x201/0x390 mm/util.c:581
ksys_mmap_pgoff+0xe1/0x650 mm/mmap.c:605
__do_sys_mmap arch/x86/kernel/sys_x86_64.c:89 [inline]
__se_sys_mmap arch/x86/kernel/sys_x86_64.c:82 [inline]
__x64_sys_mmap+0x125/0x190 arch/x86/kernel/sys_x86_64.c:82
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x106/0x7b0 arch/x86/entry/syscall_64.c:94
page last free pid 5405 tgid 5405 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1433 [inline]
__free_frozen_pages+0x7b1/0xfb0 mm/page_alloc.c:2978
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x47/0xe0 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x4e/0x70 mm/kasan/common.c:350
kasan_slab_alloc include/linux/kasan.h:253 [inline]
slab_post_alloc_hook mm/slub.c:4538 [inline]
slab_alloc_node mm/slub.c:4866 [inline]
kmem_cache_alloc_lru_noprof+0x2ec/0x6b0 mm/slub.c:4885
__d_alloc+0x34/0xa80 fs/dcache.c:1740
d_alloc_parallel+0x111/0x14e0 fs/dcache.c:2604
lookup_open.isra.0+0x57c/0x11b0 fs/namei.c:4404
open_last_lookups fs/namei.c:4589 [inline]
path_openat+0x2291/0x31a0 fs/namei.c:4833
do_file_open+0x20e/0x430 fs/namei.c:4865
do_sys_openat2+0x10d/0x1e0 fs/open.c:1366
do_sys_open fs/open.c:1372 [inline]
__do_sys_openat fs/open.c:1388 [inline]
__se_sys_openat fs/open.c:1383 [inline]
__x64_sys_openat+0x12d/0x210 fs/open.c:1383
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x106/0x7b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88810e2abe80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88810e2abf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88810e2abf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88810e2ac000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88810e2ac080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess), 1 bytes skipped:
0: b0 01 mov $0x1,%al
2: e9 53 e8 02 00 jmp 0x2e85a
7: 0f 1f 00 nopl (%rax)
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: 90 nop
18: 90 nop
19: 90 nop
1a: f3 0f 1e fa endbr64
1e: 66 90 xchg %ax,%ax
20: 0f 00 2d 33 87 1c 00 verw 0x1c8733(%rip) # 0x1c875a
27: fb sti
28: f4 hlt
* 29: c3 ret <-- trapping instruction
2a: cc int3
2b: cc int3
2c: cc int3
2d: cc int3
2e: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1)
35: 00 00 00
38: 66 90 xchg %ax,%ax
3a: 90 nop
3b: 90 nop
3c: 90 nop
3d: 90 nop
3e: 90 nop