Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Tadeusz Struk <tadeusz.struk@intel.com>
Cc: herbert@gondor.apana.org.au, davem@davemloft.net,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, freude@linux.vnet.ibm.com,
	viro@zeniv.linux.org.uk, linux-crypto@vger.kernel.org
Subject: Re: [PATCH] net: fix uninitialized variable issue
Date: Tue, 15 Dec 2015 11:02:09 -0800	[thread overview]
Message-ID: <1450206129.8474.48.camel@edumazet-glaptop2.roam.corp.google.com> (raw)
In-Reply-To: <20151215184617.11620.23369.stgit@tstruk-mobl1>

On Tue, 2015-12-15 at 10:46 -0800, Tadeusz Struk wrote:
> msg_iocb needs to be initialized on the recv/recvfrom path.
> Otherwise afalg will wrongly interpret it as an async call.
> 
> Cc: stable@vger.kernel.org
> Reported-by: Harald Freudenberger <freude@linux.vnet.ibm.com>
> Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
> ---
>  net/socket.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/net/socket.c b/net/socket.c
> index dd2c247..80ca820 100644
> --- a/net/socket.c
> +++ b/net/socket.c
> @@ -1702,6 +1702,7 @@ SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, ubuf, size_t, size,
>  	msg.msg_name = addr ? (struct sockaddr *)&address : NULL;
>  	/* We assume all kernel code knows the size of sockaddr_storage */
>  	msg.msg_namelen = 0;
> +	msg.msg_iocb = NULL;
>  	if (sock->file->f_flags & O_NONBLOCK)
>  		flags |= MSG_DONTWAIT;
>  	err = sock_recvmsg(sock, &msg, iov_iter_count(&msg.msg_iter), flags);
> 

Do not add "Cc: stable@vger.kernel.org" for networking patches, thanks 
( Documentation/networking/netdev-FAQ.txt )

Do you know when was this bug added ?

Please add the 

Fixes:  12-digit-sha1 ("patch title")

Thanks.

  reply	other threads:[~2015-12-15 19:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-15 18:46 [PATCH] net: fix uninitialized variable issue Tadeusz Struk
2015-12-15 19:02 ` Eric Dumazet [this message]
2015-12-15 22:42   ` Tadeusz Struk
2015-12-15 23:15     ` Eric Dumazet
2015-12-15 20:47 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1450206129.8474.48.camel@edumazet-glaptop2.roam.corp.google.com \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=freude@linux.vnet.ibm.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tadeusz.struk@intel.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox