lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 18 Oct 2012 08:54:25 +0200
From:	Steffen Klassert <steffen.klassert@...unet.com>
To:	Julian Anastasov <ja@....bg>
Cc:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH] ipv4: Fix flushing of cached routing informations

On Thu, Oct 18, 2012 at 09:52:37AM +0300, Julian Anastasov wrote:
> 
> 	Hello,
> 
> On Thu, 18 Oct 2012, Steffen Klassert wrote:
> 
> > Currently we can not flush cached pmtu/redirect informations via
> > the ipv4_sysctl_rtcache_flush sysctl. We need to check the rt_genid
> > of the old route and reset the nh exeption if the old route is
> > expired when we bind a new route to a nh exeption.
> > 
> > Signed-off-by: Steffen Klassert <steffen.klassert@...unet.com>
> > ---
> >  net/ipv4/route.c |   16 ++++++++++------
> >  1 files changed, 10 insertions(+), 6 deletions(-)
> > 
> > diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> > index 432f4bb..defb98d 100644
> > --- a/net/ipv4/route.c
> > +++ b/net/ipv4/route.c
> > @@ -1163,8 +1163,17 @@ static bool rt_bind_exception(struct rtable *rt, struct fib_nh_exception *fnhe,
> >  	spin_lock_bh(&fnhe_lock);
> >  
> >  	if (daddr == fnhe->fnhe_daddr) {
> > -		struct rtable *orig;
> > +		struct rtable *orig = rcu_dereference(fnhe->fnhe_rth);
> > +		rcu_assign_pointer(fnhe->fnhe_rth, rt);
> 
> 	May be the above rcu_assign_pointer should be after
> 
> 	... if (!rt->rt_gateway)
> 		rt->rt_gateway = daddr;
> 
> 	part. It is possible another __mkroute_output
> caller to get the cached fnhe->fnhe_rth without valid
> rt->rt_gateway. rcu_assign_pointer should be after all
> writes to rt.

Right, I'll send an updated version.

Thanks!

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists