==================================================================
BUG: KASAN: use-after-free in mcp2221_raw_event+0x103c/0x10a0 drivers/hid/hid-mcp2221.c:957
Read of size 1 at addr ffff888060517fff by task syz-executor/5608
CPU: 1 UID: 0 PID: 5608 Comm: syz-executor Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
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+0x1ea/0xa00 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0x162/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+0xa3/0xc0 arch/x86/kernel/apic/apic.c:1061
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:__sanitizer_cov_trace_pc+0xb/0x70 kernel/kcov.c:213
Code: 61 00 be 03 00 00 00 5b e9 92 c4 f0 02 66 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 65 8b 05 45 39 02 12 <48> 8b 34 24 65 48 8b 15 21 39 02 12 a9 00 01 ff 00 74 1b f6 c4 01
RSP: 0018:ffffc9000441fd18 EFLAGS: 00000283
RAX: 0000000080000000 RBX: ffffc9000441fd48 RCX: ffffffff81f4cf8b
RDX: 00000000009959d0 RSI: 000000000000c350 RDI: ffff888034d9a500
RBP: ffff888034d9a500 R08: 0000000000000006 R09: 000000000000c350
R10: 00000000009959d0 R11: 0000000000000000 R12: 00000000009959d0
R13: 0000000000000001 R14: 0000000000989680 R15: 000000000000c350
hrtimer_set_expires_range_ns include/linux/hrtimer.h:94 [inline]
hrtimer_nanosleep+0x13f/0x350 kernel/time/hrtimer.c:2338
common_nsleep+0xa1/0xd0 kernel/time/posix-timers.c:1345
__do_sys_clock_nanosleep kernel/time/posix-timers.c:1391 [inline]
__se_sys_clock_nanosleep kernel/time/posix-timers.c:1368 [inline]
__x64_sys_clock_nanosleep+0x336/0x480 kernel/time/posix-timers.c:1368
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x10b/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f8521d5d60e
Code: 08 0f 85 a5 a8 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 48 83 ec 08
RSP: 002b:00007ffcc1531138 EFLAGS: 00000246 ORIG_RAX: 00000000000000e6
RAX: ffffffffffffffda RBX: 000055555fa66500 RCX: 00007f8521d5d60e
RDX: 00007ffcc1531190 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007ffcc15311fc R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000001388
R13: 00000000000927c0 R14: 00000000000a7931 R15: 00007ffcc1531250
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x60517
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 10311, tgid 10311 (syz.5.1108), ts 661304649923, free_ts 661381936177
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+0x11a6/0x33b0 mm/page_alloc.c:3946
__alloc_frozen_pages_noprof+0x27c/0x2bc0 mm/page_alloc.c:5226
alloc_pages_mpol+0x1fb/0x540 mm/mempolicy.c:2490
alloc_pages_noprof+0x1a/0x160 mm/mempolicy.c:2581
pagetable_alloc_noprof include/linux/mm.h:3651 [inline]
pmd_alloc_one_noprof include/asm-generic/pgalloc.h:143 [inline]
__pmd_alloc+0x3b/0x950 mm/memory.c:6804
pmd_alloc include/linux/mm.h:3567 [inline]
__handle_mm_fault+0xa9c/0x2a00 mm/memory.c:6501
handle_mm_fault+0x36d/0xa20 mm/memory.c:6718
do_user_addr_fault+0x5a3/0x12f0 arch/x86/mm/fault.c:1334
handle_page_fault arch/x86/mm/fault.c:1474 [inline]
exc_page_fault+0x6f/0xd0 arch/x86/mm/fault.c:1527
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:618
page last free pid 10 tgid 10 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1402 [inline]
__free_frozen_pages+0x747/0x1040 mm/page_alloc.c:2943
__pagetable_free include/linux/mm.h:3661 [inline]
pagetable_free include/linux/mm.h:3685 [inline]
pagetable_dtor_free include/linux/mm.h:3784 [inline]
__tlb_remove_table include/asm-generic/tlb.h:221 [inline]
__tlb_remove_table_free mm/mmu_gather.c:228 [inline]
tlb_remove_table_rcu+0x2cf/0x380 mm/mmu_gather.c:291
rcu_do_batch kernel/rcu/tree.c:2617 [inline]
rcu_core+0x5a2/0x10d0 kernel/rcu/tree.c:2869
handle_softirqs+0x1ea/0xa00 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0x162/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+0xa3/0xc0 arch/x86/kernel/apic/apic.c:1061
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
Memory state around the buggy address:
ffff888060517e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff888060517f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff888060517f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff888060518000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888060518080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess), 1 bytes skipped:
0: 00 be 03 00 00 00 add %bh,0x3(%rsi)
6: 5b pop %rbx
7: e9 92 c4 f0 02 jmp 0x2f0c49e
c: 66 90 xchg %ax,%ax
e: 90 nop
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: f3 0f 1e fa endbr64
22: 65 8b 05 45 39 02 12 mov %gs:0x12023945(%rip),%eax # 0x1202396e
* 29: 48 8b 34 24 mov (%rsp),%rsi <-- trapping instruction
2d: 65 48 8b 15 21 39 02 mov %gs:0x12023921(%rip),%rdx # 0x12023956
34: 12
35: a9 00 01 ff 00 test $0xff0100,%eax
3a: 74 1b je 0x57
3c: f6 c4 01 test $0x1,%ah