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]
Message-ID: <ca410806-2d2d-4297-7da6-57b782a5b9fc@gmail.com>
Date:   Tue, 30 Jul 2019 07:45:08 -0600
From:   David Ahern <dsahern@...il.com>
To:     Su Yanjun <suyj.fnst@...fujitsu.com>, davem@...emloft.net,
        kuznet@....inr.ac.ru, yoshfuji@...ux-ipv6.org
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net v2] net: ipv6: Fix a bug in ndisc_send_ns when netdev
 only has a global address

On 7/29/19 8:35 PM, Su Yanjun wrote:
> diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
> index 083cc1c..156c027 100644
> --- a/net/ipv6/ndisc.c
> +++ b/net/ipv6/ndisc.c
> @@ -603,11 +603,14 @@ void ndisc_send_ns(struct net_device *dev, const struct in6_addr *solicit,
>  	int inc_opt = dev->addr_len;
>  	int optlen = 0;
>  	struct nd_msg *msg;
> +	u32 banned_flags = IFA_F_TENTATIVE | IFA_F_OPTIMISTIC;
>  
>  	if (!saddr) {

banned_flags should be declared here, under !saddr since that is the
scope of its use.


> -		if (ipv6_get_lladdr(dev, &addr_buf,
> -				   (IFA_F_TENTATIVE|IFA_F_OPTIMISTIC)))
> -			return;
> +		if (ipv6_get_lladdr(dev, &addr_buf, banned_flags)) {
> +			/* try global address */
> +			if (ipv6_get_addr(dev, &addr_buf, banned_flags))
> +				return;
> +		}
>  		saddr = &addr_buf;
>  	}
>  
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ