Re: [PATCH v2 net] net: ipv6: regenerate host route if moved to gc list

2017-04-24 Thread Andrey Konovalov
On Sat, Apr 22, 2017 at 6:40 PM, David Ahern wrote: > Taking down the loopback device wreaks havoc on IPv6 routes. By > extension, taking a VRF device wreaks havoc on its table. > > Dmitry and Andrey both reported heap out-of-bounds reports in the IPv6 > FIB code while running syzkaller fuzzer. Th

Re: [PATCH v2 net] net: ipv6: regenerate host route if moved to gc list

2017-04-23 Thread David Ahern
On 4/22/17 8:28 PM, Martin KaFai Lau wrote: >> The code path to fixup_permanent_addr is under RTNL, so the if check on >> ifp->rt and rt6i_ref is ok -- neither can be changed since RTNL is held. >> >> Since ifp->rt can be accessed outside of RTNL, the spinlock is needed to >> change its value. > Go

Re: [PATCH v2 net] net: ipv6: regenerate host route if moved to gc list

2017-04-22 Thread Martin KaFai Lau
On Sat, Apr 22, 2017 at 07:12:34PM -0600, David Ahern wrote: > On 4/22/17 4:00 PM, Martin KaFai Lau wrote: > > On Sat, Apr 22, 2017 at 09:40:37AM -0700, David Ahern wrote: > > [...] > >> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c > >> index 08f9e8ea7a81..97e86158bbcb 100644 > >> --- a/n

Re: [PATCH v2 net] net: ipv6: regenerate host route if moved to gc list

2017-04-22 Thread David Ahern
On 4/22/17 4:00 PM, Martin KaFai Lau wrote: > On Sat, Apr 22, 2017 at 09:40:37AM -0700, David Ahern wrote: > [...] >> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c >> index 08f9e8ea7a81..97e86158bbcb 100644 >> --- a/net/ipv6/addrconf.c >> +++ b/net/ipv6/addrconf.c >> @@ -3303,14 +3303,24 @

Re: [PATCH v2 net] net: ipv6: regenerate host route if moved to gc list

2017-04-22 Thread Martin KaFai Lau
On Sat, Apr 22, 2017 at 09:40:37AM -0700, David Ahern wrote: [...] > diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c > index 08f9e8ea7a81..97e86158bbcb 100644 > --- a/net/ipv6/addrconf.c > +++ b/net/ipv6/addrconf.c > @@ -3303,14 +3303,24 @@ static void addrconf_gre_config(struct net_device

[PATCH v2 net] net: ipv6: regenerate host route if moved to gc list

2017-04-22 Thread David Ahern
Taking down the loopback device wreaks havoc on IPv6 routes. By extension, taking a VRF device wreaks havoc on its table. Dmitry and Andrey both reported heap out-of-bounds reports in the IPv6 FIB code while running syzkaller fuzzer. The root cause is a dead dst that is on the garbage list gets re