==================================================================
BUG: KASAN: use-after-free in mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:948
Read of size 1 at addr ffff8880250ebfff by task kworker/u8:13/4451
CPU: 1 UID: 0 PID: 4451 Comm: kworker/u8:13 Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Workqueue: bat_events batadv_iv_send_outstanding_bat_ogm_packet
Call Trace:
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xca/0x240 mm/kasan/report.c:482
kasan_report+0x118/0x150 mm/kasan/report.c:595
mcp2221_raw_event+0x106a/0x1240 drivers/hid/hid-mcp2221.c:948
__hid_input_report drivers/hid/hid-core.c:2139 [inline]
hid_input_report+0x41d/0x580 drivers/hid/hid-core.c:2166
hid_irq_in+0x47e/0x6d0 drivers/hid/usbhid/hid-core.c:286
__usb_hcd_giveback_urb+0x376/0x540 drivers/usb/core/hcd.c:1661
dummy_timer+0x85f/0x45b0 drivers/usb/gadget/udc/dummy_hcd.c:1995
__run_hrtimer kernel/time/hrtimer.c:1777 [inline]
__hrtimer_run_queues+0x51c/0xc30 kernel/time/hrtimer.c:1841
hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1858
handle_softirqs+0x27d/0x850 kernel/softirq.c:626
do_softirq+0xec/0x180 kernel/softirq.c:523
__local_bh_enable_ip+0x17d/0x1c0 kernel/softirq.c:450
local_bh_enable include/linux/bottom_half.h:33 [inline]
rcu_read_unlock_bh include/linux/rcupdate.h:936 [inline]
__dev_queue_xmit+0x1955/0x3140 net/core/dev.c:4845
dev_queue_xmit include/linux/netdevice.h:3387 [inline]
batadv_send_skb_packet+0x418/0x690 net/batman-adv/send.c:100
batadv_iv_ogm_send_to_if net/batman-adv/bat_iv_ogm.c:391 [inline]
batadv_iv_ogm_emit net/batman-adv/bat_iv_ogm.c:419 [inline]
batadv_iv_send_outstanding_bat_ogm_packet+0x62f/0x7e0 net/batman-adv/bat_iv_ogm.c:1697
process_one_work+0x93a/0x15a0 kernel/workqueue.c:3279
process_scheduled_works kernel/workqueue.c:3362 [inline]
worker_thread+0x9b0/0xee0 kernel/workqueue.c:3443
kthread+0x711/0x8a0 kernel/kthread.c:463
ret_from_fork+0x599/0xb30 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880250ebf00 pfn:0x250eb
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f0(buddy)
raw: 00fff00000000000 ffffea0000cfc988 ffffea0001014a88 0000000000000000
raw: ffff8880250ebf00 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 0x440dc0(GFP_KERNEL_ACCOUNT|__GFP_ZERO|__GFP_COMP), pid 8728, tgid 8728 (syz-executor), ts 420634826989, free_ts 424937925866
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x234/0x290 mm/page_alloc.c:1846
prep_new_page mm/page_alloc.c:1854 [inline]
get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3915
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5210
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486
alloc_frozen_pages_noprof mm/mempolicy.c:2557 [inline]
alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2577
pagetable_alloc_noprof include/linux/mm.h:3196 [inline]
__pte_alloc_one_noprof include/asm-generic/pgalloc.h:76 [inline]
pte_alloc_one+0x23/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+0x76cc/0x7e00 mm/memory.c:1392
copy_pud_range mm/memory.c:1429 [inline]
copy_p4d_range mm/memory.c:1453 [inline]
copy_page_range+0xb88/0x11d0 mm/memory.c:1535
dup_mmap+0xf4a/0x1b80 mm/mmap.c:1827
dup_mm kernel/fork.c:1529 [inline]
copy_mm+0x13c/0x4b0 kernel/fork.c:1581
copy_process+0x165d/0x3950 kernel/fork.c:2221
kernel_clone+0x21e/0x820 kernel/fork.c:2651
__do_sys_clone kernel/fork.c:2792 [inline]
__se_sys_clone kernel/fork.c:2776 [inline]
__x64_sys_clone+0x18b/0x1e0 kernel/fork.c:2776
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 25 tgid 25 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1395 [inline]
__free_frozen_pages+0xbc8/0xd30 mm/page_alloc.c:2943
__tlb_remove_table_free mm/mmu_gather.c:227 [inline]
tlb_remove_table_rcu+0x85/0x100 mm/mmu_gather.c:290
rcu_do_batch kernel/rcu/tree.c:2605 [inline]
rcu_core+0xd70/0x1870 kernel/rcu/tree.c:2857
handle_softirqs+0x27d/0x850 kernel/softirq.c:626
__do_softirq kernel/softirq.c:660 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:727
irq_exit_rcu+0x9/0x30 kernel/softirq.c:743
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1056
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
Memory state around the buggy address:
ffff8880250ebe80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8880250ebf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8880250ebf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff8880250ec000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8880250ec080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================