[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <40038728-de12-ecb9-b382-2f6433f83d50@gmail.com>
Date: Thu, 16 May 2019 09:02:02 -0600
From: David Ahern <dsahern@...il.com>
To: Eric Dumazet <edumazet@...gle.com>,
"David S . Miller" <davem@...emloft.net>
Cc: netdev <netdev@...r.kernel.org>,
Eric Dumazet <eric.dumazet@...il.com>,
syzbot <syzkaller@...glegroups.com>,
Wei Wang <weiwan@...gle.com>, Martin Lau <kafai@...com>
Subject: Re: [PATCH net] ipv6: prevent possible fib6 leaks
On 5/15/19 8:39 PM, Eric Dumazet wrote:
> At ipv6 route dismantle, fib6_drop_pcpu_from() is responsible
> for finding all percpu routes and set their ->from pointer
> to NULL, so that fib6_ref can reach its expected value (1).
>
> The problem right now is that other cpus can still catch the
> route being deleted, since there is no rcu grace period
> between the route deletion and call to fib6_drop_pcpu_from()
>
> This can leak the fib6 and associated resources, since no
> notifier will take care of removing the last reference(s).
>
> I decided to add another boolean (fib6_destroying) instead
> of reusing/renaming exception_bucket_flushed to ease stable backports,
> and properly document the memory barriers used to implement this fix.
>
> This patch has been co-developped with Wei Wang.
>
> Fixes: 93531c674315 ("net/ipv6: separate handling of FIB entries from dst based routes")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Reported-by: syzbot <syzkaller@...glegroups.com>
> Cc: Wei Wang <weiwan@...gle.com>
> Cc: David Ahern <dsahern@...il.com>
> Cc: Martin Lau <kafai@...com>
> ---
> include/net/ip6_fib.h | 3 ++-
> net/ipv6/ip6_fib.c | 12 +++++++++---
> net/ipv6/route.c | 7 +++++++
> 3 files changed, 18 insertions(+), 4 deletions(-)
>
Reviewed-by: David Ahern <dsahern@...il.com>
Thanks, Eric. Attaching 'from' to rt6_info makes v6 much more
complicated than ipv4.
Powered by blists - more mailing lists