device veth1_vlan left promiscuous mode device veth0_vlan left promiscuous mode ================================================================== BUG: KASAN: use-after-free in __fib6_drop_pcpu_from.part.0+0x36a/0x390 net/ipv6/ip6_fib.c:978 Read of size 8 at addr ffff88802d7a4bb0 by task kworker/u4:13/10865 CPU: 1 PID: 10865 Comm: kworker/u4:13 Not tainted 5.12.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: netns cleanup_net Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:436 __fib6_drop_pcpu_from.part.0+0x36a/0x390 net/ipv6/ip6_fib.c:978 __fib6_drop_pcpu_from net/ipv6/ip6_fib.c:960 [inline] fib6_drop_pcpu_from net/ipv6/ip6_fib.c:1021 [inline] fib6_purge_rt+0x6a3/0x810 net/ipv6/ip6_fib.c:1032 fib6_del_route net/ipv6/ip6_fib.c:1983 [inline] fib6_del+0xa92/0x15a0 net/ipv6/ip6_fib.c:2028 fib6_clean_node+0x398/0x5c0 net/ipv6/ip6_fib.c:2190 fib6_walk_continue+0x4aa/0x8e0 net/ipv6/ip6_fib.c:2112 fib6_walk+0x182/0x370 net/ipv6/ip6_fib.c:2160 fib6_clean_tree+0xdb/0x120 net/ipv6/ip6_fib.c:2240 __fib6_clean_all+0x120/0x290 net/ipv6/ip6_fib.c:2256 rt6_sync_down_dev net/ipv6/route.c:4892 [inline] rt6_disable_ip+0x827/0x930 net/ipv6/route.c:4897 addrconf_ifdown.isra.0+0xf6/0x15b0 net/ipv6/addrconf.c:3706 addrconf_notify+0x55c/0x23e0 net/ipv6/addrconf.c:3631 notifier_call_chain+0xb5/0x200 kernel/notifier.c:83 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:2121 call_netdevice_notifiers_extack net/core/dev.c:2133 [inline] call_netdevice_notifiers net/core/dev.c:2147 [inline] dev_close_many+0x2ff/0x620 net/core/dev.c:1722 unregister_netdevice_many+0x3ff/0x1790 net/core/dev.c:10990 default_device_exit_batch+0x2fa/0x3c0 net/core/dev.c:11543 ops_exit_list+0x10d/0x160 net/core/net_namespace.c:178 cleanup_net+0x4ea/0xb10 net/core/net_namespace.c:595 process_one_work+0x98d/0x1600 kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 kthread+0x3b1/0x4a0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Allocated by task 4875: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:428 [inline] __kasan_slab_alloc+0x84/0xa0 mm/kasan/common.c:461 kasan_slab_alloc include/linux/kasan.h:236 [inline] slab_post_alloc_hook mm/slab.h:524 [inline] slab_alloc_node mm/slub.c:2912 [inline] slab_alloc mm/slub.c:2920 [inline] kmem_cache_alloc+0x219/0x3a0 mm/slub.c:2925 dst_alloc+0x146/0x1f0 net/core/dst.c:93 ip6_dst_alloc+0x2e/0x100 net/ipv6/route.c:340 ip6_rt_pcpu_alloc net/ipv6/route.c:1368 [inline] rt6_make_pcpu_route net/ipv6/route.c:1416 [inline] ip6_pol_route+0x910/0x11c0 net/ipv6/route.c:2247 pol_lookup_func include/net/ip6_fib.h:579 [inline] fib6_rule_lookup+0x111/0x6f0 net/ipv6/fib6_rules.c:115 ip6_route_input_lookup net/ipv6/route.c:2280 [inline] ip6_route_input+0x681/0xad0 net/ipv6/route.c:2576 ip6_rcv_finish_core.constprop.0.isra.0+0x168/0x570 net/ipv6/ip6_input.c:63 ip6_rcv_finish net/ipv6/ip6_input.c:74 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] NF_HOOK include/linux/netfilter.h:295 [inline] ipv6_rcv+0x229/0x3c0 net/ipv6/ip6_input.c:297 __netif_receive_skb_one_core+0x114/0x180 net/core/dev.c:5440 __netif_receive_skb+0x27/0x1c0 net/core/dev.c:5554 process_backlog+0x232/0x6c0 net/core/dev.c:6418 __napi_poll+0xaf/0x440 net/core/dev.c:6973 napi_poll net/core/dev.c:7040 [inline] net_rx_action+0x801/0xb40 net/core/dev.c:7127 __do_softirq+0x29b/0x9f6 kernel/softirq.c:559 Freed by task 10865: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:357 ____kasan_slab_free mm/kasan/common.c:360 [inline] ____kasan_slab_free mm/kasan/common.c:325 [inline] __kasan_slab_free+0xfb/0x130 mm/kasan/common.c:368 kasan_slab_free include/linux/kasan.h:212 [inline] slab_free_hook mm/slub.c:1581 [inline] slab_free_freelist_hook+0xdf/0x240 mm/slub.c:1606 slab_free mm/slub.c:3166 [inline] kmem_cache_free+0x8a/0x740 mm/slub.c:3182 dst_destroy+0x2d6/0x3f0 net/core/dst.c:129 dst_release_immediate.part.0+0x58/0xc0 net/core/dst.c:194 dst_release_immediate+0x1b/0x30 net/core/dst.c:186 rt_fibinfo_free_cpus.part.0+0xe2/0x140 net/ipv4/fib_semantics.c:203 rt_fibinfo_free_cpus net/ipv4/fib_semantics.c:194 [inline] fib_nh_common_release+0x10c/0x350 net/ipv4/fib_semantics.c:215 fib6_info_destroy_rcu+0x187/0x210 net/ipv6/ip6_fib.c:175 rcu_do_batch kernel/rcu/tree.c:2558 [inline] rcu_core+0x7ab/0x13b0 kernel/rcu/tree.c:2793 __do_softirq+0x29b/0x9f6 kernel/softirq.c:559 Last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe5/0x110 mm/kasan/generic.c:345 __call_rcu kernel/rcu/tree.c:3038 [inline] call_rcu+0xb1/0x750 kernel/rcu/tree.c:3113 dst_release net/core/dst.c:179 [inline] dst_release+0x79/0xe0 net/core/dst.c:169 refdst_drop include/net/dst.h:261 [inline] skb_dst_drop include/net/dst.h:273 [inline] __dev_queue_xmit+0x1c54/0x2e30 net/core/dev.c:4204 macvlan_queue_xmit drivers/net/macvlan.c:543 [inline] macvlan_start_xmit+0x156/0x5e0 drivers/net/macvlan.c:567 __netdev_start_xmit include/linux/netdevice.h:4944 [inline] netdev_start_xmit include/linux/netdevice.h:4958 [inline] xmit_one net/core/dev.c:3654 [inline] dev_hard_start_xmit+0x1eb/0x920 net/core/dev.c:3670 __dev_queue_xmit+0x209c/0x2e30 net/core/dev.c:4245 neigh_resolve_output net/core/neighbour.c:1495 [inline] neigh_resolve_output+0x50e/0x820 net/core/neighbour.c:1475 neigh_output include/net/neighbour.h:510 [inline] ip6_finish_output2+0x6ee/0x1700 net/ipv6/ip6_output.c:117 __ip6_finish_output net/ipv6/ip6_output.c:182 [inline] __ip6_finish_output+0x4c1/0xe10 net/ipv6/ip6_output.c:161 ip6_finish_output+0x35/0x200 net/ipv6/ip6_output.c:192 NF_HOOK_COND include/linux/netfilter.h:290 [inline] ip6_output+0x1e4/0x530 net/ipv6/ip6_output.c:215 dst_output include/net/dst.h:448 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ndisc_send_skb+0xa99/0x1750 net/ipv6/ndisc.c:508 ndisc_send_ns+0x3a9/0x840 net/ipv6/ndisc.c:650 addrconf_dad_work+0xc3f/0x1340 net/ipv6/addrconf.c:4119 process_one_work+0x98d/0x1600 kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 kthread+0x3b1/0x4a0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Second to last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe5/0x110 mm/kasan/generic.c:345 __call_rcu kernel/rcu/tree.c:3038 [inline] call_rcu+0xb1/0x750 kernel/rcu/tree.c:3113 dst_release net/core/dst.c:179 [inline] dst_release+0x79/0xe0 net/core/dst.c:169 refdst_drop include/net/dst.h:261 [inline] skb_dst_drop include/net/dst.h:273 [inline] __dev_queue_xmit+0x1c54/0x2e30 net/core/dev.c:4204 neigh_connected_output+0x3b6/0x510 net/core/neighbour.c:1524 neigh_output include/net/neighbour.h:510 [inline] ip6_finish_output2+0x6ee/0x1700 net/ipv6/ip6_output.c:117 __ip6_finish_output net/ipv6/ip6_output.c:182 [inline] __ip6_finish_output+0x4c1/0xe10 net/ipv6/ip6_output.c:161 ip6_finish_output+0x35/0x200 net/ipv6/ip6_output.c:192 NF_HOOK_COND include/linux/netfilter.h:290 [inline] ip6_output+0x1e4/0x530 net/ipv6/ip6_output.c:215 dst_output include/net/dst.h:448 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ndisc_send_skb+0xa99/0x1750 net/ipv6/ndisc.c:508 ndisc_send_rs+0x12e/0x6f0 net/ipv6/ndisc.c:702 addrconf_rs_timer+0x3f2/0x820 net/ipv6/addrconf.c:3877 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1431 expire_timers kernel/time/timer.c:1476 [inline] __run_timers.part.0+0x67c/0xa50 kernel/time/timer.c:1745 __run_timers kernel/time/timer.c:1726 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1758 __do_softirq+0x29b/0x9f6 kernel/softirq.c:559 The buggy address belongs to the object at ffff88802d7a4b40 which belongs to the cache ip6_dst_cache of size 232 The buggy address is located 112 bytes inside of 232-byte region [ffff88802d7a4b40, ffff88802d7a4c28) The buggy address belongs to the page: page:ffffea0000b5e900 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2d7a4 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0000a15c80 0000000800000008 ffff888027ae1000 raw: 0000000000000000 00000000000c000c 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY), pid 4875, ts 125432253258, free_ts 125419859252 prep_new_page mm/page_alloc.c:2358 [inline] get_page_from_freelist+0x1033/0x2b60 mm/page_alloc.c:3994 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5200 alloc_pages+0x18c/0x2a0 mm/mempolicy.c:2272 alloc_slab_page mm/slub.c:1644 [inline] allocate_slab+0x2c5/0x4c0 mm/slub.c:1784 new_slab mm/slub.c:1847 [inline] new_slab_objects mm/slub.c:2593 [inline] ___slab_alloc+0x44c/0x7a0 mm/slub.c:2756 __slab_alloc.constprop.0+0xa7/0xf0 mm/slub.c:2796 slab_alloc_node mm/slub.c:2878 [inline] slab_alloc mm/slub.c:2920 [inline] kmem_cache_alloc+0x34b/0x3a0 mm/slub.c:2925 dst_alloc+0x146/0x1f0 net/core/dst.c:93 ip6_dst_alloc+0x2e/0x100 net/ipv6/route.c:340 icmp6_dst_alloc+0x6d/0x6c0 net/ipv6/route.c:3278 ndisc_send_skb+0x1237/0x1750 net/ipv6/ndisc.c:488 ndisc_send_rs+0x12e/0x6f0 net/ipv6/ndisc.c:702 addrconf_dad_completed+0x397/0xd60 net/ipv6/addrconf.c:4195 addrconf_dad_begin net/ipv6/addrconf.c:3962 [inline] addrconf_dad_work+0x862/0x1340 net/ipv6/addrconf.c:4064 process_one_work+0x98d/0x1600 kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1298 [inline] free_pcp_prepare+0x223/0x300 mm/page_alloc.c:1342 free_unref_page_prepare mm/page_alloc.c:3250 [inline] free_unref_page+0x12/0x1d0 mm/page_alloc.c:3298 __vunmap+0x783/0xb60 mm/vmalloc.c:2566 free_work+0x58/0x70 mm/vmalloc.c:80 process_one_work+0x98d/0x1600 kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 kthread+0x3b1/0x4a0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Memory state around the buggy address: ffff88802d7a4a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc ffff88802d7a4b00: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb >ffff88802d7a4b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802d7a4c00: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc ffff88802d7a4c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================