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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKD1Yr2LJT+rYwbKQMvMQFtSDTwQAHk5k__m22J=kx8eKxj1JA@mail.gmail.com>
Date:	Thu, 29 Jan 2015 14:25:51 +0900
From:	Lorenzo Colitti <lorenzo@...gle.com>
To:	Erik Kline <ek@...gle.com>
Cc:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Hannes Frederic Sowa <hannes@...essinduktion.org>
Subject: Re: [PATCH net v2] net: ipv6: allow explicitly choosing optimistic addresses

On Wed, Jan 28, 2015 at 9:03 PM, Erik Kline <ek@...gle.com> wrote:
>                 if (ipv6_addr_equal(&ifp->addr, addr) &&
> -                   !(ifp->flags&IFA_F_TENTATIVE) &&
> +                   (!(ifp->flags&banned_flags) ||
> +                    ifp->flags&IFA_F_OPTIMISTIC&~banned_flags) &&

Is this if statement correct?

The intent here is "if ifp has IFA_F_OPTIMISTIC set, then
IFA_F_TENTATIVE is allowed, even if the caller explicitly banned
IFA_F_TENTATIVE", right? Not "if ifp has IFA_F_OPTIMISTIC set, then
any flags are allowed, even ones explicitly baned by the caller". For
example, suppose that:

    banned_flags = IFA_F_SECONDARY
    ifp->flags = IFA_F_SECONDARY | IFA_F_OPTIMISTIC

In that case, won't the if statement match ifp, even though it
contains a flag that is explicitly banned?
--
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