================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:199 [inline] BUG: KASAN: use-after-free in __in6_dev_get include/net/addrconf.h:309 [inline] BUG: KASAN: use-after-free in ip6_ignore_linkdown include/net/addrconf.h:400 [inline] BUG: KASAN: use-after-free in find_match+0x961/0xb90 net/ipv6/route.c:743 Read of size 8 at addr ffff8880896c0a60 by task kworker/1:0/17 CPU: 1 PID: 17 Comm: kworker/1:0 Not tainted 5.3.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: ipv6_addrconf addrconf_dad_work Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x113/0x167 lib/dump_stack.c:113 print_address_description.constprop.8.cold.10+0x9/0x31d mm/kasan/report.c:374 __kasan_report.cold.11+0x1b/0x3a mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:634 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 __read_once_size include/linux/compiler.h:199 [inline] __in6_dev_get include/net/addrconf.h:309 [inline] ip6_ignore_linkdown include/net/addrconf.h:400 [inline] find_match+0x961/0xb90 net/ipv6/route.c:743 __find_rr_leaf+0x190/0x610 net/ipv6/route.c:831 find_rr_leaf net/ipv6/route.c:852 [inline] rt6_select net/ipv6/route.c:896 [inline] fib6_table_lookup+0x539/0x9e0 net/ipv6/route.c:2164 ip6_pol_route+0x1a0/0x7f0 net/ipv6/route.c:2200 ip6_pol_route_input+0x4f/0x80 net/ipv6/route.c:2258 fib6_rule_lookup+0x10c/0x730 net/ipv6/fib6_rules.c:113 ip6_route_input_lookup+0x7e/0x90 net/ipv6/route.c:2270 ip6_route_input+0x4bc/0x840 net/ipv6/route.c:2442 ip6_rcv_finish_core.isra.16+0xce/0x3f0 net/ipv6/ip6_input.c:63 ip6_rcv_finish+0x138/0x290 net/ipv6/ip6_input.c:74 NF_HOOK include/linux/netfilter.h:305 [inline] ipv6_rcv+0xf3/0x310 net/ipv6/ip6_input.c:274 __netif_receive_skb_one_core+0xe9/0x170 net/core/dev.c:5118 __netif_receive_skb+0x1f/0x1b0 net/core/dev.c:5232 process_backlog+0x1ca/0x6d0 net/core/dev.c:6063 napi_poll net/core/dev.c:6500 [inline] net_rx_action+0x458/0xe40 net/core/dev.c:6568 __do_softirq+0x262/0x9a8 kernel/softirq.c:292 do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1082 do_softirq.part.12+0x126/0x160 kernel/softirq.c:337 do_softirq kernel/softirq.c:329 [inline] __local_bh_enable_ip+0x21d/0x260 kernel/softirq.c:189 local_bh_enable include/linux/bottom_half.h:32 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:688 [inline] ip6_finish_output2+0xca1/0x22f0 net/ipv6/ip6_output.c:117 __ip6_finish_output+0x36c/0x930 net/ipv6/ip6_output.c:142 ip6_finish_output+0x27/0x170 net/ipv6/ip6_output.c:152 NF_HOOK_COND include/linux/netfilter.h:294 [inline] ip6_output+0x1bf/0x630 net/ipv6/ip6_output.c:175 dst_output include/net/dst.h:436 [inline] NF_HOOK include/linux/netfilter.h:305 [inline] mld_sendpack+0x870/0xcb0 net/ipv6/mcast.c:1682 mld_send_initial_cr.part.32+0xd7/0x110 net/ipv6/mcast.c:2099 mld_send_initial_cr net/ipv6/mcast.c:2112 [inline] ipv6_mc_dad_complete+0x14d/0x1a0 net/ipv6/mcast.c:2106 addrconf_dad_completed+0x86f/0xbb0 net/ipv6/addrconf.c:4176 addrconf_dad_work+0x63c/0xf60 net/ipv6/addrconf.c:4107 process_one_work+0x856/0x1630 kernel/workqueue.c:2269 worker_thread+0x85/0xb60 kernel/workqueue.c:2415 kthread+0x331/0x3f0 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Allocated by task 8068: save_stack+0x21/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc.constprop.13+0xc7/0xd0 mm/kasan/common.c:510 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:524 __do_kmalloc_node mm/slab.c:3615 [inline] __kmalloc_node+0x4d/0x70 mm/slab.c:3622 kmalloc_node include/linux/slab.h:595 [inline] kvmalloc_node+0x6a/0x80 mm/util.c:564 kvmalloc include/linux/mm.h:670 [inline] kvzalloc include/linux/mm.h:678 [inline] alloc_netdev_mqs+0x5d/0xbf0 net/core/dev.c:9311 vti6_init_net+0x1ba/0x670 net/ipv6/ip6_vti.c:1110 ops_init+0x95/0x380 net/core/net_namespace.c:137 setup_net+0x2d1/0x7a0 net/core/net_namespace.c:334 copy_net_ns+0x24a/0x370 net/core/net_namespace.c:475 create_new_namespaces+0x483/0x750 kernel/nsproxy.c:103 unshare_nsproxy_namespaces+0x87/0x1a0 kernel/nsproxy.c:202 ksys_unshare+0x324/0x720 kernel/fork.c:2836 __do_sys_unshare kernel/fork.c:2904 [inline] __se_sys_unshare kernel/fork.c:2902 [inline] __x64_sys_unshare+0x2c/0x40 kernel/fork.c:2902 do_syscall_64+0xca/0x5d0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8362: save_stack+0x21/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] kasan_set_free_info mm/kasan/common.c:332 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:471 kasan_slab_free+0xe/0x10 mm/kasan/common.c:480 __cache_free mm/slab.c:3425 [inline] kfree+0x108/0x2c0 mm/slab.c:3756 __netdev_name_node_alt_destroy+0x1d0/0x270 net/core/dev.c:321 netdev_name_node_alt_destroy+0x43/0x70 net/core/dev.c:333 rtnl_alt_ifname net/core/rtnetlink.c:3400 [inline] rtnl_linkprop.isra.32+0x4e8/0x630 net/core/rtnetlink.c:3452 rtnl_dellinkprop+0x40/0x60 net/core/rtnetlink.c:3473 rtnetlink_rcv_msg+0x34f/0x8f0 net/core/rtnetlink.c:5323 netlink_rcv_skb+0x13c/0x380 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:5341 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x43b/0x640 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x74b/0xbf0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:657 ___sys_sendmsg+0x647/0x950 net/socket.c:2311 __sys_sendmsg+0xd9/0x180 net/socket.c:2356 __do_sys_sendmsg net/socket.c:2365 [inline] __se_sys_sendmsg net/socket.c:2363 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2363 do_syscall_64+0xca/0x5d0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880896c0740 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 800 bytes inside of 4096-byte region [ffff8880896c0740, ffff8880896c1740) The buggy address belongs to the page: page:ffffea000225b000 refcount:1 mapcount:0 mapping:ffff8880aa402000 index:0x0 compound_mapcount: 0 flags: 0xfffe0000010200(slab|head) raw: 00fffe0000010200 ffffea000261fc08 ffffea000225b088 ffff8880aa402000 raw: 0000000000000000 ffff8880896c0740 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880896c0900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880896c0980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880896c0a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880896c0a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880896c0b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================