================================================================== BUG: KASAN: stack-out-of-bounds in ipv6_addr_prefix+0x6e/0x1d0 include/net/ipv6.h:614 Read of size 4023 at addr ffffc900031c7a84 by task syz.1.562/7973 CPU: 0 UID: 0 PID: 7973 Comm: syz.1.562 Not tainted 6.15.0-rc3-syzkaller-00614-g0d15a26b247d #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:3810 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:0x7f2d1a18e969 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:00007f2d1b04f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f2d1a3b6160 RCX: 00007f2d1a18e969 RDX: 00002000000000c0 RSI: 000000000000890b RDI: 0000000000000003 RBP: 00007f2d1a210ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000001 R14: 00007f2d1a3b6160 R15: 00007ffd16768d98 The buggy address belongs to stack of task syz.1.562/7973 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 [ffffc900031c0000, ffffc900031c9000) 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:0xffff888000000000 pfn:0x2bca0 memcg:ffff88801b337f82 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: ffff888000000000 0000000000000000 00000001ffffffff ffff88801b337f82 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 7921, tgid 7921 (syz.1.552), ts 191369194004, free_ts 191195110533 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 5894 tgid 5894 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 vfree+0x1a6/0x330 mm/vmalloc.c:3383 delayed_vfree_work+0x55/0x80 mm/vmalloc.c:3303 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xadb/0x17a0 kernel/workqueue.c:3319 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400 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: ffffc900031c7a00: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00 ffffc900031c7a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc900031c7b00: 00 00 f3 f3 f3 f3 f3 f3 f3 f3 f3 f3 00 00 00 00 ^ ffffc900031c7b80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00 ffffc900031c7c00: 00 00 00 00 00 00 f3 f3 f3 f3 f3 f3 00 00 00 00 ==================================================================