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]
Message-ID: <d3dfaec9-59de-9002-7917-b4b5bd40090a@gmail.com>
Date:   Sat, 25 Jan 2020 09:29:25 -0700
From:   David Ahern <dsahern@...il.com>
To:     Stephen Worley <sworley@...ulusnetworks.com>,
        netdev@...r.kernel.org
Cc:     davem@...emloft.net, sharpd@...ulusnetworks.com,
        roopa@...ulusnetworks.com
Subject: Re: [PATCH] net: include struct nhmsg size in nh nlmsg size

On 1/24/20 2:53 PM, Stephen Worley wrote:
> Include the size of struct nhmsg size when calculating
> how much of a payload to allocate in a new netlink nexthop
> notification message.
> 
> Without this, we will fail to fill the skbuff at certain nexthop
> group sizes.
> 

...

> 
> Fixes: 430a049190de ("nexthop: Add support for nexthop groups")
> Signed-off-by: Stephen Worley <sworley@...ulusnetworks.com>
> ---
>  net/ipv4/nexthop.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c
> index 511eaa94e2d1..d072c326dd64 100644
> --- a/net/ipv4/nexthop.c
> +++ b/net/ipv4/nexthop.c
> @@ -321,7 +321,9 @@ static size_t nh_nlmsg_size_single(struct nexthop *nh)
>  
>  static size_t nh_nlmsg_size(struct nexthop *nh)
>  {
> -	size_t sz = nla_total_size(4);    /* NHA_ID */
> +	size_t sz = NLMSG_ALIGN(sizeof(struct nhmsg));
> +
> +	sz += nla_total_size(4); /* NHA_ID */
>  
>  	if (nh->is_group)
>  		sz += nh_nlmsg_size_grp(nh);
> 
> base-commit: 623c8d5c74c69a41573da5a38bb59e8652113f56
> 
Good find. Thanks for the patch:

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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ