================================================================== BUG: KASAN: stack-out-of-bounds in ipv6_addr_prefix+0x6e/0x1d0 include/net/ipv6.h:614 Read of size 512 at addr ffffc9001b577a94 by task syz.0.364/7407 CPU: 0 UID: 0 PID: 7407 Comm: syz.0.364 Not tainted 6.15.0-rc3-syzkaller-00584-gcc17b4b9c332 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xb4/0x290 mm/kasan/report.c:521 kasan_report+0x118/0x150 mm/kasan/report.c:634 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x29a/0x2b0 mm/kasan/generic.c:189 __asan_memcpy+0x29/0x70 mm/kasan/shadow.c:105 ipv6_addr_prefix+0x6e/0x1d0 include/net/ipv6.h:614 ip6_route_info_create+0x629/0xa70 net/ipv6/route.c:3814 ip6_route_add+0x29/0x2f0 net/ipv6/route.c:3902 ipv6_route_ioctl+0x35c/0x480 net/ipv6/route.c:4539 inet6_ioctl+0x219/0x280 net/ipv6/af_inet6.c:577 sock_do_ioctl+0xd9/0x300 net/socket.c:1190 sock_ioctl+0x576/0x790 net/socket.c:1311 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl+0xf9/0x170 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f2be8b8e969 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f2be99a4038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f2be8db6160 RCX: 00007f2be8b8e969 RDX: 0000200000000780 RSI: 000000000000890b RDI: 0000000000000004 RBP: 00007f2be8c10ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000001 R14: 00007f2be8db6160 R15: 00007ffdbe50ff48 The buggy address belongs to stack of task syz.0.364/7407 and is located at offset 84 in frame: ipv6_route_ioctl+0x0/0x480 net/ipv6/route.c:-1 This frame has 1 object: [32, 208) 'cfg' The buggy address belongs to the virtual mapping at [ffffc9001b570000, ffffc9001b579000) created by: copy_process+0x544/0x3b80 kernel/fork.c:2259 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888028614d20 pfn:0x28614 memcg:ffff88802cc91082 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: ffff888028614d20 0000000000000000 00000001ffffffff ffff88802cc91082 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 7404, tgid 7404 (syz.0.364), ts 232237679436, free_ts 232212947779 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1714 prep_new_page mm/page_alloc.c:1722 [inline] get_page_from_freelist+0x21e0/0x22c0 mm/page_alloc.c:3684 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4966 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2392 vm_area_alloc_pages mm/vmalloc.c:3591 [inline] __vmalloc_area_node mm/vmalloc.c:3669 [inline] __vmalloc_node_range_noprof+0x8fe/0x12c0 mm/vmalloc.c:3844 __vmalloc_node_noprof+0x7d/0x90 mm/vmalloc.c:3907 alloc_thread_stack_node kernel/fork.c:314 [inline] dup_task_struct+0x3e7/0x860 kernel/fork.c:1136 copy_process+0x544/0x3b80 kernel/fork.c:2259 kernel_clone+0x21e/0x870 kernel/fork.c:2844 __do_sys_clone3 kernel/fork.c:3148 [inline] __se_sys_clone3+0x256/0x2d0 kernel/fork.c:3127 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 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:1258 [inline] __free_frozen_pages+0xb14/0xce0 mm/page_alloc.c:2721 pagetable_free include/linux/mm.h:3019 [inline] pagetable_dtor_free include/linux/mm.h:3117 [inline] __tlb_remove_table+0x2d2/0x3b0 include/asm-generic/tlb.h:215 __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:2568 [inline] rcu_core+0xca5/0x1710 kernel/rcu/tree.c:2824 handle_softirqs+0x283/0x870 kernel/softirq.c:579 run_ksoftirqd+0x9b/0x100 kernel/softirq.c:968 smpboot_thread_fn+0x53f/0xa60 kernel/smpboot.c:164 kthread+0x70e/0x8a0 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffffc9001b577a00: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00 ffffc9001b577a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc9001b577b00: 00 00 f3 f3 f3 f3 f3 f3 f3 f3 f3 f3 00 00 00 00 ^ ffffc9001b577b80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00 ffffc9001b577c00: 00 00 00 00 00 00 f3 f3 f3 f3 f3 f3 00 00 00 00 ==================================================================