================================================================== BUG: KASAN: slab-out-of-bounds in rt_cache_valid+0x158/0x190 net/ipv4/route.c:1560 Read of size 2 at addr ffff88808c7885b2 by task syz-executor.5/29179 CPU: 0 PID: 29179 Comm: syz-executor.5 Not tainted 5.2.0-rc1+ #4 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:188 __kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 kasan_report+0x12/0x20 mm/kasan/common.c:614 __asan_report_load2_noabort+0x14/0x20 mm/kasan/generic_report.c:130 rt_cache_valid+0x158/0x190 net/ipv4/route.c:1560 __mkroute_output net/ipv4/route.c:2336 [inline] ip_route_output_key_hash_rcu+0x819/0x2d50 net/ipv4/route.c:2568 ip_route_output_key_hash+0x1ef/0x360 net/ipv4/route.c:2397 icmp_route_lookup.constprop.0+0x457/0x1570 net/ipv4/icmp.c:489 __icmp_send+0x94a/0x13f0 net/ipv4/icmp.c:715 icmp_send include/net/icmp.h:47 [inline] ip_options_compile+0xae/0xf0 net/ipv4/ip_options.c:485 ip_rcv_options net/ipv4/ip_input.c:285 [inline] ip_rcv_finish_core.isra.0+0x6a2/0x1b60 net/ipv4/ip_input.c:362 ip_rcv_finish+0x143/0x2f0 net/ipv4/ip_input.c:418 NF_HOOK include/linux/netfilter.h:305 [inline] NF_HOOK include/linux/netfilter.h:299 [inline] ip_rcv+0xe8/0x3f0 net/ipv4/ip_input.c:530 __netif_receive_skb_one_core+0x113/0x1a0 net/core/dev.c:4990 __netif_receive_skb+0x2c/0x1d0 net/core/dev.c:5104 netif_receive_skb_internal+0x117/0x5c0 net/core/dev.c:5207 napi_frags_finish net/core/dev.c:5774 [inline] napi_gro_frags+0xada/0xd10 net/core/dev.c:5848 tun_get_user+0x2f3c/0x3ff0 drivers/net/tun.c:1991 tun_chr_write_iter+0xbd/0x156 drivers/net/tun.c:2037 call_write_iter include/linux/fs.h:1872 [inline] do_iter_readv_writev+0x5f8/0x8f0 fs/read_write.c:693 do_iter_write fs/read_write.c:970 [inline] do_iter_write+0x184/0x610 fs/read_write.c:951 vfs_writev+0x1b3/0x2f0 fs/read_write.c:1015 do_writev+0x15b/0x330 fs/read_write.c:1058 __do_sys_writev fs/read_write.c:1131 [inline] __se_sys_writev fs/read_write.c:1128 [inline] __x64_sys_writev+0x75/0xb0 fs/read_write.c:1128 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459131 Code: 75 14 b8 14 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 34 b9 fb ff c3 48 83 ec 08 e8 fa 2c 00 00 48 89 04 24 b8 14 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 43 2d 00 00 48 89 d0 48 83 c4 08 48 3d 01 RSP: 002b:00007f7a82fa4ba0 EFLAGS: 00000293 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 000000000000004a RCX: 0000000000459131 RDX: 0000000000000001 RSI: 00007f7a82fa4c00 RDI: 00000000000000f0 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: 00007f7a82fa56d4 R13: 00000000004c7d21 R14: 00000000004de160 R15: 00000000ffffffff Allocated by task 19771: save_stack+0x23/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_kmalloc mm/kasan/common.c:489 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:462 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:497 slab_post_alloc_hook mm/slab.h:437 [inline] slab_alloc mm/slab.c:3326 [inline] kmem_cache_alloc+0x11a/0x6f0 mm/slab.c:3488 dst_alloc+0x10e/0x200 net/core/dst.c:93 rt_dst_alloc+0x83/0x3f0 net/ipv4/route.c:1628 __mkroute_output net/ipv4/route.c:2341 [inline] ip_route_output_key_hash_rcu+0x8f3/0x2d50 net/ipv4/route.c:2568 ip_route_output_key_hash+0x1ef/0x360 net/ipv4/route.c:2397 __ip_route_output_key include/net/route.h:129 [inline] ip_route_output_flow+0x28/0xc0 net/ipv4/route.c:2655 ip_route_output_key include/net/route.h:139 [inline] sctp_v4_get_dst+0x467/0x1260 net/sctp/protocol.c:450 sctp_transport_route+0x12d/0x360 net/sctp/transport.c:312 sctp_assoc_add_peer+0x53e/0xfc0 net/sctp/associola.c:678 sctp_process_param net/sctp/sm_make_chunk.c:2546 [inline] sctp_process_init+0x2491/0x2b10 net/sctp/sm_make_chunk.c:2359 sctp_cmd_process_init net/sctp/sm_sideeffect.c:682 [inline] sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1384 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1194 [inline] sctp_do_sm+0x3a30/0x50e0 net/sctp/sm_sideeffect.c:1165 sctp_assoc_bh_rcv+0x343/0x660 net/sctp/associola.c:1074 sctp_inq_push+0x1e4/0x280 net/sctp/inqueue.c:95 sctp_backlog_rcv+0x196/0xbe0 net/sctp/input.c:354 sk_backlog_rcv include/net/sock.h:950 [inline] __release_sock+0x129/0x390 net/core/sock.c:2418 release_sock+0x59/0x1c0 net/core/sock.c:2934 sctp_wait_for_connect+0x316/0x540 net/sctp/socket.c:9054 __sctp_connect+0xab2/0xcd0 net/sctp/socket.c:1241 sctp_connect net/sctp/socket.c:4861 [inline] sctp_inet_connect+0x29c/0x340 net/sctp/socket.c:4877 __sys_connect+0x264/0x330 net/socket.c:1840 __do_sys_connect net/socket.c:1851 [inline] __se_sys_connect net/socket.c:1848 [inline] __x64_sys_connect+0x73/0xb0 net/socket.c:1848 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 18903: save_stack+0x23/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:451 kasan_slab_free+0xe/0x10 mm/kasan/common.c:459 __cache_free mm/slab.c:3432 [inline] kmem_cache_free+0x86/0x260 mm/slab.c:3698 dst_destroy+0x29e/0x3c0 net/core/dst.c:129 dst_destroy_rcu+0x16/0x19 net/core/dst.c:142 __rcu_reclaim kernel/rcu/rcu.h:222 [inline] rcu_do_batch kernel/rcu/tree.c:2092 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2310 [inline] rcu_core+0xba5/0x1500 kernel/rcu/tree.c:2291 __do_softirq+0x25c/0x94c kernel/softirq.c:293 The buggy address belongs to the object at ffff88808c788500 which belongs to the cache ip_dst_cache of size 176 The buggy address is located 2 bytes to the right of 176-byte region [ffff88808c788500, ffff88808c7885b0) The buggy address belongs to the page: page:ffffea000231e200 refcount:1 mapcount:0 mapping:ffff88821af3a340 index:0xffff88808c788900 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea000257a748 ffffea00027e8a88 ffff88821af3a340 raw: ffff88808c788900 ffff88808c788000 0000000100000007 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808c788480: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc ffff88808c788500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88808c788580: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc ^ ffff88808c788600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808c788680: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc ==================================================================