[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <13b4ccb1-2dec-fc4d-b9da-0957240f7fd7@cogentembedded.com>
Date: Fri, 6 Dec 2019 21:20:22 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Håkon Bugge <haakon.bugge@...cle.com>,
"David S . Miller" <davem@...emloft.net>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net] net: netlink: Fix uninit-value in netlink_recvmsg()
Hello!
On 12/06/2019 04:49 PM, Håkon Bugge wrote:
> If skb_recv_datagram() returns NULL, netlink_recvmsg() will return an
> arbitrarily value.
Arbitrary?
> Signed-off-by: Håkon Bugge <haakon.bugge@...cle.com>
> ---
> net/netlink/af_netlink.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
> index 90b2ab9dd449..bb7276f9c9f8 100644
> --- a/net/netlink/af_netlink.c
> +++ b/net/netlink/af_netlink.c
> @@ -1936,6 +1936,7 @@ static int netlink_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
> return -EOPNOTSUPP;
>
> copied = 0;
> + err = 0;
>
> skb = skb_recv_datagram(sk, flags, noblock, &err);
> if (skb == NULL)
MBR, Sergei
Powered by blists - more mailing lists