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]
Date:   Fri, 31 Dec 2021 16:51:20 +0100
From:   Nicolas Dichtel <nicolas.dichtel@...nd.com>
To:     David Ahern <dsahern@...nel.org>, netdev@...r.kernel.org
Cc:     idosch@...sch.org, Roopa Prabhu <roopa@...dia.com>
Subject: Re: [PATCH net 4/5] ipv6: Check attribute length for RTA_GATEWAY when
 deleting multipath route

Le 31/12/2021 à 01:36, David Ahern a écrit :
> Make sure RTA_GATEWAY for IPv6 multipath route has enough bytes to hold
> an IPv6 address.
> 
> Fixes: 6b9ea5a64ed5 ("ipv6: fix multipath route replace error recovery")
> Signed-off-by: David Ahern <dsahern@...nel.org>
> Cc: Roopa Prabhu <roopa@...dia.com>
> ---
>  net/ipv6/route.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> index d16599c225b8..b311c0bc9983 100644
> --- a/net/ipv6/route.c
> +++ b/net/ipv6/route.c
> @@ -5453,7 +5453,11 @@ static int ip6_route_multipath_del(struct fib6_config *cfg,
>  
>  			nla = nla_find(attrs, attrlen, RTA_GATEWAY);
>  			if (nla) {
> -				nla_memcpy(&r_cfg.fc_gateway, nla, 16);
> +				err = fib6_gw_from_attr(&r_cfg.fc_gateway, nla,
> +							extack);
> +				if (err)
> +					return err;
When ip6_route_del() fails, the loop continue. For consistency, maybr it could
be good to do the same for this error.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ