================================================================== 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+0xb5/0xa10 net/ipv6/route.c:749 Read of size 8 at addr ffff8880923b4320 by task kworker/0:21/2766 CPU: 0 PID: 2766 Comm: kworker/0:21 Not tainted 5.6.0-rc2-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+0x1fb/0x318 lib/dump_stack.c:118 print_address_description+0x74/0x5c0 mm/kasan/report.c:374 __kasan_report+0x149/0x1c0 mm/kasan/report.c:506 kasan_report+0x26/0x50 mm/kasan/common.c:641 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:135 __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+0xb5/0xa10 net/ipv6/route.c:749 __find_rr_leaf+0x1f6/0xb50 net/ipv6/route.c:837 find_rr_leaf net/ipv6/route.c:858 [inline] rt6_select net/ipv6/route.c:902 [inline] fib6_table_lookup+0x44f/0xb00 net/ipv6/route.c:2170 ip6_pol_route+0x187/0x1910 net/ipv6/route.c:2206 ip6_pol_route_input+0x54/0x80 net/ipv6/route.c:2264 fib6_rule_lookup+0x1e3/0x640 net/ipv6/fib6_rules.c:114 ip6_route_input_lookup net/ipv6/route.c:2276 [inline] ip6_route_input+0x792/0xb20 net/ipv6/route.c:2445 ip6_rcv_finish_core+0x1f5/0x400 net/ipv6/ip6_input.c:63 ip6_rcv_finish+0x138/0x260 net/ipv6/ip6_input.c:74 NF_HOOK include/linux/netfilter.h:307 [inline] ipv6_rcv+0xb0/0xe0 net/ipv6/ip6_input.c:306 __netif_receive_skb_one_core net/core/dev.c:5198 [inline] __netif_receive_skb+0x136/0x370 net/core/dev.c:5312 process_backlog+0x4e8/0x980 net/core/dev.c:6144 napi_poll net/core/dev.c:6582 [inline] net_rx_action+0x5ef/0x10c0 net/core/dev.c:6650 __do_softirq+0x283/0x7bd kernel/softirq.c:292 do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1082 do_softirq+0xfd/0x190 kernel/softirq.c:337 __local_bh_enable_ip+0x194/0x240 kernel/softirq.c:189 local_bh_enable+0x1f/0x30 include/linux/bottom_half.h:32 rcu_read_unlock_bh include/linux/rcupdate.h:690 [inline] ip6_finish_output2+0x10ca/0x13e0 net/ipv6/ip6_output.c:117 __ip6_finish_output+0x693/0x8c0 net/ipv6/ip6_output.c:142 ip6_finish_output+0x52/0x1e0 net/ipv6/ip6_output.c:152 NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip6_output+0x2c2/0x3c0 net/ipv6/ip6_output.c:175 dst_output include/net/dst.h:436 [inline] NF_HOOK include/linux/netfilter.h:307 [inline] ndisc_send_skb+0xa33/0xe20 net/ipv6/ndisc.c:505 ndisc_send_ns+0x5c6/0x7b0 net/ipv6/ndisc.c:647 addrconf_dad_work+0xaa7/0x1c20 net/ipv6/addrconf.c:4120 process_one_work+0x7f5/0x10f0 kernel/workqueue.c:2264 worker_thread+0xbbc/0x1630 kernel/workqueue.c:2410 kthread+0x332/0x350 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Allocated by task 8889: save_stack mm/kasan/common.c:72 [inline] set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc+0x118/0x1c0 mm/kasan/common.c:515 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:529 __do_kmalloc_node mm/slab.c:3616 [inline] __kmalloc_node+0x4d/0x60 mm/slab.c:3623 kmalloc_node include/linux/slab.h:578 [inline] kvmalloc_node+0x85/0x110 mm/util.c:574 kvmalloc include/linux/mm.h:645 [inline] kvzalloc include/linux/mm.h:653 [inline] alloc_netdev_mqs+0x8e/0xd40 net/core/dev.c:9797 vti6_init_net+0x112/0x320 net/ipv6/ip6_vti.c:1119 ops_init+0x355/0x430 net/core/net_namespace.c:137 setup_net+0x1eb/0x7f0 net/core/net_namespace.c:327 copy_net_ns+0x334/0x540 net/core/net_namespace.c:468 create_new_namespaces+0x4d7/0x9c0 kernel/nsproxy.c:108 unshare_nsproxy_namespaces+0x12a/0x190 kernel/nsproxy.c:229 ksys_unshare+0x478/0xa00 kernel/fork.c:2955 __do_sys_unshare kernel/fork.c:3023 [inline] __se_sys_unshare kernel/fork.c:3021 [inline] __x64_sys_unshare+0x38/0x40 kernel/fork.c:3021 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8889: save_stack mm/kasan/common.c:72 [inline] set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:337 [inline] __kasan_slab_free+0x12e/0x1e0 mm/kasan/common.c:476 kasan_slab_free+0xe/0x10 mm/kasan/common.c:485 __cache_free mm/slab.c:3426 [inline] kfree+0x10d/0x220 mm/slab.c:3757 __netdev_name_node_alt_destroy net/core/dev.c:322 [inline] netdev_name_node_alt_destroy+0x35c/0x380 net/core/dev.c:334 rtnl_alt_ifname net/core/rtnetlink.c:3518 [inline] rtnl_linkprop+0x42d/0x680 net/core/rtnetlink.c:3567 rtnl_dellinkprop+0x2a/0x40 net/core/rtnetlink.c:3588 rtnetlink_rcv_msg+0x889/0xd40 net/core/rtnetlink.c:5438 netlink_rcv_skb+0x19e/0x3e0 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:5456 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x766/0x920 net/netlink/af_netlink.c:1328 netlink_sendmsg+0xa2b/0xd40 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg net/socket.c:672 [inline] ____sys_sendmsg+0x4f7/0x7f0 net/socket.c:2343 ___sys_sendmsg net/socket.c:2397 [inline] __sys_sendmsg+0x1ed/0x290 net/socket.c:2430 __do_sys_sendmsg net/socket.c:2439 [inline] __se_sys_sendmsg net/socket.c:2437 [inline] __x64_sys_sendmsg+0x7f/0x90 net/socket.c:2437 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880923b4000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 800 bytes inside of 4096-byte region [ffff8880923b4000, ffff8880923b5000) The buggy address belongs to the page: page:ffffea000248ed00 refcount:1 mapcount:0 mapping:ffff8880aa402000 index:0x0 compound_mapcount: 0 flags: 0xfffe0000010200(slab|head) raw: 00fffe0000010200 ffffea00029b4608 ffffea00029c9188 ffff8880aa402000 raw: 0000000000000000 ffff8880923b4000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880923b4200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880923b4280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880923b4300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880923b4380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880923b4400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================