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] [day] [month] [year] [list]
Date:	Thu, 11 Jul 2013 22:25:46 +0200
From:	Hannes Frederic Sowa <hannes@...essinduktion.org>
To:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
	nicolas.dichtel@...nd.com
Subject: Re: [PATCH net v2] ipv6: only static routes qualify for equal cost multipathing

On Thu, Jul 11, 2013 at 10:02:06PM +0200, Hannes Frederic Sowa wrote:
> On Thu, Jul 11, 2013 at 11:44:19AM -0700, David Miller wrote:
> > From: Hannes Frederic Sowa <hannes@...essinduktion.org>
> > Date: Thu, 11 Jul 2013 19:02:31 +0200
> > 
> > > +	for (rt = rt0; rt && !(rt->rt6i_flags & RTF_EXPIRES);
> > > +	     rt = (struct rt6_info *)rt->dst.from);
> > > +	return !(rt && (rt->rt6i_flags & RTF_EXPIRES));
> > 
> > Please make this logic clearer, something like:
> > 
> > 
> > 	for (rt = rt0; rt; rt = (struct rt6_info *)rt->dst.from) {
> > 		if (rt->rt6i_flags & RTF_EXPIRES)
> > 			return false;
> > 	}
> > 	return true;
> 
> Ok, I'll revisit this. The reason for this loop (which was taken from
> rt6_update_expires) is, that it was only valid to dereference dst.from if
> RTF_EXPIRES was not set (before commit ecd9883 ("ipv6: fix race condition
> regarding dst->expires and dst->from") dst.from and dst.expires were a
> union). I tried to keep this (possible) invariant.
> 
> I'll check if this is still needed.

Thanks for pointing this out, David.

We cannot do it correctly. If we try to add a new rt6_info which
matches one already installed *BUT* this new route does not expire,
we clear the RTF_EXPIRES flag before returingin -EEXIST but leave the
from field alone (we must not change dst.from after construction). So
we could actually deny a route to become part of ecmp set which should
actually be allowed to.

I'll resend the patch with this loop removed.

Thanks,

  Hannes

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ