================================================================== BUG: KASAN: use-after-free in rt6_select net/ipv6/route.c:757 [inline] BUG: KASAN: use-after-free in ip6_pol_route+0x2989/0x2bb0 net/ipv6/route.c:1093 Read of size 4 at addr ffff8801c2ee6da8 by task syz-executor6/5439 CPU: 1 PID: 5439 Comm: syz-executor6 Not tainted 4.13.0-rc4+ #2 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 sctp: [Deprecated]: syz-executor5 (pid 5447) Use of int in max_burst socket option deprecated. Use struct sctp_assoc_value instead Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 print_address_description+0x7f/0x260 mm/kasan/report.c:252 sctp: [Deprecated]: syz-executor5 (pid 5444) Use of int in max_burst socket option deprecated. Use struct sctp_assoc_value instead kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x24e/0x340 mm/kasan/report.c:409 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:429 rt6_select net/ipv6/route.c:757 [inline] ip6_pol_route+0x2989/0x2bb0 net/ipv6/route.c:1093 ip6_pol_route_output+0x4c/0x60 net/ipv6/route.c:1217 fib6_rule_lookup+0x9e/0x2a0 net/ipv6/ip6_fib.c:281 ip6_route_output_flags+0x1f1/0x2b0 net/ipv6/route.c:1245 ip6_route_output include/net/ip6_route.h:80 [inline] ip6_dst_lookup_tail+0x4ea/0x970 net/ipv6/ip6_output.c:953 ip6_dst_lookup_flow+0xc8/0x270 net/ipv6/ip6_output.c:1076 tcp_v6_connect+0xdd8/0x20e0 net/ipv6/tcp_ipv6.c:255 __inet_stream_connect+0x2d4/0xf00 net/ipv4/af_inet.c:618 inet_stream_connect+0x58/0xa0 net/ipv4/af_inet.c:682 SYSC_connect+0x204/0x470 net/socket.c:1642 SyS_connect+0x24/0x30 net/socket.c:1623 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x4512e9 RSP: 002b:00007f9cd3ddbc08 EFLAGS: 00000216 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 0000000000718000 RCX: 00000000004512e9 RDX: 000000000000001c RSI: 0000000020000fe4 RDI: 0000000000000005 RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000216 R12: 0000000000000000 R13: 0000000000a6f7ef R14: 00007f9cd3ddc9c0 R15: 0000000000000000 Allocated by task 1137: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xaa/0xd0 mm/kasan/kasan.c:551 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489 kmem_cache_alloc+0x101/0x6e0 mm/slab.c:3561 dst_alloc+0x11f/0x1a0 net/core/dst.c:107 __ip6_dst_alloc+0x34/0x60 net/ipv6/route.c:355 ip6_dst_alloc+0x2d/0x1f0 net/ipv6/route.c:368 ip6_route_info_create+0x4c6/0x24e0 net/ipv6/route.c:1871 ip6_route_add+0xa2/0x1a0 net/ipv6/route.c:2108 ipv6_route_ioctl+0x4cf/0x690 net/ipv6/route.c:2624 inet6_ioctl+0xef/0x1e0 net/ipv6/af_inet6.c:520 sock_do_ioctl+0x65/0xb0 net/socket.c:961 sock_ioctl+0x2c2/0x440 net/socket.c:1058 vfs_ioctl fs/ioctl.c:45 [inline] do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:685 SYSC_ioctl fs/ioctl.c:700 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:691 entry_SYSCALL_64_fastpath+0x1f/0xbe Freed by task 3514: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x6e/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3503 [inline] kmem_cache_free+0x71/0x240 mm/slab.c:3763 dst_destroy+0x1de/0x2d0 net/core/dst.c:138 dst_destroy_rcu+0x16/0x20 net/core/dst.c:151 __rcu_reclaim kernel/rcu/rcu.h:195 [inline] rcu_do_batch kernel/rcu/tree.c:2777 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:3031 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2998 [inline] rcu_process_callbacks+0xd3e/0x17b0 kernel/rcu/tree.c:3015 __do_softirq+0x2f5/0xba3 kernel/softirq.c:284 The buggy address belongs to the object at ffff8801c2ee6c40 which belongs to the cache ip6_dst_cache of size 384 The buggy address is located 360 bytes inside of 384-byte region [ffff8801c2ee6c40, ffff8801c2ee6dc0) The buggy address belongs to the page: page:ffffea00062a4250 count:1 mapcount:0 mapping:ffff8801c2ee6000 index:0x0 flags: 0x200000000000100(slab) raw: 0200000000000100 ffff8801c2ee6000 0000000000000000 0000000100000009 raw: ffffea0005de4490 ffffea000641b1a8 ffff8801d535cc00 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c2ee6c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801c2ee6d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801c2ee6d80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff8801c2ee6e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801c2ee6e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================