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:   Tue, 22 Jan 2019 15:53:25 -0700
From:   David Ahern <dsahern@...il.com>
To:     Jakub Kicinski <jakub.kicinski@...ronome.com>, davem@...emloft.net
Cc:     netdev@...r.kernel.org, oss-drivers@...ronome.com
Subject: Re: [PATCH net v2] net/ipv6: don't return positive numbers when
 nothing was dumped

On 1/22/19 3:47 PM, Jakub Kicinski wrote:
> in6_dump_addrs() returns a positive 1 if there was nothing to dump.
> This return value can not be passed as return from inet6_dump_addr()
> as is, because it will confuse rtnetlink, resulting in NLMSG_DONE
> never getting set:
> 
> $ ip addr list dev lo
> EOF on netlink
> Dump terminated
> 
> v2: flip condition to avoid a new goto (DaveA)
> 
> Fixes: 7c1e8a3817c5 ("netlink: fixup regression in RTM_GETADDR")
> Reported-by: Brendan Galloway <brendan.galloway@...ronome.com>
> Signed-off-by: Jakub Kicinski <jakub.kicinski@...ronome.com>
> ---
>  net/ipv6/addrconf.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
> index 57198b3c86da..015e5ccbe306 100644
> --- a/net/ipv6/addrconf.c
> +++ b/net/ipv6/addrconf.c
> @@ -5155,6 +5155,8 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb,
>  			if (idev) {
>  				err = in6_dump_addrs(idev, skb, cb, s_ip_idx,
>  						     &fillargs);
> +				if (err > 0)
> +					err = 0;
>  			}
>  			goto put_tgt_net;
>  		}
> 

Reviewed-by: David Ahern <dsahern@...il.com>
Tested-by: David Ahern <dsahern@...il.com>

Thanks, Jakub.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ