================================================================== BUG: KASAN: stack-out-of-bounds in ipv6_addr_prefix+0x6e/0x1d0 include/net/ipv6.h:614 Read of size 506 at addr ffffc90003097a84 by task syz.0.1649/12651 CPU: 1 UID: 0 PID: 12651 Comm: syz.0.1649 Not tainted 6.15.0-rc3-syzkaller-00644-gdeeed351e982 #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+0x5cc/0xa70 net/ipv6/route.c:3817 ip6_route_add+0x29/0x2f0 net/ipv6/route.c:3909 ipv6_route_ioctl+0x35c/0x480 net/ipv6/route.c:4546 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:0x7f903e78e969 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:00007f903f69a038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f903e9b6160 RCX: 00007f903e78e969 RDX: 0000200000000540 RSI: 000000000000890b RDI: 0000000000000006 RBP: 00007f903e810ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f903e9b6160 R15: 00007ffde4a466e8 The buggy address belongs to stack of task syz.0.1649/12651 and is located at offset 68 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 [ffffc90003090000, ffffc90003099000) 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:0xffff888055c14140 pfn:0x55c14 memcg:ffff88801ebd4902 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: ffff888055c14140 0000000000000000 00000001ffffffff ffff88801ebd4902 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 12579, tgid 12579 (syz.6.1631), ts 388880190554, free_ts 388849561733 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 12585 tgid 12585 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 discard_slab mm/slub.c:2730 [inline] __put_partials+0x161/0x1c0 mm/slub.c:3199 put_cpu_partial+0x17c/0x250 mm/slub.c:3274 __slab_free+0x2f7/0x400 mm/slub.c:4526 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9a/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4161 [inline] slab_alloc_node mm/slub.c:4210 [inline] kmem_cache_alloc_noprof+0x1c1/0x3c0 mm/slub.c:4217 anon_vma_chain_alloc mm/rmap.c:142 [inline] __anon_vma_prepare+0xcb/0x4a0 mm/rmap.c:195 __vmf_anon_prepare mm/memory.c:3432 [inline] vmf_anon_prepare mm/internal.h:415 [inline] do_cow_fault mm/memory.c:5538 [inline] do_fault mm/memory.c:5654 [inline] do_pte_missing mm/memory.c:4160 [inline] handle_pte_fault mm/memory.c:5997 [inline] __handle_mm_fault+0x4cef/0x5380 mm/memory.c:6140 handle_mm_fault+0x3f6/0x8c0 mm/memory.c:6309 do_user_addr_fault+0xa81/0x1390 arch/x86/mm/fault.c:1337 handle_page_fault arch/x86/mm/fault.c:1480 [inline] exc_page_fault+0x68/0x110 arch/x86/mm/fault.c:1538 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 Memory state around the buggy address: ffffc90003097a00: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00 ffffc90003097a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90003097b00: 00 00 f3 f3 f3 f3 f3 f3 f3 f3 f3 f3 00 00 00 00 ^ ffffc90003097b80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00 ffffc90003097c00: 00 00 00 00 00 00 f3 f3 f3 f3 f3 f3 00 00 00 00 ==================================================================