==================================================================
BUG: KASAN: use-after-free in mcp2221_raw_event+0x103c/0x10a0 drivers/hid/hid-mcp2221.c:957
Read of size 1 at addr ffff88815d46bfff by task udevd/2857
CPU: 1 UID: 0 PID: 2857 Comm: udevd Not tainted syzkaller #0 PREEMPT(full)
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+0x103c/0x10a0 drivers/hid/hid-mcp2221.c:957
__hid_input_report.constprop.0+0x314/0x460 drivers/hid/hid-core.c:2147
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: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:unwind_next_frame+0x1500/0x2090 arch/x86/kernel/unwind_orc.c:677
Code: ff 48 ba 00 00 00 00 00 fc ff df 48 8d 79 02 48 89 f8 48 c1 e8 03 0f b6 34 10 48 8d 41 03 49 89 c0 49 c1 e8 03 41 0f b6 14 10 <49> 89 f8 41 83 e0 07 44 38 c6 41 0f 9e c0 40 84 f6 40 0f 95 c6 41
RSP: 0018:ffffc90001c3f4c0 EFLAGS: 00000a02
RAX: ffffffff8b60a4b9 RBX: 0000000000000001 RCX: ffffffff8b60a4b6
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff8b60a4b8
RBP: ffffc90001c3f578 R08: 1ffffffff16c1497 R09: 0000000000000007
R10: 0000000000000200 R11: 0000000000010fcc R12: ffffc90001c3f580
R13: ffffc90001c3f530 R14: ffffc90001c3f920 R15: ffffc90001c3f564
arch_stack_walk+0x94/0xf0 arch/x86/kernel/stacktrace.c:25
stack_trace_save+0x8e/0xc0 kernel/stacktrace.c:122
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:253 [inline]
__kasan_slab_free+0x43/0x70 mm/kasan/common.c:285
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2689 [inline]
slab_free mm/slub.c:6250 [inline]
kmem_cache_free+0x108/0x660 mm/slub.c:6377
kfree_skbmem+0x19a/0x210 net/core/skbuff.c:1137
__kfree_skb net/core/skbuff.c:1204 [inline]
consume_skb net/core/skbuff.c:1436 [inline]
consume_skb+0xd1/0x110 net/core/skbuff.c:1430
__unix_dgram_recvmsg+0x754/0xc30 net/unix/af_unix.c:2669
unix_dgram_recvmsg+0xcd/0x100 net/unix/af_unix.c:2686
sock_recvmsg_nosec net/socket.c:1137 [inline]
sock_recvmsg+0x1a4/0x1f0 net/socket.c:1159
____sys_recvmsg+0x218/0x640 net/socket.c:2918
___sys_recvmsg+0x16a/0x1a0 net/socket.c:2960
__sys_recvmsg+0x16d/0x220 net/socket.c:2993
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:0x7f0d1bc61407
Code: 48 89 fa 4c 89 df e8 38 aa 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff
RSP: 002b:00007ffda27bcb70 EFLAGS: 00000202 ORIG_RAX: 000000000000002f
RAX: ffffffffffffffda RBX: 00007f0d1bb73880 RCX: 00007f0d1bc61407
RDX: 0000000000000040 RSI: 00007ffda27bcc90 RDI: 0000000000000009
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000000
R13: 000056100b642100 R14: 0000000000000000 R15: 0000000000000000
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88815d46b000 pfn:0x15d46b
flags: 0x200000000000000(node=0|zone=2)
raw: 0200000000000000 dead000000000100 dead000000000122 0000000000000000
raw: ffff88815d46b000 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 31253, tgid 31253 (syz-executor), ts 2928034148727, free_ts 3027459520114
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+0xf34/0x3a90 mm/page_alloc.c:3946
__alloc_frozen_pages_noprof+0x273/0x28a0 mm/page_alloc.c:5226
__alloc_pages_noprof mm/page_alloc.c:5260 [inline]
alloc_pages_bulk_noprof+0x612/0x1120 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_user_noprof+0x9e/0xe0 mm/vmalloc.c:4218
kcov_ioctl+0x4c/0x720 kernel/kcov.c:726
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:597 [inline]
__se_sys_ioctl fs/ioctl.c:583 [inline]
__x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
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 12715 tgid 12715 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1402 [inline]
__free_frozen_pages+0x692/0xf10 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:3302
process_scheduled_works kernel/workqueue.c:3385 [inline]
worker_thread+0x5ef/0xe50 kernel/workqueue.c:3466
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:
ffff88815d46be80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88815d46bf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88815d46bf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88815d46c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88815d46c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: ff 48 ba decl -0x46(%rax)
3: 00 00 add %al,(%rax)
5: 00 00 add %al,(%rax)
7: 00 fc add %bh,%ah
9: ff lcall (bad)
a: df 48 8d fisttps -0x73(%rax)
d: 79 02 jns 0x11
f: 48 89 f8 mov %rdi,%rax
12: 48 c1 e8 03 shr $0x3,%rax
16: 0f b6 34 10 movzbl (%rax,%rdx,1),%esi
1a: 48 8d 41 03 lea 0x3(%rcx),%rax
1e: 49 89 c0 mov %rax,%r8
21: 49 c1 e8 03 shr $0x3,%r8
25: 41 0f b6 14 10 movzbl (%r8,%rdx,1),%edx
* 2a: 49 89 f8 mov %rdi,%r8 <-- trapping instruction
2d: 41 83 e0 07 and $0x7,%r8d
31: 44 38 c6 cmp %r8b,%sil
34: 41 0f 9e c0 setle %r8b
38: 40 84 f6 test %sil,%sil
3b: 40 0f 95 c6 setne %sil
3f: 41 rex.B