================================================================== 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+0x797/0x7f0 net/ipv6/ip6_fib.c:960 Read of size 8 at addr ffff8880827fee9c by task syz-executor1/6429 CPU: 0 PID: 6429 Comm: syz-executor1 Not tainted 5.0.0-rc3+ #35 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+0x1db/0x2d0 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:135 fib6_drop_pcpu_from net/ipv6/ip6_fib.c:924 [inline] fib6_purge_rt+0x797/0x7f0 net/ipv6/ip6_fib.c:960 fib6_del_route net/ipv6/ip6_fib.c:1813 [inline] fib6_del+0xbdb/0x12e0 net/ipv6/ip6_fib.c:1844 fib6_clean_node+0x453/0x660 net/ipv6/ip6_fib.c:2006 fib6_walk_continue+0x4b3/0x8e0 net/ipv6/ip6_fib.c:1928 fib6_walk+0x9d/0x100 net/ipv6/ip6_fib.c:1976 fib6_clean_tree+0x22a/0x340 net/ipv6/ip6_fib.c:2055 __fib6_clean_all+0x216/0x430 net/ipv6/ip6_fib.c:2071 fib6_clean_all+0x2b/0x40 net/ipv6/ip6_fib.c:2082 rt6_sync_down_dev+0x17e/0x1b0 net/ipv6/route.c:4041 rt6_disable_ip+0x80/0x730 net/ipv6/route.c:4046 addrconf_ifdown+0x13e/0x15e0 net/ipv6/addrconf.c:3669 addrconf_notify+0x629/0x25c0 net/ipv6/addrconf.c:3594 notifier_call_chain+0x179/0x380 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_notify_flags+0x293/0x470 net/core/dev.c:7607 dev_change_flags+0x10d/0x170 net/core/dev.c:7643 devinet_ioctl+0x1489/0x1d50 net/ipv4/devinet.c:1104 inet_ioctl+0x1fc/0x370 net/ipv4/af_inet.c:954 sock_do_ioctl+0xe2/0x400 net/socket.c:950 sock_ioctl+0x32f/0x6c0 net/socket.c:1074 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0x107b/0x17d0 fs/ioctl.c:696 ksys_ioctl+0xab/0xd0 fs/ioctl.c:713 __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x458099 Code: 6d b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 3b b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fcfe2569c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000458099 RDX: 00000000200001c0 RSI: 0000000000008914 RDI: 0000000000000003 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fcfe256a6d4 R13: 00000000004c3785 R14: 00000000004d6468 R15: 00000000ffffffff Allocated by task 28526: save_stack+0x45/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] __kasan_kmalloc mm/kasan/common.c:496 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:469 kasan_kmalloc mm/kasan/common.c:504 [inline] kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:411 kmem_cache_alloc+0x12d/0x710 mm/slab.c:3543 dst_alloc+0x10e/0x1d0 net/core/dst.c:105 ip6_dst_alloc+0x34/0xa0 net/ipv6/route.c:355 ip6_rt_pcpu_alloc net/ipv6/route.c:1223 [inline] rt6_make_pcpu_route net/ipv6/route.c:1253 [inline] ip6_pol_route+0x73c/0x1490 net/ipv6/route.c:1895 ip6_pol_route_output+0x54/0x70 net/ipv6/route.c:2068 fib6_rule_lookup+0x12f/0x870 net/ipv6/fib6_rules.c:118 ip6_route_output_flags+0x2c4/0x350 net/ipv6/route.c:2097 ip6_route_output include/net/ip6_route.h:88 [inline] ip6_dst_lookup_tail+0xe18/0x1d50 net/ipv6/ip6_output.c:958 ip6_dst_lookup_flow+0xca/0x270 net/ipv6/ip6_output.c:1086 ip6_datagram_dst_update+0x779/0xfb0 net/ipv6/datagram.c:91 __ip6_datagram_connect+0x5df/0x1440 net/ipv6/datagram.c:250 ip6_datagram_connect+0x30/0x50 net/ipv6/datagram.c:273 ip6_datagram_connect_v6_only+0x69/0x90 net/ipv6/datagram.c:285 inet_dgram_connect+0x150/0x2e0 net/ipv4/af_inet.c:571 __sys_connect+0x357/0x490 net/socket.c:1664 __do_sys_connect net/socket.c:1675 [inline] __se_sys_connect net/socket.c:1672 [inline] __x64_sys_connect+0x73/0xb0 net/socket.c:1672 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 0: save_stack+0x45/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:458 kasan_slab_free+0xe/0x10 mm/kasan/common.c:466 __cache_free mm/slab.c:3487 [inline] kmem_cache_free+0x86/0x260 mm/slab.c:3749 dst_destroy+0x2a0/0x3c0 net/core/dst.c:141 dst_destroy_rcu+0x16/0x19 net/core/dst.c:154 __rcu_reclaim kernel/rcu/rcu.h:240 [inline] rcu_do_batch kernel/rcu/tree.c:2452 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2773 [inline] rcu_process_callbacks+0xc4a/0x1680 kernel/rcu/tree.c:2754 __do_softirq+0x30b/0xb11 kernel/softirq.c:292 The buggy address belongs to the object at ffff8880827fee40 which belongs to the cache ip6_dst_cache of size 224 The buggy address is located 92 bytes inside of 224-byte region [ffff8880827fee40, ffff8880827fef20) The buggy address belongs to the page: page:ffffea000209ff80 count:1 mapcount:0 mapping:ffff8880a520d1c0 index:0xffff8880827fe1c0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea0001f8ef88 ffffea00026b3ec8 ffff8880a520d1c0 raw: ffff8880827fe1c0 ffff8880827fe080 000000010000000a 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880827fed80: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ffff8880827fee00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff8880827fee80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880827fef00: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ffff8880827fef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================