================================================================== BUG: KASAN: use-after-free in ipv6_prefix_equal include/net/ipv6.h:540 [inline] BUG: KASAN: use-after-free in fib6_add_1+0x165f/0x1790 net/ipv6/ip6_fib.c:618 Read of size 8 at addr ffff8801bfb92b58 by task syz-executor0/6789 CPU: 1 PID: 6789 Comm: syz-executor0 Not tainted 4.15.0-rc7+ #188 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x25b/0x340 mm/kasan/report.c:409 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 ipv6_prefix_equal include/net/ipv6.h:540 [inline] fib6_add_1+0x165f/0x1790 net/ipv6/ip6_fib.c:618 fib6_add+0x5fa/0x1540 net/ipv6/ip6_fib.c:1214 __ip6_ins_rt+0x6c/0x90 net/ipv6/route.c:1003 ip6_route_add+0x141/0x190 net/ipv6/route.c:2790 ipv6_route_ioctl+0x4db/0x6b0 net/ipv6/route.c:3299 inet6_ioctl+0xef/0x1e0 net/ipv6/af_inet6.c:520 sock_do_ioctl+0x65/0xb0 net/socket.c:958 sock_ioctl+0x2c2/0x440 net/socket.c:1055 vfs_ioctl fs/ioctl.c:46 [inline] do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 entry_SYSCALL_64_fastpath+0x23/0x9a RIP: 0033:0x452cf9 RSP: 002b:00007f5d6701fc58 EFLAGS: 00000212 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000452cf9 RDX: 0000000020fd7000 RSI: 000000000000890b RDI: 0000000000000014 RBP: 0000000000000579 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f63f8 R13: 00000000ffffffff R14: 00007f5d670206d4 R15: 0000000000000000 Allocated by task 3913: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489 kmem_cache_alloc+0x12e/0x760 mm/slab.c:3544 dst_alloc+0x11f/0x1a0 net/core/dst.c:104 __ip6_dst_alloc+0x35/0x90 net/ipv6/route.c:361 ip6_dst_alloc+0x29/0xb0 net/ipv6/route.c:376 ip6_route_info_create+0x4ff/0x2e20 net/ipv6/route.c:2538 ip6_route_add+0xa2/0x190 net/ipv6/route.c:2779 ipv6_route_ioctl+0x4db/0x6b0 net/ipv6/route.c:3299 inet6_ioctl+0xef/0x1e0 net/ipv6/af_inet6.c:520 sock_do_ioctl+0x65/0xb0 net/socket.c:958 sock_ioctl+0x2c2/0x440 net/socket.c:1055 vfs_ioctl fs/ioctl.c:46 [inline] do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 entry_SYSCALL_64_fastpath+0x23/0x9a Freed by task 3913: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3488 [inline] kmem_cache_free+0x83/0x2a0 mm/slab.c:3746 dst_destroy+0x257/0x370 net/core/dst.c:140 dst_release_immediate+0x4c/0x90 net/core/dst.c:205 ip6_route_info_create+0x15ac/0x2e20 net/ipv6/route.c:2767 ip6_route_add+0xa2/0x190 net/ipv6/route.c:2779 ipv6_route_ioctl+0x4db/0x6b0 net/ipv6/route.c:3299 inet6_ioctl+0xef/0x1e0 net/ipv6/af_inet6.c:520 sock_do_ioctl+0x65/0xb0 net/socket.c:958 sock_ioctl+0x2c2/0x440 net/socket.c:1055 vfs_ioctl fs/ioctl.c:46 [inline] do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 entry_SYSCALL_64_fastpath+0x23/0x9a The buggy address belongs to the object at ffff8801bfb92a80 which belongs to the cache ip6_dst_cache of size 320 The buggy address is located 216 bytes inside of 320-byte region [ffff8801bfb92a80, ffff8801bfb92bc0) The buggy address belongs to the page: page:ffffea0006fee480 count:1 mapcount:0 mapping:ffff8801bfb92000 index:0x0 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff8801bfb92000 0000000000000000 000000010000000a raw: ffffea0007069c60 ffffea000760e0a0 ffff8801d324fc00 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801bfb92a00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff8801bfb92a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801bfb92b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801bfb92b80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8801bfb92c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================