==================================================================
BUG: KASAN: use-after-free in mcp2221_raw_event+0x110d/0x1140 drivers/hid/hid-mcp2221.c:975
Read of size 1 at addr ffff88811b093fff by task udevd/6145
CPU: 1 UID: 0 PID: 6145 Comm: udevd Not tainted syzkaller #0 PREEMPT(lazy)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/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+0xdaf/0x3820 drivers/usb/gadget/udc/dummy_hcd.c:2023
__run_hrtimer kernel/time/hrtimer.c:2074 [inline]
__hrtimer_run_queues+0x462/0x9c0 kernel/time/hrtimer.c:2131
hrtimer_run_softirq+0x1ca/0x360 kernel/time/hrtimer.c:2148
handle_softirqs+0x1d9/0x9b0 kernel/softirq.c:645
__do_softirq kernel/softirq.c:679 [inline]
invoke_softirq kernel/softirq.c:519 [inline]
__irq_exit_rcu+0x168/0x210 kernel/softirq.c:758
irq_exit_rcu+0x9/0x30 kernel/softirq.c:775
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline]
sysvec_apic_timer_interrupt+0x8f/0xb0 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
RIP: 0010:dentry_string_cmp fs/dcache.c:282 [inline]
RIP: 0010:dentry_cmp fs/dcache.c:322 [inline]
RIP: 0010:__d_lookup_rcu+0x388/0x500 fs/dcache.c:2531
Code: d8 08 01 e8 6a d4 60 ff e9 9f fd ff ff 31 db e8 1e 7e 85 ff 48 89 d8 48 83 c4 30 5b 5d 41 5c 41 5d 41 5e 41 5f e9 58 2c 5d 05 03 7e 85 ff 8d 0c ed 00 00 00 00 48 c7 c5 ff ff ff ff 31 ff 48
RSP: 0018:ffffc90013b87998 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffff8881166ab7c0 RCX: 0000000000000004
RDX: 0000000000000000 RSI: 0000000000000007 RDI: ffff888116e15ac0
RBP: 0000000000000004 R08: 0000000000000005 R09: 0000000000000007
R10: 0000000000000004 R11: 0000000000000001 R12: 0000000076656475
R13: dffffc0000000000 R14: 7461642f76656475 R15: ffff88811730fe1d
lookup_fast+0x90/0x600 fs/namei.c:1854
walk_component fs/namei.c:2278 [inline]
link_path_walk+0x7d4/0x1cc0 fs/namei.c:2656
path_openat+0x1ac/0x2440 fs/namei.c:4996
do_file_open+0x20e/0x430 fs/namei.c:5029
do_sys_openat2+0x10f/0x1e0 fs/open.c:1417
do_sys_open fs/open.c:1423 [inline]
__do_sys_openat fs/open.c:1439 [inline]
__se_sys_openat fs/open.c:1434 [inline]
__x64_sys_openat+0x12d/0x210 fs/open.c:1434
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x119/0x710 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7ff3da8fd407
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:00007ffd917018d0 EFLAGS: 00000202 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007ff3da80f880 RCX: 00007ff3da8fd407
RDX: 0000000000080000 RSI: 00007ffd91701a40 RDI: ffffffffffffff9c
RBP: 0000000000000008 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 000055822c71f7f5
R13: 000055822c71f7f5 R14: 0000000000000001 R15: 000055822c73a140
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88811b093a00 pfn:0x11b093
flags: 0x200000000000000(node=0|zone=2)
page_type: f0(buddy)
raw: 0200000000000000 ffffea000431b2c8 ffffea000472c808 0000000000000000
raw: ffff88811b093a00 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 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4146, tgid 4146 (modprobe), ts 61265942676
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+0xf4b/0x3440 mm/page_alloc.c:3943
__alloc_frozen_pages_noprof+0x2d7/0x2f70 mm/page_alloc.c:5436
alloc_slab_page mm/slub.c:3347 [inline]
allocate_slab mm/slub.c:3462 [inline]
new_slab+0xa9/0x6e0 mm/slub.c:3513
refill_objects+0xe3/0x410 mm/slub.c:7418
refill_sheaf mm/slub.c:2885 [inline]
__pcs_replace_empty_main+0x35e/0x650 mm/slub.c:4774
alloc_from_pcs mm/slub.c:4850 [inline]
slab_alloc_node mm/slub.c:4984 [inline]
kmem_cache_alloc_noprof+0x471/0x650 mm/slub.c:5010
vm_area_dup+0x25/0x7e0 mm/vma_init.c:128
__split_vma+0x19c/0x1db0 mm/vma.c:560
vms_gather_munmap_vmas+0x3a5/0x1670 mm/vma.c:1528
__mmap_setup mm/vma.c:2546 [inline]
__mmap_region+0x4c9/0x3130 mm/vma.c:2869
mmap_region+0x3db/0x6d0 mm/vma.c:2974
do_mmap+0x12b6/0x1c10 mm/mmap.c:573
vm_mmap_pgoff+0x1f0/0x390 mm/util.c:581
ksys_mmap_pgoff+0x3cb/0x610 mm/mmap.c:619
__do_sys_mmap arch/x86/kernel/sys_x86_64.c:96 [inline]
__se_sys_mmap arch/x86/kernel/sys_x86_64.c:89 [inline]
__x64_sys_mmap+0x125/0x190 arch/x86/kernel/sys_x86_64.c:89
page last free pid 23 tgid 23 ts 94345656033 stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
__free_pages_prepare mm/page_alloc.c:1418 [inline]
__free_frozen_pages+0x714/0xfc0 mm/page_alloc.c:2962
rcu_do_batch kernel/rcu/tree.c:2650 [inline]
rcu_core+0x5f0/0x1260 kernel/rcu/tree.c:2919
handle_softirqs+0x1d9/0x9b0 kernel/softirq.c:645
run_ksoftirqd kernel/softirq.c:1099 [inline]
run_ksoftirqd+0x38/0x60 kernel/softirq.c:1091
smpboot_thread_fn+0x3d3/0xab0 kernel/smpboot.c:160
kthread+0x373/0x450 kernel/kthread.c:436
ret_from_fork+0x69f/0xc90 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:
ffff88811b093e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88811b093f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88811b093f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88811b094000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88811b094080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess), 1 bytes skipped:
0: 08 01 or %al,(%rcx)
2: e8 6a d4 60 ff call 0xff60d471
7: e9 9f fd ff ff jmp 0xfffffdab
c: 31 db xor %ebx,%ebx
e: e8 1e 7e 85 ff call 0xff857e31
13: 48 89 d8 mov %rbx,%rax
16: 48 83 c4 30 add $0x30,%rsp
1a: 5b pop %rbx
1b: 5d pop %rbp
1c: 41 5c pop %r12
1e: 41 5d pop %r13
20: 41 5e pop %r14
22: 41 5f pop %r15
24: e9 58 2c 5d 05 jmp 0x55d2c81
* 29: e8 03 7e 85 ff call 0xff857e31 <-- trapping instruction
2e: 8d 0c ed 00 00 00 00 lea 0x0(,%rbp,8),%ecx
35: 48 c7 c5 ff ff ff ff mov $0xffffffffffffffff,%rbp
3c: 31 ff xor %edi,%edi
3e: 48 rex.W