==================================================================
BUG: KASAN: use-after-free in mcp2221_raw_event+0x110d/0x1140 drivers/hid/hid-mcp2221.c:975
Read of size 1 at addr ffff8880571b3fff by task syz.1.1810/13146
CPU: 1 UID: 0 PID: 13146 Comm: syz.1.1810 Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/05/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/0x1c0 mm/kasan/report.c:595
mcp2221_raw_event+0x110d/0x1140 drivers/hid/hid-mcp2221.c:975
__hid_input_report.constprop.0+0x319/0x470 drivers/hid/hid-core.c:2175
hid_irq_in+0x55d/0x710 drivers/hid/usbhid/hid-core.c:287
__usb_hcd_giveback_urb+0x38e/0x610 drivers/usb/core/hcd.c:1657
usb_hcd_giveback_urb+0x3ca/0x4a0 drivers/usb/core/hcd.c:1741
dummy_timer+0xdb2/0x3700 drivers/usb/gadget/udc/dummy_hcd.c:2019
__run_hrtimer kernel/time/hrtimer.c:2067 [inline]
__hrtimer_run_queues+0x462/0x9c0 kernel/time/hrtimer.c:2124
hrtimer_run_softirq+0x1ca/0x360 kernel/time/hrtimer.c:2141
handle_softirqs+0x1e6/0x9d0 kernel/softirq.c:645
__do_softirq kernel/softirq.c:679 [inline]
invoke_softirq kernel/softirq.c:519 [inline]
__irq_exit_rcu+0x194/0x210 kernel/softirq.c:767
irq_exit_rcu+0x9/0x30 kernel/softirq.c:784
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline]
sysvec_apic_timer_interrupt+0xa3/0xc0 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
RIP: 0010:rep_movs_alternative+0xb/0xa0 arch/x86/lib/copy_user_64.S:42
Code: 24 08 48 83 c4 10 c3 cc cc cc cc 0f 1f 40 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 48 83 f9 40 73 44 83 f9 08 73 25 <85> c9 74 0f 8a 06 88 07 48 ff c7 48 ff c6 48 ff c9 75 f1 c3 cc cc
RSP: 0018:ffffc90004457d00 EFLAGS: 00040297
RAX: 0000000000000001 RBX: 0000000000000004 RCX: 0000000000000004
RDX: 0000000000000001 RSI: ffffc90004457dc0 RDI: 0000200000000300
RBP: 0000200000000300 R08: 0000000000000000 R09: fffff5200088afb8
R10: 0000000000000003 R11: 0000000000000000 R12: ffffc90004457dc0
R13: 0000200000000304 R14: 00007ffffffff000 R15: 0000000000000000
copy_user_generic arch/x86/include/asm/uaccess_64.h:126 [inline]
raw_copy_to_user arch/x86/include/asm/uaccess_64.h:147 [inline]
_inline_copy_to_user include/linux/uaccess.h:202 [inline]
_copy_to_user+0xa4/0xd0 lib/usercopy.c:24
copy_to_user include/linux/uaccess.h:230 [inline]
do_timer_create+0x6d9/0x1460 kernel/time/posix-timers.c:533
__do_sys_timer_create kernel/time/posix-timers.c:585 [inline]
__se_sys_timer_create kernel/time/posix-timers.c:574 [inline]
__x64_sys_timer_create+0x199/0x1d0 kernel/time/posix-timers.c:574
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f8eccb9e159
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f8ecd9b6028 EFLAGS: 00000246 ORIG_RAX: 00000000000000de
RAX: ffffffffffffffda RBX: 00007f8ecce25fa0 RCX: 00007f8eccb9e159
RDX: 0000200000000300 RSI: 0000000000000000 RDI: 0000000000000002
RBP: 00007f8eccc35024 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f8ecce26038 R14: 00007f8ecce25fa0 R15: 00007ffe99aff7b8
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x200000000 pfn:0x571b3
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 dead000000000100 dead000000000122 0000000000000000
raw: 0000000200000000 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 12336, tgid 12335 (syz.1.1570), ts 557447818039
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1871
prep_new_page mm/page_alloc.c:1879 [inline]
get_page_from_freelist+0x110d/0x35b0 mm/page_alloc.c:3943
__alloc_frozen_pages_noprof+0x2eb/0x3300 mm/page_alloc.c:5436
__alloc_pages_noprof mm/page_alloc.c:5471 [inline]
alloc_pages_bulk_noprof+0x5e1/0x13c0 mm/page_alloc.c:5295
___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/0x2bb0 mm/vmalloc.c:2145
__get_vm_area_node+0x1ed/0x350 mm/vmalloc.c:3248
get_vm_area_caller+0x71/0xa0 mm/vmalloc.c:3299
vmap+0x132/0x2e0 mm/vmalloc.c:3582
xdp_umem_addr_map net/xdp/xdp_umem.c:49 [inline]
xdp_umem_reg net/xdp/xdp_umem.c:238 [inline]
xdp_umem_create+0xd1b/0x1200 net/xdp/xdp_umem.c:267
xsk_setsockopt+0x7d8/0xab0 net/xdp/xsk.c:1878
do_sock_setsockopt+0xf3/0x1d0 net/socket.c:2397
__sys_setsockopt+0x195/0x220 net/socket.c:2422
__do_sys_setsockopt net/socket.c:2428 [inline]
__se_sys_setsockopt net/socket.c:2425 [inline]
__x64_sys_setsockopt+0xbd/0x160 net/socket.c:2425
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 5748 tgid 5748 ts 588585817057 stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
__free_pages_prepare mm/page_alloc.c:1418 [inline]
__free_frozen_pages+0x79f/0x10f0 mm/page_alloc.c:2962
kasan_depopulate_vmalloc_pte+0x5d/0x80 mm/kasan/shadow.c:484
apply_to_pte_range mm/memory.c:3470 [inline]
apply_to_pmd_range mm/memory.c:3514 [inline]
apply_to_pud_range mm/memory.c:3550 [inline]
apply_to_p4d_range mm/memory.c:3586 [inline]
__apply_to_page_range+0xb1d/0x1520 mm/memory.c:3622
__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:2306 [inline]
purge_vmap_node+0x210/0xb40 mm/vmalloc.c:2328
__purge_vmap_area_lazy+0x90a/0xc00 mm/vmalloc.c:2418
drain_vmap_area_work+0x27/0x40 mm/vmalloc.c:2452
process_one_work+0xac7/0x1b10 kernel/workqueue.c:3387
process_scheduled_works kernel/workqueue.c:3470 [inline]
worker_thread+0x5ef/0xe50 kernel/workqueue.c:3551
kthread+0x373/0x450 kernel/kthread.c:436
ret_from_fork+0x730/0xd60 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:
ffff8880571b3e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8880571b3f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8880571b3f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff8880571b4000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8880571b4080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: 24 08 and $0x8,%al
2: 48 83 c4 10 add $0x10,%rsp
6: c3 ret
7: cc int3
8: cc int3
9: cc int3
a: cc int3
b: 0f 1f 40 00 nopl 0x0(%rax)
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: 90 nop
1e: 90 nop
1f: 48 83 f9 40 cmp $0x40,%rcx
23: 73 44 jae 0x69
25: 83 f9 08 cmp $0x8,%ecx
28: 73 25 jae 0x4f
* 2a: 85 c9 test %ecx,%ecx <-- trapping instruction
2c: 74 0f je 0x3d
2e: 8a 06 mov (%rsi),%al
30: 88 07 mov %al,(%rdi)
32: 48 ff c7 inc %rdi
35: 48 ff c6 inc %rsi
38: 48 ff c9 dec %rcx
3b: 75 f1 jne 0x2e
3d: c3 ret
3e: cc int3
3f: cc int3