diff options
author | Wei Wang <weiwan@google.com> | 2017-08-21 09:47:10 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-09-27 11:00:10 +0200 |
commit | e51bf99be7cc95db97d9fa9031ab09ea037a5c7a (patch) | |
tree | 9d8b1ee9b243cc8764b2b41163cb4bc14a66a6d3 /net/ipv6/icmp.c | |
parent | 6eb7ae1223f75fe19de8e75df80ac78ab6b7c39d (diff) |
ipv6: add rcu grace period before freeing fib6_node
[ Upstream commit c5cff8561d2d0006e972bd114afd51f082fee77c ]
We currently keep rt->rt6i_node pointing to the fib6_node for the route.
And some functions make use of this pointer to dereference the fib6_node
from rt structure, e.g. rt6_check(). However, as there is neither
refcount nor rcu taken when dereferencing rt->rt6i_node, it could
potentially cause crashes as rt->rt6i_node could be set to NULL by other
CPUs when doing a route deletion.
This patch introduces an rcu grace period before freeing fib6_node and
makes sure the functions that dereference it takes rcu_read_lock().
Note: there is no "Fixes" tag because this bug was there in a very
early stage.
Signed-off-by: Wei Wang <weiwan@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv6/icmp.c')
0 files changed, 0 insertions, 0 deletions