================================================================== BUG: KASAN: stack-out-of-bounds in ipv6_addr_prefix+0x6e/0x1d0 include/net/ipv6.h:614 Read of size 8191 at addr ffffc9000bc07a94 by task syz.3.481/7464 CPU: 0 UID: 0 PID: 7464 Comm: syz.3.481 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+0x629/0xa70 net/ipv6/route.c:3821 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:0x7f0f6638e969 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:00007f0f6718d038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f0f665b6160 RCX: 00007f0f6638e969 RDX: 0000200000000040 RSI: 000000000000890b RDI: 0000000000000005 RBP: 00007f0f66410ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000001 R14: 00007f0f665b6160 R15: 00007ffdb97b2c28 The buggy address belongs to stack of task syz.3.481/7464 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 [ffffc9000bc00000, ffffc9000bc09000) 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:0xffff888027103fc0 pfn:0x27103 memcg:ffff888032ff4002 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: ffff888027103fc0 0000000000000000 00000001ffffffff ffff888032ff4002 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 7460, tgid 7460 (syz.3.481), ts 116574923056, free_ts 116556121851 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 7448 tgid 7448 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 __folio_put+0x21b/0x2c0 mm/swap.c:112 page_pool_put_netmem include/net/page_pool/helpers.h:336 [inline] page_pool_put_full_netmem include/net/page_pool/helpers.h:366 [inline] napi_pp_put_page+0x147/0x2c0 net/core/skbuff.c:996 skb_pp_recycle net/core/skbuff.c:1007 [inline] skb_free_head net/core/skbuff.c:1054 [inline] skb_release_data+0x6be/0x890 net/core/skbuff.c:1085 skb_release_all net/core/skbuff.c:1150 [inline] __kfree_skb net/core/skbuff.c:1164 [inline] sk_skb_reason_drop+0x127/0x170 net/core/skbuff.c:1202 kfree_skb_reason include/linux/skbuff.h:1279 [inline] __skb_queue_purge_reason include/linux/skbuff.h:3354 [inline] skb_queue_purge_reason+0x2c8/0x360 net/core/skbuff.c:3913 skb_queue_purge include/linux/skbuff.h:3367 [inline] packet_release+0xb28/0xce0 net/packet/af_packet.c:3232 __sock_release net/socket.c:647 [inline] sock_close+0xc0/0x240 net/socket.c:1391 __fput+0x449/0xa70 fs/file_table.c:465 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work+0x5e/0x80 include/linux/resume_user_mode.h:50 exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x9a/0x120 kernel/entry/common.c:218 do_syscall_64+0x103/0x210 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffffc9000bc07a00: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00 ffffc9000bc07a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc9000bc07b00: 00 00 f3 f3 f3 f3 f3 f3 f3 f3 f3 f3 00 00 00 00 ^ ffffc9000bc07b80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00 ffffc9000bc07c00: 00 00 00 00 00 00 f3 f3 f3 f3 f3 f3 00 00 00 00 ==================================================================