==================================================================
BUG: KASAN: use-after-free in mcp2221_raw_event+0x101c/0x1090 drivers/hid/hid-mcp2221.c:964
Read of size 1 at addr ffff88811abf3fff by task syz.1.4246/24993
CPU: 1 UID: 0 PID: 24993 Comm: syz.1.4246 Not tainted syzkaller #0 PREEMPT(lazy)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/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+0x1dd/0x9e0 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0x160/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+0x8f/0xb0 arch/x86/kernel/apic/apic.c:1061
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:rcu_is_watching_curr_cpu include/linux/context_tracking.h:128 [inline]
RIP: 0010:rcu_is_watching+0xd/0xc0 kernel/rcu/tree.c:752
Code: 81 e8 37 f1 80 00 e9 49 ff ff ff 66 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 55 53 65 ff 05 03 00 60 0b ae 6c d6 05 48 c7 c3 e8 e9 f8 8c 89 c5 83 f8 07 0f 87 82 00 00
RSP: 0018:ffffc90000577ce0 EFLAGS: 00000283
RAX: 0000000000000104 RBX: 0000000000000001 RCX: ffffc90002a93000
RDX: 0000000000080000 RSI: ffffffff819f0bab RDI: ffff888141255940
RBP: ffffc90000577d58 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000001
R13: 0000000000000000 R14: 000000000bebc200 R15: dffffc0000000000
trace_hrtimer_setup+0x1c0/0x230 include/trace/events/timer.h:193
debug_setup_on_stack kernel/time/hrtimer.c:523 [inline]
hrtimer_setup_sleeper_on_stack kernel/time/hrtimer.c:2260 [inline]
hrtimer_nanosleep+0xad/0x350 kernel/time/hrtimer.c:2337
common_nsleep+0xa1/0xd0 kernel/time/posix-timers.c:1345
__do_sys_clock_nanosleep kernel/time/posix-timers.c:1391 [inline]
__se_sys_clock_nanosleep kernel/time/posix-timers.c:1368 [inline]
__x64_sys_clock_nanosleep+0x336/0x480 kernel/time/posix-timers.c:1368
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x10b/0x7f0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f8ed83ed68e
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:00007f8ed6e7df38 EFLAGS: 00000246 ORIG_RAX: 00000000000000e6
RAX: ffffffffffffffda RBX: 00007f8ed6e7f6c0 RCX: 00007f8ed83ed68e
RDX: 00007f8ed6e7df90 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000200000000140
R13: 0000000000000000 R14: 00007f8ed86a5fa0 R15: 00007ffdb935ad48
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88811abf3ee0 pfn:0x11abf3
flags: 0x200000000000000(node=0|zone=2)
page_type: f0(buddy)
raw: 0200000000000000 ffffea0004d73148 ffffea00044b4dc8 0000000000000000
raw: ffff88811abf3ee0 0000000000000000 00000000f0000000 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 5267, tgid 5267 (udevd), ts 570980588631, free_ts 787547470610
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1853
prep_new_page mm/page_alloc.c:1861 [inline]
get_page_from_freelist+0x20a5/0x3850 mm/page_alloc.c:3941
__alloc_frozen_pages_noprof+0x273/0x28a0 mm/page_alloc.c:5221
__alloc_pages_noprof mm/page_alloc.c:5255 [inline]
alloc_pages_bulk_noprof+0x616/0x1160 mm/page_alloc.c:5175
___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/0x7c70 kernel/fork.c:2090
kernel_clone+0x176/0x9e0 kernel/fork.c:2722
__do_sys_clone+0xd9/0x120 kernel/fork.c:2863
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x10b/0x7f0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 5234 tgid 5234 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1397 [inline]
__free_frozen_pages+0x6d8/0xf60 mm/page_alloc.c:2938
kasan_depopulate_vmalloc_pte+0x5d/0x80 mm/kasan/shadow.c:484
apply_to_pte_range mm/memory.c:3338 [inline]
apply_to_pmd_range mm/memory.c:3382 [inline]
apply_to_pud_range mm/memory.c:3418 [inline]
apply_to_p4d_range mm/memory.c:3454 [inline]
__apply_to_page_range+0xb1d/0x1520 mm/memory.c:3490
__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+0x69a/0xc80 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:
ffff88811abf3e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88811abf3f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88811abf3f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88811abf4000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88811abf4080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: 81 e8 37 f1 80 00 sub $0x80f137,%eax
6: e9 49 ff ff ff jmp 0xffffff54
b: 66 90 xchg %ax,%ax
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: 90 nop
1b: 90 nop
1c: 90 nop
1d: f3 0f 1e fa endbr64
21: 55 push %rbp
22: 53 push %rbx
23: 65 ff 05 03 00 60 0b incl %gs:0xb600003(%rip) # 0xb60002d
* 2a: e8 ae 6c d6 05 call 0x5d66cdd <-- trapping instruction
2f: 48 c7 c3 e8 e9 f8 8c mov $0xffffffff8cf8e9e8,%rbx
36: 89 c5 mov %eax,%ebp
38: 83 f8 07 cmp $0x7,%eax
3b: 0f .byte 0xf
3c: 87 .byte 0x87
3d: 82 (bad)