==================================================================
BUG: KASAN: use-after-free in mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:957
Read of size 1 at addr ffff888050d97fff by task syz-executor/8309
CPU: 0 UID: 0 PID: 8309 Comm: syz-executor Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/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+0x106a/0x1240 drivers/hid/hid-mcp2221.c:957
__hid_input_report drivers/hid/hid-core.c:2140 [inline]
hid_input_report+0x41d/0x580 drivers/hid/hid-core.c:2167
hid_irq_in+0x47e/0x6d0 drivers/hid/usbhid/hid-core.c:286
__usb_hcd_giveback_urb+0x376/0x540 drivers/usb/core/hcd.c:1657
dummy_timer+0xbc0/0x4650 drivers/usb/gadget/udc/dummy_hcd.c:2005
__run_hrtimer kernel/time/hrtimer.c:1930 [inline]
__hrtimer_run_queues+0x3c0/0xa20 kernel/time/hrtimer.c:1994
hrtimer_run_softirq+0x17a/0x240 kernel/time/hrtimer.c:2011
handle_softirqs+0x22a/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:1061 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1061
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:ida_alloc_range+0x0/0x870 lib/idr.c:384
Code: d6 3d 88 f6 e9 1c ff ff ff e8 2c c6 09 00 66 66 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1e fa 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 e4 e0 48
RSP: 0018:ffffc9000fc47a58 EFLAGS: 00000246
RAX: ffffffff826c1367 RBX: dffffc0000000000 RCX: 0000000000000cc0
RDX: 000000000fffffff RSI: 0000000000000000 RDI: ffffffff8e91abe0
RBP: 0000000000000001 R08: 0000000000000003 R09: 0000000000000000
R10: dffffc0000000000 R11: ffffed1004b9cc51 R12: dffffc0000000000
R13: ffff888025ce63c0 R14: ffffffff8cf99060 R15: ffff888025ce6280
ida_alloc_max include/linux/idr.h:329 [inline]
proc_alloc_inum fs/proc/generic.c:205 [inline]
proc_register+0x3f/0x730 fs/proc/generic.c:393
create_cache_proc_entries net/sunrpc/cache.c:1673 [inline]
cache_register_net+0x260/0x4c0 net/sunrpc/cache.c:1710
unix_gid_cache_create+0x73/0x100 net/sunrpc/svcauth_unix.c:609
sunrpc_init_net+0x67/0x160 net/sunrpc/sunrpc_syms.c:46
ops_init+0x35c/0x5c0 net/core/net_namespace.c:137
setup_net+0x118/0x340 net/core/net_namespace.c:446
copy_net_ns+0x50e/0x730 net/core/net_namespace.c:581
create_new_namespaces+0x3e7/0x6a0 kernel/nsproxy.c:130
unshare_nsproxy_namespaces+0x11a/0x160 kernel/nsproxy.c:226
ksys_unshare+0x521/0x980 kernel/fork.c:3227
__do_sys_unshare kernel/fork.c:3301 [inline]
__se_sys_unshare kernel/fork.c:3299 [inline]
__x64_sys_unshare+0x38/0x50 kernel/fork.c:3299
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f8ab619da67
Code: 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 10 01 00 00 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:00007ffd71b1a188 EFLAGS: 00000202 ORIG_RAX: 0000000000000110
RAX: ffffffffffffffda RBX: 00007f8ab6415f40 RCX: 00007f8ab619da67
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000040000000
RBP: 00007f8ab64167b8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000008
R13: 0000000000000003 R14: 00007ffd71b1a3c8 R15: 0000000000000000
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x50d97
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 dead000000000100 dead000000000122 0000000000000000
raw: 0000000000000000 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 0x440dc0(GFP_KERNEL_ACCOUNT|__GFP_ZERO|__GFP_COMP), pid 5846, tgid 5846 (syz-executor), ts 197560180926, free_ts 198749149990
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x231/0x280 mm/page_alloc.c:1859
prep_new_page mm/page_alloc.c:1867 [inline]
get_page_from_freelist+0x2418/0x24b0 mm/page_alloc.c:3926
__alloc_frozen_pages_noprof+0x233/0x3d0 mm/page_alloc.c:5213
alloc_pages_mpol+0x235/0x490 mm/mempolicy.c:2484
alloc_frozen_pages_noprof mm/mempolicy.c:2555 [inline]
alloc_pages_noprof+0xac/0x2a0 mm/mempolicy.c:2575
pagetable_alloc_noprof include/linux/mm.h:3651 [inline]
__pte_alloc_one_noprof include/asm-generic/pgalloc.h:76 [inline]
pte_alloc_one+0x22/0x370 arch/x86/mm/pgtable.c:18
__pte_alloc+0x25/0x1a0 mm/memory.c:453
copy_pte_range mm/memory.c:1237 [inline]
copy_pmd_range+0x5135/0x5970 mm/memory.c:1392
copy_pud_range mm/memory.c:1429 [inline]
copy_p4d_range mm/memory.c:1453 [inline]
copy_page_range+0xbd3/0x11f0 mm/memory.c:1539
dup_mmap+0xf2b/0x1d90 mm/mmap.c:1840
dup_mm kernel/fork.c:1532 [inline]
copy_mm+0x13b/0x4a0 kernel/fork.c:1584
copy_process+0x1efd/0x4430 kernel/fork.c:2259
kernel_clone+0x26d/0x8e0 kernel/fork.c:2708
__do_sys_clone kernel/fork.c:2849 [inline]
__se_sys_clone kernel/fork.c:2833 [inline]
__x64_sys_clone+0x1b6/0x230 kernel/fork.c:2833
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 15 tgid 15 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1403 [inline]
__free_frozen_pages+0xbc7/0xd30 mm/page_alloc.c:2944
__tlb_remove_table_free mm/mmu_gather.c:228 [inline]
tlb_remove_table_rcu+0x85/0x100 mm/mmu_gather.c:291
rcu_do_batch kernel/rcu/tree.c:2617 [inline]
rcu_core+0x7cd/0x1070 kernel/rcu/tree.c:2869
handle_softirqs+0x22a/0x840 kernel/softirq.c:622
run_ksoftirqd+0x36/0x60 kernel/softirq.c:1076
smpboot_thread_fn+0x541/0xa50 kernel/smpboot.c:160
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x51e/0xb90 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:
ffff888050d97e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff888050d97f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff888050d97f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff888050d98000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888050d98080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess), 2 bytes skipped:
0: 88 f6 mov %dh,%dh
2: e9 1c ff ff ff jmp 0xffffff23
7: e8 2c c6 09 00 call 0x9c638
c: 66 66 66 2e 0f 1f 84 data16 data16 cs nopw 0x0(%rax,%rax,1)
13: 00 00 00 00 00
18: 90 nop
19: 90 nop
1a: 90 nop
1b: 90 nop
1c: 90 nop
1d: 90 nop
1e: 90 nop
1f: 90 nop
20: 90 nop
21: 90 nop
22: 90 nop
23: 90 nop
24: 90 nop
25: 90 nop
26: 90 nop
27: 90 nop
* 28: f3 0f 1e fa endbr64 <-- trapping instruction
2c: 55 push %rbp
2d: 48 89 e5 mov %rsp,%rbp
30: 41 57 push %r15
32: 41 56 push %r14
34: 41 55 push %r13
36: 41 54 push %r12
38: 53 push %rbx
39: 48 83 e4 e0 and $0xffffffffffffffe0,%rsp
3d: 48 rex.W