================================================================== BUG: KASAN: use-after-free in fib6_drop_pcpu_from net/ipv6/ip6_fib.c:924 [inline] BUG: KASAN: use-after-free in fib6_purge_rt+0x62a/0x670 net/ipv6/ip6_fib.c:960 Read of size 8 at addr ffff888088bdf6ea by task syz-executor.4/29726 CPU: 0 PID: 29726 Comm: syz-executor.4 Not tainted 5.0.0+ #98 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:187 kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 fib6_drop_pcpu_from net/ipv6/ip6_fib.c:924 [inline] fib6_purge_rt+0x62a/0x670 net/ipv6/ip6_fib.c:960 fib6_del_route net/ipv6/ip6_fib.c:1813 [inline] fib6_del+0xac2/0x10a0 net/ipv6/ip6_fib.c:1844 fib6_clean_node+0x3a8/0x590 net/ipv6/ip6_fib.c:2006 fib6_walk_continue+0x495/0x900 net/ipv6/ip6_fib.c:1928 fib6_walk+0x9d/0x100 net/ipv6/ip6_fib.c:1976 fib6_clean_tree+0xe0/0x120 net/ipv6/ip6_fib.c:2055 __fib6_clean_all+0x118/0x2a0 net/ipv6/ip6_fib.c:2071 fib6_clean_all+0x2b/0x40 net/ipv6/ip6_fib.c:2082 rt6_sync_down_dev+0x134/0x150 net/ipv6/route.c:4051 rt6_disable_ip+0x27/0x5f0 net/ipv6/route.c:4056 addrconf_ifdown+0xa2/0x1220 net/ipv6/addrconf.c:3705 addrconf_notify+0x19a/0x2260 net/ipv6/addrconf.c:3630 notifier_call_chain+0xc7/0x240 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:401 call_netdevice_notifiers_info+0x3f/0x90 net/core/dev.c:1739 call_netdevice_notifiers_extack net/core/dev.c:1751 [inline] call_netdevice_notifiers net/core/dev.c:1765 [inline] dev_close_many+0x33f/0x6f0 net/core/dev.c:1508 rollback_registered_many+0x43b/0xfd0 net/core/dev.c:8161 rollback_registered+0x109/0x1d0 net/core/dev.c:8226 unregister_netdevice_queue net/core/dev.c:9273 [inline] unregister_netdevice_queue+0x1ee/0x2c0 net/core/dev.c:9266 unregister_netdevice include/linux/netdevice.h:2655 [inline] __tun_detach+0xd5b/0x1000 drivers/net/tun.c:727 tun_detach drivers/net/tun.c:744 [inline] tun_chr_close+0xe0/0x180 drivers/net/tun.c:3435 __fput+0x2e5/0x8d0 fs/file_table.c:278 ____fput+0x16/0x20 fs/file_table.c:309 task_work_run+0x14a/0x1c0 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x90a/0x2fa0 kernel/exit.c:876 do_group_exit+0x135/0x370 kernel/exit.c:980 get_signal+0x399/0x1d50 kernel/signal.c:2575 do_signal+0x87/0x1940 arch/x86/kernel/signal.c:816 exit_to_usermode_loop+0x244/0x2c0 arch/x86/entry/common.c:162 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath arch/x86/entry/common.c:268 [inline] do_syscall_64+0x52d/0x610 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4120ba Code: 00 00 48 89 44 24 30 e8 44 fd ff ff 48 8b 44 24 38 48 89 84 24 90 00 00 00 48 8b 6c 24 48 48 83 c4 50 c3 e8 98 7e 04 00 e9 f3 ff ff cc cc cc 48 83 ec 20 48 89 6c 24 18 48 8d 6c 24 18 48 8b RSP: 002b:00007ffe27f95768 EFLAGS: 00000246 ORIG_RAX: 000000000000003d RAX: fffffffffffffe00 RBX: 0000000001207940 RCX: 00000000004120ba RDX: 0000000040000000 RSI: 00007ffe27f957a0 RDI: ffffffffffffffff RBP: 0000000000000473 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000001f R13: 00007ffe27f957a0 R14: 000000000120799b R15: 00007ffe27f957b0 Allocated by task 16: save_stack+0x45/0xd0 mm/kasan/common.c:75 set_track mm/kasan/common.c:87 [inline] __kasan_kmalloc mm/kasan/common.c:497 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:470 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:505 slab_post_alloc_hook mm/slab.h:436 [inline] slab_alloc mm/slab.c:3392 [inline] kmem_cache_alloc+0x11a/0x6f0 mm/slab.c:3554 dst_alloc+0x10e/0x200 net/core/dst.c:109 ip6_dst_alloc+0x34/0xa0 net/ipv6/route.c:355 icmp6_dst_alloc+0x1a9/0x660 net/ipv6/route.c:2658 ndisc_send_skb+0xfc6/0x14a0 net/ipv6/ndisc.c:471 ndisc_send_rs+0x134/0x6d0 net/ipv6/ndisc.c:685 addrconf_rs_timer+0x30f/0x680 net/ipv6/addrconf.c:3876 call_timer_fn+0x190/0x720 kernel/time/timer.c:1325 expire_timers kernel/time/timer.c:1362 [inline] __run_timers kernel/time/timer.c:1681 [inline] __run_timers kernel/time/timer.c:1649 [inline] run_timer_softirq+0x652/0x1700 kernel/time/timer.c:1694 __do_softirq+0x266/0x95a kernel/softirq.c:293 Freed by task 16: save_stack+0x45/0xd0 mm/kasan/common.c:75 set_track mm/kasan/common.c:87 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:459 kasan_slab_free+0xe/0x10 mm/kasan/common.c:467 __cache_free mm/slab.c:3498 [inline] kmem_cache_free+0x86/0x260 mm/slab.c:3764 dst_destroy+0x2a0/0x3c0 net/core/dst.c:145 dst_destroy_rcu+0x16/0x19 net/core/dst.c:158 __rcu_reclaim kernel/rcu/rcu.h:227 [inline] rcu_do_batch kernel/rcu/tree.c:2475 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2788 [inline] rcu_core+0x928/0x1390 kernel/rcu/tree.c:2769 __do_softirq+0x266/0x95a kernel/softirq.c:293 The buggy address belongs to the object at ffff888088bdf6c0 which belongs to the cache ip6_dst_cache of size 224 The buggy address is located 42 bytes inside of 224-byte region [ffff888088bdf6c0, ffff888088bdf7a0) The buggy address belongs to the page: page:ffffea000222f7c0 count:1 mapcount:0 mapping:ffff888216bd5300 index:0xffff888088bdf080 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea00021a2388 ffffea0002605a48 ffff888216bd5300 raw: ffff888088bdf080 ffff888088bdf080 0000000100000007 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888088bdf580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888088bdf600: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc >ffff888088bdf680: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff888088bdf700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888088bdf780: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================