IPVS: ftp: loaded support on port[0] = 21 ================================================================== BUG: KASAN: use-after-free in ip_tunnel_lookup+0x108a/0x12b0 net/ipv4/ip_tunnel.c:142 Read of size 4 at addr ffff888197b59544 by task ksoftirqd/1/16 CPU: 1 PID: 16 Comm: ksoftirqd/1 Not tainted 4.20.0-rc7+ #356 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+0x244/0x39d lib/dump_stack.c:113 print_address_description.cold.7+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.8+0x242/0x309 mm/kasan/report.c:412 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:432 ip_tunnel_lookup+0x108a/0x12b0 net/ipv4/ip_tunnel.c:142 ipgre_err net/ipv4/ip_gre.c:158 [inline] gre_err+0x6b0/0x14d0 net/ipv4/ip_gre.c:253 gre_err+0x244/0x480 net/ipv4/gre_demux.c:167 icmp_socket_deliver+0x295/0x460 net/ipv4/icmp.c:766 icmp_unreach+0x3bc/0xca0 net/ipv4/icmp.c:883 icmp_rcv+0xf4e/0x1630 net/ipv4/icmp.c:1065 ip_protocol_deliver_rcu+0xb6/0xa20 net/ipv4/ip_input.c:208 ip_local_deliver_finish+0x234/0x380 net/ipv4/ip_input.c:234 NF_HOOK include/linux/netfilter.h:289 [inline] ip_local_deliver+0x1e9/0x750 net/ipv4/ip_input.c:255 dst_input include/net/dst.h:450 [inline] ip_rcv_finish+0x1f9/0x300 net/ipv4/ip_input.c:414 NF_HOOK include/linux/netfilter.h:289 [inline] ip_rcv+0xed/0x600 net/ipv4/ip_input.c:523 __netif_receive_skb_one_core+0x14d/0x200 net/core/dev.c:4973 __netif_receive_skb+0x2c/0x1e0 net/core/dev.c:5083 process_backlog+0x24e/0x7a0 net/core/dev.c:5923 napi_poll net/core/dev.c:6346 [inline] net_rx_action+0x7fa/0x19b0 net/core/dev.c:6412 __do_softirq+0x308/0xb7e kernel/softirq.c:292 run_ksoftirqd+0x5e/0x100 kernel/softirq.c:654 smpboot_thread_fn+0x68b/0xa00 kernel/smpboot.c:164 kthread+0x35a/0x440 kernel/kthread.c:246 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 Allocated by task 6161: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 __do_kmalloc_node mm/slab.c:3684 [inline] __kmalloc_node+0x50/0x70 mm/slab.c:3691 kmalloc_node include/linux/slab.h:589 [inline] kvmalloc_node+0x65/0xf0 mm/util.c:416 kvmalloc include/linux/mm.h:577 [inline] kvzalloc include/linux/mm.h:585 [inline] alloc_netdev_mqs+0x17b/0xfe0 net/core/dev.c:9037 __ip_tunnel_create+0x1d9/0x550 net/ipv4/ip_tunnel.c:269 ip_tunnel_init_net+0x3fc/0xac0 net/ipv4/ip_tunnel.c:1029 ipgre_tap_init_net+0x29/0x30 net/ipv4/ip_gre.c:1635 ops_init+0x101/0x560 net/core/net_namespace.c:129 setup_net+0x362/0x8d0 net/core/net_namespace.c:314 copy_net_ns+0x2b1/0x4a0 net/core/net_namespace.c:437 create_new_namespaces+0x6ad/0x900 kernel/nsproxy.c:107 unshare_nsproxy_namespaces+0xc3/0x1f0 kernel/nsproxy.c:206 ksys_unshare+0x79c/0x10b0 kernel/fork.c:2539 __do_sys_unshare kernel/fork.c:2607 [inline] __se_sys_unshare kernel/fork.c:2605 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:2605 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 7820: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xcf/0x230 mm/slab.c:3817 kvfree+0x61/0x70 mm/util.c:445 netdev_freemem+0x4c/0x60 net/core/dev.c:8991 netdev_release+0x121/0x180 net/core/net-sysfs.c:1640 device_release+0x7e/0x210 drivers/base/core.c:891 kobject_cleanup lib/kobject.c:662 [inline] kobject_release lib/kobject.c:691 [inline] kref_put include/linux/kref.h:70 [inline] kobject_put.cold.9+0x287/0x2e4 lib/kobject.c:708 netdev_run_todo+0x715/0xa60 net/core/dev.c:8896 rtnl_unlock+0xe/0x10 net/core/rtnetlink.c:117 ip_tunnel_delete_nets+0x4d7/0x6d0 net/ipv4/ip_tunnel.c:1083 ipgre_tap_exit_batch_net+0x22/0x30 net/ipv4/ip_gre.c:1640 ops_exit_list.isra.5+0x105/0x160 net/core/net_namespace.c:156 cleanup_net+0x555/0xb10 net/core/net_namespace.c:551 process_one_work+0xc90/0x1c40 kernel/workqueue.c:2153 worker_thread+0x17f/0x1390 kernel/workqueue.c:2296 kthread+0x35a/0x440 kernel/kthread.c:246 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 The buggy address belongs to the object at ffff888197b58a00 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 2884 bytes inside of 4096-byte region [ffff888197b58a00, ffff888197b59a00) The buggy address belongs to the page: page:ffffea00065ed600 count:1 mapcount:0 mapping:ffff8881da800dc0 index:0x0 compound_mapcount: 0 flags: 0x2fffc0000010200(slab|head) raw: 02fffc0000010200 ffffea00065ed508 ffffea000661ad88 ffff8881da800dc0 raw: 0000000000000000 ffff888197b58a00 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888197b59400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888197b59480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888197b59500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888197b59580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888197b59600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================