IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready ================================================================== BUG: KASAN: use-after-free in fib6_ifup+0x212/0x220 net/ipv6/route.c:3573 Read of size 8 at addr ffff8801bbb26500 by task syz-executor2/6724 CPU: 0 PID: 6724 Comm: syz-executor2 Not tainted 4.15.0-rc7+ #188 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x25b/0x340 mm/kasan/report.c:409 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 fib6_ifup+0x212/0x220 net/ipv6/route.c:3573 fib6_clean_node+0x389/0x580 net/ipv6/ip6_fib.c:1912 fib6_walk_continue+0x46c/0x8a0 net/ipv6/ip6_fib.c:1838 fib6_walk+0x91/0xf0 net/ipv6/ip6_fib.c:1886 fib6_clean_tree+0x1e6/0x340 net/ipv6/ip6_fib.c:1963 __fib6_clean_all+0x1f4/0x3a0 net/ipv6/ip6_fib.c:1979 fib6_clean_all+0x27/0x30 net/ipv6/ip6_fib.c:1990 rt6_sync_up+0x15e/0x1c0 net/ipv6/route.c:3592 addrconf_notify+0x3f6/0x2310 net/ipv6/addrconf.c:3490 notifier_call_chain+0x136/0x2c0 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x2d/0x40 kernel/notifier.c:401 call_netdevice_notifiers_info+0x32/0x70 net/core/dev.c:1708 netdev_state_change+0x11e/0x180 net/core/dev.c:1339 set_operstate+0xc1/0x160 net/core/rtnetlink.c:818 do_setlink+0x1545/0x3d40 net/core/rtnetlink.c:2329 rtnl_setlink+0x339/0x430 net/core/rtnetlink.c:2535 rtnetlink_rcv_msg+0x57f/0xb10 net/core/rtnetlink.c:4530 netlink_rcv_skb+0x224/0x470 net/netlink/af_netlink.c:2441 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:4548 netlink_unicast_kernel net/netlink/af_netlink.c:1308 [inline] netlink_unicast+0x4c4/0x6b0 net/netlink/af_netlink.c:1334 netlink_sendmsg+0xa4a/0xe60 net/netlink/af_netlink.c:1897 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg+0xca/0x110 net/socket.c:640 sock_write_iter+0x31a/0x5d0 net/socket.c:909 call_write_iter include/linux/fs.h:1772 [inline] new_sync_write fs/read_write.c:469 [inline] __vfs_write+0x684/0x970 fs/read_write.c:482 vfs_write+0x189/0x510 fs/read_write.c:544 SYSC_write fs/read_write.c:589 [inline] SyS_write+0xef/0x220 fs/read_write.c:581 entry_SYSCALL_64_fastpath+0x23/0x9a RIP: 0033:0x452cf9 RSP: 002b:00007f7f345f3c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000452cf9 RDX: 0000000000000026 RSI: 0000000020856fda RDI: 0000000000000014 RBP: 00000000000003ad R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f38d8 R13: 00000000ffffffff R14: 00007f7f345f46d4 R15: 0000000000000000 Allocated by task 5196: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489 kmem_cache_alloc+0x12e/0x760 mm/slab.c:3544 dst_alloc+0x11f/0x1a0 net/core/dst.c:104 __ip6_dst_alloc+0x35/0x90 net/ipv6/route.c:361 ip6_dst_alloc+0x29/0xb0 net/ipv6/route.c:376 icmp6_dst_alloc+0x1d7/0x660 net/ipv6/route.c:2332 mld_sendpack+0x617/0xe70 net/ipv6/mcast.c:1647 mld_send_cr net/ipv6/mcast.c:1956 [inline] mld_ifc_timer_expire+0x3d9/0x770 net/ipv6/mcast.c:2453 call_timer_fn+0x228/0x820 kernel/time/timer.c:1318 expire_timers kernel/time/timer.c:1355 [inline] __run_timers+0x7ee/0xb70 kernel/time/timer.c:1658 run_timer_softirq+0x4c/0x70 kernel/time/timer.c:1684 __do_softirq+0x2d7/0xb85 kernel/softirq.c:285 Freed by task 4792: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3488 [inline] kmem_cache_free+0x83/0x2a0 mm/slab.c:3746 dst_destroy+0x257/0x370 net/core/dst.c:140 dst_destroy_rcu+0x16/0x20 net/core/dst.c:153 __rcu_reclaim kernel/rcu/rcu.h:195 [inline] rcu_do_batch kernel/rcu/tree.c:2758 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:3012 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2979 [inline] rcu_process_callbacks+0xd6c/0x17f0 kernel/rcu/tree.c:2996 __do_softirq+0x2d7/0xb85 kernel/softirq.c:285 The buggy address belongs to the object at ffff8801bbb26500 which belongs to the cache ip6_dst_cache of size 320 The buggy address is located 0 bytes inside of 320-byte region [ffff8801bbb26500, ffff8801bbb26640) The buggy address belongs to the page: page:ffffea0006eec980 count:1 mapcount:0 mapping:ffff8801bbb26080 index:0xffff8801bbb26080 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff8801bbb26080 ffff8801bbb26080 0000000100000009 raw: ffffea00072a43a0 ffffea00072ac160 ffff8801d32bf6c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801bbb26400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801bbb26480: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8801bbb26500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801bbb26580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801bbb26600: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================