sctp: [Deprecated]: syz-executor5 (pid 24336) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead ================================================================== BUG: KASAN: use-after-free in rt6_select net/ipv6/route.c:754 [inline] BUG: KASAN: use-after-free in ip6_pol_route+0x2989/0x2bb0 net/ipv6/route.c:1090 Read of size 4 at addr ffff8801caea4da8 by task kworker/u4:16/24373 CPU: 0 PID: 24373 Comm: kworker/u4:16 Not tainted 4.13.0-rc5+ #16 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 print_address_description+0x73/0x250 mm/kasan/report.c:252 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:754 [inline] ip6_pol_route+0x2989/0x2bb0 net/ipv6/route.c:1090 ip6_pol_route_output+0x4c/0x60 net/ipv6/route.c:1214 fib6_rule_lookup+0x9e/0x2a0 net/ipv6/ip6_fib.c:281 ip6_route_output_flags+0x1f1/0x2b0 net/ipv6/route.c:1242 ip6_dst_lookup_tail+0x671/0x970 net/ipv6/ip6_output.c:975 ip6_dst_lookup_flow+0xc8/0x270 net/ipv6/ip6_output.c:1076 inet6_csk_route_socket+0x7b2/0xc50 net/ipv6/inet6_connection_sock.c:110 inet6_csk_xmit+0xf9/0x560 net/ipv6/inet6_connection_sock.c:125 tcp_transmit_skb+0x1923/0x32d0 net/ipv4/tcp_output.c:1121 tcp_write_wakeup+0x3f2/0x570 net/ipv4/tcp_output.c:3655 tcp_send_probe0+0x49/0x3e0 net/ipv4/tcp_output.c:3677 tcp_probe_timer net/ipv4/tcp_timer.c:347 [inline] tcp_write_timer_handler+0x6dd/0x810 net/ipv4/tcp_timer.c:565 tcp_write_timer+0x146/0x160 net/ipv4/tcp_timer.c:579 call_timer_fn+0x233/0x830 kernel/time/timer.c:1268 expire_timers kernel/time/timer.c:1307 [inline] __run_timers+0x7fd/0xb90 kernel/time/timer.c:1601 run_timer_softirq+0x21/0x80 kernel/time/timer.c:1614 __do_softirq+0x2f5/0xba3 kernel/softirq.c:284 invoke_softirq kernel/softirq.c:364 [inline] irq_exit+0x1cc/0x200 kernel/softirq.c:405 exiting_irq arch/x86/include/asm/apic.h:638 [inline] smp_apic_timer_interrupt+0x76/0xa0 arch/x86/kernel/apic/apic.c:1044 apic_timer_interrupt+0x93/0xa0 arch/x86/entry/entry_64.S:702 RIP: 0010:__read_once_size include/linux/compiler.h:250 [inline] RIP: 0010:__sanitizer_cov_trace_pc+0x23/0x60 kernel/kcov.c:66 RSP: 0018:ffff8801c4797068 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff10 RAX: ffff8801c345c640 RBX: ffffea0006c88580 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 00007fffffffefc6 RDI: ffffed00388f2e00 RBP: ffff8801c4797420 R08: 0000000000000001 R09: 0000000000000004 R10: ffff8801c4796f28 R11: ffffffff8194e95c R12: ffffea0006c88580 R13: 1ffff100388f2e2f R14: 0000000000000002 R15: ffff8801c47973f8 follow_pmd_mask mm/gup.c:253 [inline] follow_pud_mask mm/gup.c:321 [inline] follow_p4d_mask mm/gup.c:347 [inline] follow_page_mask+0x9e3/0x1560 mm/gup.c:400 __get_user_pages+0x404/0x15d0 mm/gup.c:671 __get_user_pages_locked mm/gup.c:845 [inline] get_user_pages_remote+0x1c8/0x3a0 mm/gup.c:1050 get_arg_page fs/exec.c:216 [inline] copy_strings.isra.22+0x5c2/0xde0 fs/exec.c:552 do_execveat_common.isra.33+0x1631/0x2390 fs/exec.c:1780 do_execve+0x31/0x40 fs/exec.c:1834 call_usermodehelper_exec_async+0x457/0x8f0 kernel/kmod.c:248 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:425 Allocated by task 28122: 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+0xad/0xe0 mm/kasan/kasan.c:551 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489 kmem_cache_alloc+0x127/0x750 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+0x4b2/0x24c0 net/ipv6/route.c:1863 ip6_route_multipath_add+0x4d5/0x1630 net/ipv6/route.c:3132 inet6_rtm_newroute+0xd4/0x150 net/ipv6/route.c:3281 rtnetlink_rcv_msg+0x733/0x1090 net/core/rtnetlink.c:4246 netlink_rcv_skb+0x216/0x440 net/netlink/af_netlink.c:2397 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:4258 netlink_unicast_kernel net/netlink/af_netlink.c:1265 [inline] netlink_unicast+0x4e8/0x6f0 net/netlink/af_netlink.c:1291 netlink_sendmsg+0xa4a/0xe60 net/netlink/af_netlink.c:1854 sock_sendmsg_nosec net/socket.c:633 [inline] sock_sendmsg+0xca/0x110 net/socket.c:643 sock_write_iter+0x31a/0x5d0 net/socket.c:912 call_write_iter include/linux/fs.h:1743 [inline] do_iter_readv_writev+0x525/0x7f0 fs/read_write.c:650 do_iter_write+0x154/0x540 fs/read_write.c:929 vfs_writev+0x18a/0x340 fs/read_write.c:975 do_writev+0xfc/0x2a0 fs/read_write.c:1011 SYSC_writev fs/read_write.c:1084 [inline] SyS_writev+0x27/0x30 fs/read_write.c:1081 entry_SYSCALL_64_fastpath+0x1f/0xbe Freed by task 3008: 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+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3503 [inline] kmem_cache_free+0x77/0x280 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 ffff8801caea4c40 which belongs to the cache ip6_dst_cache of size 384 The buggy address is located 360 bytes inside of 384-byte region [ffff8801caea4c40, ffff8801caea4dc0) The buggy address belongs to the page: page:ffffea00072ba900 count:1 mapcount:0 mapping:ffff8801caea4000 index:0x0 flags: 0x200000000000100(slab) raw: 0200000000000100 ffff8801caea4000 0000000000000000 0000000100000009 raw: ffffea000736bb20 ffffea0007234a60 ffff8801d3f671c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801caea4c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801caea4d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801caea4d80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff8801caea4e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801caea4e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================