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: <20170103130925.GA11735@hmsreliant.think-freely.org>
Date:   Tue, 3 Jan 2017 08:09:25 -0500
From:   Neil Horman <nhorman@...driver.com>
To:     Reiter Wolfgang <wr0112358@...il.com>
Cc:     davem@...emloft.net, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drop_monitor: consider inserted data in genlmsg_end

On Tue, Jan 03, 2017 at 01:39:10AM +0100, Reiter Wolfgang wrote:
> Final nlmsg_len field update must reflect inserted net_dm_drop_point
> data.
> 
> This patch depends on previous patch:
> "drop_monitor: add missing call to genlmsg_end"
> 
> Signed-off-by: Reiter Wolfgang <wr0112358@...il.com>
> ---
>  net/core/drop_monitor.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c
> index f465bad..fb55327 100644
> --- a/net/core/drop_monitor.c
> +++ b/net/core/drop_monitor.c
> @@ -102,7 +102,6 @@ static struct sk_buff *reset_per_cpu_data(struct per_cpu_dm_data *data)
>  	}
>  	msg = nla_data(nla);
>  	memset(msg, 0, al);
> -	genlmsg_end(skb, msg_header);
>  	goto out;
>  
>  err:
> @@ -112,6 +111,13 @@ static struct sk_buff *reset_per_cpu_data(struct per_cpu_dm_data *data)
>  	swap(data->skb, skb);
>  	spin_unlock_irqrestore(&data->lock, flags);
>  
> +	if (skb) {
> +		struct nlmsghdr *nlh = (struct nlmsghdr *)skb->data;
> +		struct genlmsghdr *gnlh = (struct genlmsghdr *)nlmsg_data(nlh);
> +
> +		genlmsg_end(skb, genlmsg_data(gnlh));
> +	}
> +
>  	return skb;
>  }
>  
> -- 
> 2.9.3
> 
> 
Acked-by: Neil Horman <nhorman@...driver.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ