==================================================================
BUG: KASAN: slab-out-of-bounds in __cpa_addr arch/x86/mm/pat/set_memory.c:309 [inline]
BUG: KASAN: slab-out-of-bounds in __cpa_flush_tlb+0x17e/0x270 arch/x86/mm/pat/set_memory.c:408
Read of size 8 at addr ffff88807df6d900 by task syz-executor/6287
CPU: 0 UID: 0 PID: 6287 Comm: syz-executor Not tainted 6.16.0-rc4-next-20250702-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_addr arch/x86/mm/pat/set_memory.c:309 [inline]
__cpa_flush_tlb+0x17e/0x270 arch/x86/mm/pat/set_memory.c:408
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:console_flush_all+0x7f7/0xc40 kernel/printk/printk.c:3227
Code: 48 21 c3 0f 85 e9 01 00 00 e8 b5 36 1f 00 48 8b 5c 24 20 4d 85 f6 75 07 e8 a6 36 1f 00 eb 06 e8 9f 36 1f 00 fb 48 8b 44 24 28 <42> 80 3c 20 00 74 08 48 89 df e8 0a 4a 83 00 48 8b 1b 48 8b 44 24
RSP: 0018:ffffc900036c69a0 EFLAGS: 00000293
RAX: 1ffffffff1d36b7b RBX: ffffffff8e9b5bd8 RCX: ffff888025921e00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc900036c6af0 R08: ffffffff8fa17c37 R09: 1ffffffff1f42f86
R10: dffffc0000000000 R11: fffffbfff1f42f87 R12: dffffc0000000000
R13: 0000000000000001 R14: 0000000000000200 R15: ffffffff8e9b5b80
__console_flush_and_unlock kernel/printk/printk.c:3285 [inline]
console_unlock+0xc4/0x270 kernel/printk/printk.c:3325
vprintk_emit+0x5b7/0x7a0 kernel/printk/printk.c:2450
_printk+0xcf/0x120 kernel/printk/printk.c:2475
batadv_hardif_enable_interface+0x7b9/0xa30 net/batman-adv/hard-interface.c:758
batadv_meshif_slave_add+0x79/0x100 net/batman-adv/mesh-interface.c:845
do_set_master+0x533/0x6d0 net/core/rtnetlink.c:2946
do_setlink+0xcf0/0x41c0 net/core/rtnetlink.c:3148
rtnl_changelink net/core/rtnetlink.c:3759 [inline]
__rtnl_newlink net/core/rtnetlink.c:3918 [inline]
rtnl_newlink+0x160b/0x1c70 net/core/rtnetlink.c:4055
rtnetlink_rcv_msg+0x7cf/0xb70 net/core/rtnetlink.c:6944
netlink_rcv_skb+0x208/0x470 net/netlink/af_netlink.c:2534
netlink_unicast_kernel net/netlink/af_netlink.c:1313 [inline]
netlink_unicast+0x75b/0x8d0 net/netlink/af_netlink.c:1339
netlink_sendmsg+0x805/0xb30 net/netlink/af_netlink.c:1883
sock_sendmsg_nosec net/socket.c:714 [inline]
__sock_sendmsg+0x219/0x270 net/socket.c:729
__sys_sendto+0x3bd/0x520 net/socket.c:2228
__do_sys_sendto net/socket.c:2235 [inline]
__se_sys_sendto net/socket.c:2231 [inline]
__x64_sys_sendto+0xde/0x100 net/socket.c:2231
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
RIP: 0033:0x7f92281907bc
Code: 2a 5f 02 00 44 8b 4c 24 2c 4c 8b 44 24 20 89 c5 44 8b 54 24 28 48 8b 54 24 18 b8 2c 00 00 00 48 8b 74 24 10 8b 7c 24 08 0f 05 <48> 3d 00 f0 ff ff 77 34 89 ef 48 89 44 24 08 e8 70 5f 02 00 48 8b
RSP: 002b:00007ffce23d4c30 EFLAGS: 00000293 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 00007f9228ee4620 RCX: 00007f92281907bc
RDX: 0000000000000028 RSI: 00007f9228ee4670 RDI: 0000000000000003
RBP: 0000000000000000 R08: 00007ffce23d4c84 R09: 000000000000000c
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000003
R13: 0000000000000000 R14: 00007f9228ee4670 R15: 0000000000000000
Allocated by task 6449:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:319 [inline]
__kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:345
kasan_slab_alloc include/linux/kasan.h:250 [inline]
slab_post_alloc_hook mm/slub.c:4180 [inline]
slab_alloc_node mm/slub.c:4229 [inline]
kmem_cache_alloc_node_noprof+0x1bb/0x3c0 mm/slub.c:4281
alloc_task_struct_node kernel/fork.c:183 [inline]
dup_task_struct+0x52/0x860 kernel/fork.c:868
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
Last potentially related work creation:
kasan_save_stack+0x3e/0x60 mm/kasan/common.c:47
kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:548
task_work_add+0xb1/0x420 kernel/task_work.c:65
task_tick_mm_cid kernel/sched/core.c:10583 [inline]
sched_tick+0x31b/0x950 kernel/sched/core.c:5593
update_process_times+0x270/0x2f0 kernel/time/timer.c:2478
tick_sched_handle kernel/time/tick-sched.c:276 [inline]
tick_nohz_handler+0x39a/0x520 kernel/time/tick-sched.c:297
__run_hrtimer kernel/time/hrtimer.c:1761 [inline]
__hrtimer_run_queues+0x4dd/0xc60 kernel/time/hrtimer.c:1825
hrtimer_interrupt+0x45b/0xaa0 kernel/time/hrtimer.c:1887
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1039 [inline]
__sysvec_apic_timer_interrupt+0x10b/0x410 arch/x86/kernel/apic/apic.c:1056
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline]
sysvec_apic_timer_interrupt+0xa1/0xc0 arch/x86/kernel/apic/apic.c:1050
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
The buggy address belongs to the object at ffff88807df6bc00
which belongs to the cache task_struct of size 7424
The buggy address is located 0 bytes to the right of
allocated 7424-byte region [ffff88807df6bc00, ffff88807df6d900)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7df68
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff88802897a101
ksm flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88801bad4500 ffffea0000b49000 dead000000000003
raw: 0000000000000000 0000000000040004 00000000f5000000 ffff88802897a101
head: 00fff00000000040 ffff88801bad4500 ffffea0000b49000 dead000000000003
head: 0000000000000000 0000000000040004 00000000f5000000 ffff88802897a101
head: 00fff00000000003 ffffea0001f7da01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5197, tgid 5197 (S02sysctl), ts 22645919920, free_ts 20355030603
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_slab_page mm/slub.c:2487 [inline]
allocate_slab+0x8a/0x370 mm/slub.c:2655
new_slab mm/slub.c:2709 [inline]
___slab_alloc+0xbeb/0x1410 mm/slub.c:3891
__slab_alloc mm/slub.c:3981 [inline]
__slab_alloc_node mm/slub.c:4056 [inline]
slab_alloc_node mm/slub.c:4217 [inline]
kmem_cache_alloc_node_noprof+0x280/0x3c0 mm/slub.c:4281
alloc_task_struct_node kernel/fork.c:183 [inline]
dup_task_struct+0x52/0x860 kernel/fork.c:868
copy_process+0x54b/0x3c00 kernel/fork.c:1998
kernel_clone+0x21e/0x870 kernel/fork.c:2598
__do_sys_clone kernel/fork.c:2741 [inline]
__se_sys_clone kernel/fork.c:2725 [inline]
__x64_sys_clone+0x18b/0x1e0 kernel/fork.c:2725
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 1 tgid 1 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
__free_pages mm/page_alloc.c:5257 [inline]
free_contig_range+0x1bd/0x4a0 mm/page_alloc.c:7114
destroy_args+0x7e/0x5d0 mm/debug_vm_pgtable.c:953
debug_vm_pgtable+0x3fa/0x430 mm/debug_vm_pgtable.c:1329
do_one_initcall+0x233/0x820 init/main.c:1269
do_initcall_level+0x137/0x1f0 init/main.c:1331
do_initcalls+0x69/0xd0 init/main.c:1347
kernel_init_freeable+0x3d9/0x570 init/main.c:1579
kernel_init+0x1d/0x1d0 init/main.c:1469
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:
ffff88807df6d800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88807df6d880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88807df6d900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff88807df6d980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88807df6da00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 48 21 c3 and %rax,%rbx
3: 0f 85 e9 01 00 00 jne 0x1f2
9: e8 b5 36 1f 00 call 0x1f36c3
e: 48 8b 5c 24 20 mov 0x20(%rsp),%rbx
13: 4d 85 f6 test %r14,%r14
16: 75 07 jne 0x1f
18: e8 a6 36 1f 00 call 0x1f36c3
1d: eb 06 jmp 0x25
1f: e8 9f 36 1f 00 call 0x1f36c3
24: fb sti
25: 48 8b 44 24 28 mov 0x28(%rsp),%rax
* 2a: 42 80 3c 20 00 cmpb $0x0,(%rax,%r12,1) <-- trapping instruction
2f: 74 08 je 0x39
31: 48 89 df mov %rbx,%rdi
34: e8 0a 4a 83 00 call 0x834a43
39: 48 8b 1b mov (%rbx),%rbx
3c: 48 rex.W
3d: 8b .byte 0x8b
3e: 44 rex.R
3f: 24 .byte 0x24