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: <adb4f9a5-6f3d-5aeb-a1e7-9ac04be925d5@gmail.com>
Date:   Wed, 22 Sep 2021 22:13:36 -0600
From:   David Ahern <dsahern@...il.com>
To:     Xiao Liang <shaw.leon@...il.com>, netdev <netdev@...r.kernel.org>
Cc:     yoshfuji@...ux-ipv6.org, dsahern@...nel.org, kuba@...nel.org,
        davem@...emloft.net
Subject: Re: [PATCH net] net: ipv4: Fix rtnexthop len when RTA_FLOW is present

On 9/22/21 4:16 AM, Xiao Liang wrote:
> @@ -1682,10 +1683,17 @@ int fib_add_nexthop(struct sk_buff *skb, const struct fib_nh_common *nhc,
>  	/* length of rtnetlink header + attributes */
>  	rtnh->rtnh_len = nlmsg_get_pos(skb) - (void *)rtnh;
>  
> -	return 0;
> +	return rtnh;
>  
>  nla_put_failure:
> -	return -EMSGSIZE;
> +	return ERR_PTR(-EMSGSIZE);
> +}
> +
> +int fib_add_nexthop(struct sk_buff *skb, const struct fib_nh_common *nhc,
> +		    int nh_weight, u8 rt_family)

Adding classid as an input to fib_add_nexthop and checking it for non-0
before adding to the message is a better way to resolve this.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ