==================================================================
BUG: KASAN: use-after-free in mcp2221_raw_event+0x101c/0x1090 drivers/hid/hid-mcp2221.c:964
Read of size 1 at addr ffff8880353a3fff by task udevd/5883
CPU: 0 UID: 0 PID: 5883 Comm: udevd Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/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+0x13d/0x4b0 mm/kasan/report.c:482
kasan_report+0xdf/0x1d0 mm/kasan/report.c:595
mcp2221_raw_event+0x101c/0x1090 drivers/hid/hid-mcp2221.c:964
__hid_input_report.constprop.0+0x319/0x470 drivers/hid/hid-core.c:2161
hid_irq_in+0x55d/0x710 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:1930 [inline]
__hrtimer_run_queues+0x470/0xa00 kernel/time/hrtimer.c:1994
hrtimer_run_softirq+0x17d/0x2c0 kernel/time/hrtimer.c:2011
handle_softirqs+0x1ea/0xa00 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0x162/0x210 kernel/softirq.c:735
irq_exit_rcu+0x9/0x30 kernel/softirq.c:752
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1061 [inline]
sysvec_apic_timer_interrupt+0xa3/0xc0 arch/x86/kernel/apic/apic.c:1061
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:debug_lockdep_rcu_enabled+0xe/0x40 kernel/rcu/update.c:320
Code: fa ff ff 8b 44 24 04 eb aa 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 8b 05 22 20 4d 05 85 c0 74 20 <8b> 05 c0 52 4d 05 85 c0 74 16 65 48 8b 05 e8 5d 80 08 8b 80 8c 0b
RSP: 0018:ffffc900042c7810 EFLAGS: 00000202
RAX: 0000000000000002 RBX: 000000000000000d RCX: ffff88801c6a9880
RDX: ffff88802039a500 RSI: ffffffff8b8311a5 RDI: ffff88802039a500
RBP: 0000000000000001 R08: 0000000000000004 R09: 000000000000000d
R10: 0000000000000010 R11: 0000000000000000 R12: 0000000000000000
R13: 000000000000000f R14: dffffc0000000000 R15: ffff88801c6a9870
mt_slot lib/maple_tree.c:715 [inline]
mas_slot lib/maple_tree.c:748 [inline]
mas_validate_limits lib/maple_tree.c:6861 [inline]
mt_validate+0xf7c/0x31e0 lib/maple_tree.c:6947
validate_mm+0xa8/0x4e0 mm/vma.c:652
mmap_region+0x38d/0x620 mm/vma.c:2863
do_mmap+0xc63/0x12f0 mm/mmap.c:560
vm_mmap_pgoff+0x29e/0x470 mm/util.c:581
ksys_mmap_pgoff+0xe4/0x610 mm/mmap.c:606
__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+0x10b/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f12fe31d822
Code: 00 00 00 0f 1f 44 00 00 41 f7 c1 ff 0f 00 00 75 27 55 89 cd 53 48 89 fb 48 85 ff 74 3b 41 89 ea 48 89 df b8 09 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 76 5b 5d c3 0f 1f 00 48 8b 05 a1 35 0d 00 64
RSP: 002b:00007fffa5afc1e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f12fe31d822
RDX: 0000000000000003 RSI: 0000000000000200 RDI: 0000000000000000
RBP: 0000000000000022 R08: 00000000ffffffff R09: 0000000000000000
R10: 0000000000000022 R11: 0000000000000246 R12: 0000000000000000
R13: 0000003e7fff7e00 R14: 00005649e037a3f0 R15: 0000000000001000
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x353a3
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 dead000000000100 dead000000000122 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 0, migratetype Unmovable, gfp_mask 0xcc0(GFP_KERNEL), pid 12688, tgid 12688 (syz.4.1865), ts 819946247190, free_ts 829831325647
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x153/0x170 mm/page_alloc.c:1858
prep_new_page mm/page_alloc.c:1866 [inline]
get_page_from_freelist+0x11a6/0x33b0 mm/page_alloc.c:3946
__alloc_frozen_pages_noprof+0x27c/0x2bc0 mm/page_alloc.c:5226
__alloc_pages_noprof mm/page_alloc.c:5260 [inline]
alloc_pages_bulk_noprof+0x657/0x1390 mm/page_alloc.c:5180
___alloc_pages_bulk mm/kasan/shadow.c:345 [inline]
__kasan_populate_vmalloc_do mm/kasan/shadow.c:370 [inline]
__kasan_populate_vmalloc+0xf0/0x210 mm/kasan/shadow.c:424
kasan_populate_vmalloc include/linux/kasan.h:580 [inline]
alloc_vmap_area+0x95d/0x2b70 mm/vmalloc.c:2123
__get_vm_area_node+0x1ca/0x330 mm/vmalloc.c:3226
__vmalloc_node_range_noprof+0x228/0x1630 mm/vmalloc.c:4024
__vmalloc_node_noprof+0xad/0xf0 mm/vmalloc.c:4124
alloc_thread_stack_node kernel/fork.c:357 [inline]
dup_task_struct kernel/fork.c:926 [inline]
copy_process+0x7fb/0x7ed0 kernel/fork.c:2090
kernel_clone+0x12e/0x9c0 kernel/fork.c:2721
__do_sys_clone3+0x214/0x290 kernel/fork.c:3025
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x10b/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 806 tgid 806 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1402 [inline]
__free_frozen_pages+0x747/0x1040 mm/page_alloc.c:2943
kasan_depopulate_vmalloc_pte+0x5d/0x80 mm/kasan/shadow.c:484
apply_to_pte_range mm/memory.c:3322 [inline]
apply_to_pmd_range mm/memory.c:3366 [inline]
apply_to_pud_range mm/memory.c:3402 [inline]
apply_to_p4d_range mm/memory.c:3438 [inline]
__apply_to_page_range+0xb1d/0x1520 mm/memory.c:3474
__kasan_release_vmalloc+0xd7/0xe0 mm/kasan/shadow.c:602
kasan_release_vmalloc include/linux/kasan.h:593 [inline]
kasan_release_vmalloc_node mm/vmalloc.c:2284 [inline]
purge_vmap_node+0x210/0xb40 mm/vmalloc.c:2306
__purge_vmap_area_lazy+0x91b/0xc00 mm/vmalloc.c:2396
drain_vmap_area_work+0x27/0x40 mm/vmalloc.c:2430
process_one_work+0xa0e/0x1980 kernel/workqueue.c:3314
process_scheduled_works kernel/workqueue.c:3397 [inline]
worker_thread+0x5ef/0xe50 kernel/workqueue.c:3478
kthread+0x370/0x450 kernel/kthread.c:436
ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Memory state around the buggy address:
ffff8880353a3e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8880353a3f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8880353a3f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff8880353a4000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8880353a4080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess), 2 bytes skipped:
0: ff 8b 44 24 04 eb decl -0x14fbdbbc(%rbx)
6: aa stos %al,%es:(%rdi)
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: 8b 05 22 20 4d 05 mov 0x54d2022(%rip),%eax # 0x54d2046
24: 85 c0 test %eax,%eax
26: 74 20 je 0x48
* 28: 8b 05 c0 52 4d 05 mov 0x54d52c0(%rip),%eax # 0x54d52ee <-- trapping instruction
2e: 85 c0 test %eax,%eax
30: 74 16 je 0x48
32: 65 48 8b 05 e8 5d 80 mov %gs:0x8805de8(%rip),%rax # 0x8805e22
39: 08
3a: 8b .byte 0x8b
3b: 80 .byte 0x80
3c: 8c 0b mov %cs,(%rbx)