==================================================================
BUG: KASAN: out-of-bounds in __cpa_flush_tlb+0x213/0x270 arch/x86/mm/pat/set_memory.c:407
Read of size 8 at addr ffffc90003807920 by task swapper/0/0
CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.16.0-rc4-next-20250630-syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:408 [inline]
print_report+0xd2/0x2b0 mm/kasan/report.c:521
kasan_report+0x118/0x150 mm/kasan/report.c:634
__cpa_flush_tlb+0x213/0x270 arch/x86/mm/pat/set_memory.c:407
csd_do_func kernel/smp.c:134 [inline]
__flush_smp_call_function_queue+0x370/0xaa0 kernel/smp.c:540
__sysvec_call_function_single+0xa8/0x3d0 arch/x86/kernel/smp.c:271
instr_sysvec_call_function_single arch/x86/kernel/smp.c:266 [inline]
sysvec_call_function_single+0x9e/0xc0 arch/x86/kernel/smp.c:266
asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:709
RIP: 0010:pv_native_safe_halt+0x13/0x20 arch/x86/kernel/paravirt.c:82
Code: 43 dd 02 00 cc cc cc 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 66 90 0f 00 2d 43 82 18 00 f3 0f 1e fa fb f4 18 dd 02 00 cc cc cc cc cc cc cc cc 90 90 90 90 90 90 90 90 90
RSP: 0018:ffffffff8de07d80 EFLAGS: 000002c6
RAX: 373cce56ed024e00 RBX: ffffffff8196c188 RCX: 373cce56ed024e00
RDX: 0000000000000001 RSI: ffffffff8d992cd0 RDI: ffffffff8be31d00
RBP: ffffffff8de07ea8 R08: ffff8880b8632f1b R09: 1ffff110170c65e3
R10: dffffc0000000000 R11: ffffed10170c65e4 R12: ffffffff8fa17430
R13: 0000000000000000 R14: 0000000000000000 R15: 1ffffffff1bd2a50
arch_safe_halt arch/x86/include/asm/paravirt.h:107 [inline]
default_idle+0x13/0x20 arch/x86/kernel/process.c:757
default_idle_call+0x74/0xb0 kernel/sched/idle.c:122
cpuidle_idle_call kernel/sched/idle.c:190 [inline]
do_idle+0x1e8/0x510 kernel/sched/idle.c:330
cpu_startup_entry+0x44/0x60 kernel/sched/idle.c:428
rest_init+0x2de/0x300 init/main.c:744
start_kernel+0x47d/0x500 init/main.c:1097
x86_64_start_reservations+0x24/0x30 arch/x86/kernel/head64.c:307
x86_64_start_kernel+0x143/0x1c0 arch/x86/kernel/head64.c:288
common_startup_64+0x13e/0x147
The buggy address belongs to the virtual mapping at
[ffffc90003800000, ffffc90003809000) created by:
copy_process+0x54b/0x3c00 kernel/fork.c:1998
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888000000000 pfn:0x2434a
memcg:ffff888079c05302
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: ffff888000000000 0000000000000000 00000001ffffffff ffff888079c05302
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2dc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_ZERO|__GFP_NOWARN), pid 6776, tgid 6776 (syz.1.233), ts 148000693239, free_ts 147967973716
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1848
prep_new_page mm/page_alloc.c:1856 [inline]
get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3855
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5145
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2419
alloc_frozen_pages_noprof mm/mempolicy.c:2490 [inline]
alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2510
vm_area_alloc_pages mm/vmalloc.c:3642 [inline]
__vmalloc_area_node mm/vmalloc.c:3720 [inline]
__vmalloc_node_range_noprof+0x97d/0x12f0 mm/vmalloc.c:3893
__vmalloc_node_noprof+0xc2/0x110 mm/vmalloc.c:3956
alloc_thread_stack_node kernel/fork.c:310 [inline]
dup_task_struct+0x3e7/0x860 kernel/fork.c:876
copy_process+0x54b/0x3c00 kernel/fork.c:1998
kernel_clone+0x21e/0x870 kernel/fork.c:2598
__do_sys_clone3 kernel/fork.c:2902 [inline]
__se_sys_clone3+0x256/0x2d0 kernel/fork.c:2881
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 1158 tgid 1158 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1392 [inline]
__free_frozen_pages+0xb80/0xd80 mm/page_alloc.c:2892
pagetable_free include/linux/mm.h:2896 [inline]
pagetable_dtor_free include/linux/mm.h:2994 [inline]
__tlb_remove_table+0x2d2/0x3b0 include/asm-generic/tlb.h:220
__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:2582 [inline]
rcu_core+0xca8/0x1710 kernel/rcu/tree.c:2838
handle_softirqs+0x286/0x870 kernel/softirq.c:579
do_softirq+0xec/0x180 kernel/softirq.c:480
__local_bh_enable_ip+0x17d/0x1c0 kernel/softirq.c:407
spin_unlock_bh include/linux/spinlock.h:396 [inline]
batadv_nc_purge_paths+0x318/0x3b0 net/batman-adv/network-coding.c:471
batadv_nc_worker+0x328/0x610 net/batman-adv/network-coding.c:720
process_one_work kernel/workqueue.c:3239 [inline]
process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3322
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3403
kthread+0x70e/0x8a0 kernel/kthread.c:463
ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Memory state around the buggy address:
ffffc90003807800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc90003807880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc90003807900: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 00 00 00
^
ffffc90003807980: 00 00 00 00 00 00 00 00 f3 f3 f3 f3 00 00 00 00
ffffc90003807a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: 43 dd 02 rex.XB fldl (%r10)
3: 00 cc add %cl,%ah
5: cc int3
6: cc int3
7: 90 nop
8: 90 nop
9: 90 nop
a: 90 nop
b: 90 nop
c: 90 nop
d: 90 nop
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: f3 0f 1e fa endbr64
1b: 66 90 xchg %ax,%ax
1d: 0f 00 2d 43 82 18 00 verw 0x188243(%rip) # 0x188267
24: f3 0f 1e fa endbr64
28: fb sti
29: f4 hlt
* 2a: e9 18 dd 02 00 jmp 0x2dd47 <-- trapping instruction
2f: cc int3
30: cc int3
31: cc int3
32: cc int3
33: cc int3
34: cc int3
35: cc int3
36: cc int3
37: 90 nop
38: 90 nop
39: 90 nop
3a: 90 nop
3b: 90 nop
3c: 90 nop
3d: 90 nop
3e: 90 nop
3f: 90 nop