linux-kernelorg-stable/include
Eric Dumazet 61fb0d0168 ipv6: prevent possible fib6 leaks
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: 93531c6743 ("net/ipv6: separate handling of FIB entries from dst based routes")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Cc: Wei Wang <weiwan@google.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Martin Lau <kafai@fb.com>
Acked-by: Wei Wang <weiwan@google.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-16 12:21:00 -07:00
..
acpi
asm-generic Modules updates for v5.2 2019-05-14 10:55:54 -07:00
clocksource
crypto
drm
dt-bindings
keys
kvm
linux net: test nouarg before dereferencing zerocopy pointers 2019-05-16 12:17:50 -07:00
math-emu
media
memory
misc
net ipv6: prevent possible fib6 leaks 2019-05-16 12:21:00 -07:00
pcmcia
ras
rdma
scsi
soc
sound
target
trace Merge branch 'akpm' (patches from Andrew) 2019-05-14 10:10:55 -07:00
uapi Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 2019-05-15 18:28:44 -07:00
video
xen