================================================================== BUG: KASAN: slab-out-of-bounds in xfrm6_fill_dst+0x84b/0x9c0 net/ipv6/xfrm6_policy.c:109 Read of size 4 at addr ffff8801cc8a59d4 by task syz-executor0/11804 CPU: 0 PID: 11804 Comm: syz-executor0 Not tainted 4.9.81-gd2c57b6 #34 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801caac76d0 ffffffff81d94de9 ffffea0007322940 ffff8801cc8a59d4 0000000000000000 ffff8801cc8a59d4 ffff8801d56c0518 ffff8801caac7708 ffffffff8153e173 ffff8801cc8a59d4 0000000000000004 0000000000000000 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] print_address_description+0x73/0x280 mm/kasan/report.c:252 [] kasan_report_error mm/kasan/report.c:351 [inline] [] kasan_report+0x275/0x360 mm/kasan/report.c:408 [] __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:428 [] xfrm6_fill_dst+0x84b/0x9c0 net/ipv6/xfrm6_policy.c:109 [] xfrm_fill_dst net/xfrm/xfrm_policy.c:1673 [inline] [] xfrm_bundle_create net/xfrm/xfrm_policy.c:1789 [inline] [] xfrm_resolve_and_create_bundle+0xdd5/0x1d90 net/xfrm/xfrm_policy.c:1875 [] xfrm_lookup+0x984/0xbf0 net/xfrm/xfrm_policy.c:2222 [] xfrm_lookup_route+0x39/0x1a0 net/xfrm/xfrm_policy.c:2344 [] ip_route_output_flow+0x7f/0xa0 net/ipv4/route.c:2435 [] ip_route_connect include/net/route.h:296 [inline] [] __ip4_datagram_connect+0x654/0x1160 net/ipv4/datagram.c:51 [] __ip6_datagram_connect+0xaf9/0xdf0 net/ipv6/datagram.c:196 device eql entered promiscuous mode [] ip6_datagram_connect+0x2f/0x50 net/ipv6/datagram.c:268 [] inet_dgram_connect+0x16b/0x1f0 net/ipv4/af_inet.c:549 [] SYSC_connect+0x1b6/0x310 net/socket.c:1562 [] SyS_connect+0x24/0x30 net/socket.c:1543 [] do_syscall_64+0x1a5/0x490 arch/x86/entry/common.c:282 [] entry_SYSCALL_64_after_swapgs+0x47/0xc5 Allocated by task 9080: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:505 set_track mm/kasan/kasan.c:517 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:609 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:547 slab_post_alloc_hook mm/slab.h:417 [inline] slab_alloc_node mm/slub.c:2715 [inline] slab_alloc mm/slub.c:2723 [inline] kmem_cache_alloc+0xba/0x290 mm/slub.c:2728 dst_alloc+0x11f/0x1a0 net/core/dst.c:210 rt_dst_alloc+0x78/0x430 net/ipv4/route.c:1475 __mkroute_output net/ipv4/route.c:2133 [inline] __ip_route_output_key_hash+0xa4e/0x23e0 net/ipv4/route.c:2343 __ip_route_output_key include/net/route.h:122 [inline] ip_route_connect include/net/route.h:289 [inline] __ip4_datagram_connect+0xa17/0x1160 net/ipv4/datagram.c:51 __ip6_datagram_connect+0xaf9/0xdf0 net/ipv6/datagram.c:196 ip6_datagram_connect+0x2f/0x50 net/ipv6/datagram.c:268 inet_dgram_connect+0x16b/0x1f0 net/ipv4/af_inet.c:549 SYSC_connect+0x1b6/0x310 net/socket.c:1562 SyS_connect+0x24/0x30 net/socket.c:1543 do_syscall_64+0x1a5/0x490 arch/x86/entry/common.c:282 entry_SYSCALL_64_after_swapgs+0x47/0xc5 Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff8801cc8a58c0 which belongs to the cache ip_dst_cache of size 216 The buggy address is located 60 bytes to the right of 216-byte region [ffff8801cc8a58c0, ffff8801cc8a5998) The buggy address belongs to the page: page:ffffea0007322940 count:1 mapcount:0 mapping: (null) index:0x0 flags: 0x8000000000000080(slab) page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801cc8a5880: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff8801cc8a5900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8801cc8a5980: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8801cc8a5a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801cc8a5a80: 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc ==================================================================