==================================================================
BUG: KASAN: use-after-free in mcp2221_raw_event+0x10b0/0x12a0 drivers/hid/hid-mcp2221.c:964
Read of size 1 at addr ffff88807a023fff by task syz.0.4485/24968
CPU: 0 UID: 0 PID: 24968 Comm: syz.0.4485 Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Call Trace:
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_address_description+0x55/0x1e0 mm/kasan/report.c:378
print_report+0x58/0x70 mm/kasan/report.c:482
kasan_report+0x117/0x150 mm/kasan/report.c:595
mcp2221_raw_event+0x10b0/0x12a0 drivers/hid/hid-mcp2221.c:964
__hid_input_report+0x41c/0x580 drivers/hid/hid-core.c:2161
hid_irq_in+0x492/0x710 drivers/hid/usbhid/hid-core.c:287
__usb_hcd_giveback_urb+0x374/0x530 drivers/usb/core/hcd.c:1657
dummy_timer+0xac3/0x4b40 drivers/usb/gadget/udc/dummy_hcd.c:2005
__run_hrtimer kernel/time/hrtimer.c:2032 [inline]
__hrtimer_run_queues+0x3bc/0xa10 kernel/time/hrtimer.c:2096
hrtimer_run_softirq+0x17a/0x240 kernel/time/hrtimer.c:2113
handle_softirqs+0x225/0x840 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0xca/0x220 kernel/softirq.c:735
irq_exit_rcu+0x9/0x30 kernel/softirq.c:752
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:179 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x47/0x80 kernel/locking/spinlock.c:198
Code: f7 e8 ad 6c d1 f5 f7 c3 00 02 00 00 74 05 e8 10 51 fd f5 9c 58 a9 00 02 00 00 75 27 f7 c3 00 02 00 00 74 01 fb bf 01 00 00 00 b4 82 c2 f5 65 8b 05 ad 12 9b 07 85 c0 74 18 5b 41 5e e9 91 48
RSP: 0018:ffffc900050cf6a8 EFLAGS: 00000206
RAX: 0000000000000006 RBX: 0000000000000286 RCX: 0000000080000001
RDX: 0000000000000006 RSI: ffffffff8e229c3f RDI: 0000000000000001
RBP: ffff88802a787e40 R08: ffffffff90576ff7 R09: 1ffffffff20aedfe
R10: dffffc0000000000 R11: fffffbfff20aedff R12: 0000000000000000
R13: 0000000000000001 R14: ffff88802a787e00 R15: ffff88802a787e40
spin_unlock_irqrestore include/linux/spinlock.h:408 [inline]
__wake_up_common_lock+0x195/0x1f0 kernel/sched/wait.c:127
__unix_dgram_recvmsg+0x488/0xd70 net/unix/af_unix.c:2607
sock_recvmsg_nosec+0x130/0x170 net/socket.c:1126
____sys_recvmsg+0x3e3/0x4a0 net/socket.c:2902
___sys_recvmsg+0x213/0x5a0 net/socket.c:2946
do_recvmmsg+0x31a/0x7f0 net/socket.c:3041
__sys_recvmmsg net/socket.c:3115 [inline]
__do_sys_recvmmsg net/socket.c:3138 [inline]
__se_sys_recvmmsg net/socket.c:3131 [inline]
__x64_sys_recvmmsg+0x198/0x250 net/socket.c:3131
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f893619de59
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:00007f8936f94028 EFLAGS: 00000246 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 00007f8936426090 RCX: 00007f893619de59
RDX: 0000000000010106 RSI: 00002000000000c0 RDI: 0000000000000003
RBP: 00007f8936233e6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f8936426128 R14: 00007f8936426090 R15: 00007f893654fa48
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x30f pfn:0x7a023
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f0(buddy)
raw: 00fff00000000000 ffffea00009fc988 ffffea000110e108 0000000000000000
raw: 000000000000030f 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 24451, tgid 24448 (syz.0.4392), ts 998801069772, free_ts 999465768150
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1859
prep_new_page mm/page_alloc.c:1867 [inline]
get_page_from_freelist+0x21fa/0x2270 mm/page_alloc.c:3946
__alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5304
__alloc_pages_noprof+0x10/0x100 mm/page_alloc.c:5338
alloc_pages_bulk_noprof+0x5f5/0x7b0 mm/page_alloc.c:5230
___alloc_pages_bulk mm/kasan/shadow.c:345 [inline]
__kasan_populate_vmalloc_do mm/kasan/shadow.c:370 [inline]
__kasan_populate_vmalloc+0xb7/0x1c0 mm/kasan/shadow.c:424
kasan_populate_vmalloc include/linux/kasan.h:580 [inline]
alloc_vmap_area+0xd1a/0x1420 mm/vmalloc.c:2123
__get_vm_area_node+0x1f2/0x300 mm/vmalloc.c:3226
__vmalloc_node_range_noprof+0x358/0x1730 mm/vmalloc.c:4042
vmalloc_user_noprof+0xad/0xe0 mm/vmalloc.c:4237
xskq_create+0xbf/0x170 net/xdp/xsk_queue.c:49
xsk_init_queue+0x8a/0xe0 net/xdp/xsk.c:1268
xsk_setsockopt+0x52a/0x960 net/xdp/xsk.c:1689
do_sock_setsockopt+0x17c/0x1b0 net/socket.c:2368
__sys_setsockopt net/socket.c:2393 [inline]
__do_sys_setsockopt net/socket.c:2399 [inline]
__se_sys_setsockopt net/socket.c:2396 [inline]
__x64_sys_setsockopt+0x13d/0x1b0 net/socket.c:2396
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
page last free pid 18964 tgid 18964 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1406 [inline]
__free_frozen_pages+0xc1e/0xd10 mm/page_alloc.c:2950
kasan_depopulate_vmalloc_pte+0x6d/0x90 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+0xbd8/0x1420 mm/memory.c:3490
__kasan_release_vmalloc+0xa2/0xd0 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+0x220/0x960 mm/vmalloc.c:2306
__purge_vmap_area_lazy+0x783/0xb40 mm/vmalloc.c:2396
drain_vmap_area_work+0x27/0x40 mm/vmalloc.c:2430
process_one_work kernel/workqueue.c:3322 [inline]
process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3486
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 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:
ffff88807a023e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88807a023f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88807a023f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88807a024000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88807a024080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: f7 e8 imul %eax
2: ad lods %ds:(%rsi),%eax
3: 6c insb (%dx),%es:(%rdi)
4: d1 f5 shl $1,%ebp
6: f7 c3 00 02 00 00 test $0x200,%ebx
c: 74 05 je 0x13
e: e8 10 51 fd f5 call 0xf5fd5123
13: 9c pushf
14: 58 pop %rax
15: a9 00 02 00 00 test $0x200,%eax
1a: 75 27 jne 0x43
1c: f7 c3 00 02 00 00 test $0x200,%ebx
22: 74 01 je 0x25
24: fb sti
25: bf 01 00 00 00 mov $0x1,%edi
* 2a: e8 b4 82 c2 f5 call 0xf5c282e3 <-- trapping instruction
2f: 65 8b 05 ad 12 9b 07 mov %gs:0x79b12ad(%rip),%eax # 0x79b12e3
36: 85 c0 test %eax,%eax
38: 74 18 je 0x52
3a: 5b pop %rbx
3b: 41 5e pop %r14
3d: e9 .byte 0xe9
3e: 91 xchg %eax,%ecx
3f: 48 rex.W