* [PATCH] net: fix uninitialized variable issue
@ 2015-12-15 18:46 Tadeusz Struk
2015-12-15 19:02 ` Eric Dumazet
2015-12-15 20:47 ` David Miller
0 siblings, 2 replies; 5+ messages in thread
From: Tadeusz Struk @ 2015-12-15 18:46 UTC (permalink / raw)
To: herbert, davem
Cc: tadeusz.struk, netdev, linux-kernel, stable, freude, viro,
linux-crypto
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);
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] net: fix uninitialized variable issue
2015-12-15 18:46 [PATCH] net: fix uninitialized variable issue Tadeusz Struk
@ 2015-12-15 19:02 ` Eric Dumazet
2015-12-15 22:42 ` Tadeusz Struk
2015-12-15 20:47 ` David Miller
1 sibling, 1 reply; 5+ messages in thread
From: Eric Dumazet @ 2015-12-15 19:02 UTC (permalink / raw)
To: Tadeusz Struk
Cc: herbert, davem, netdev, linux-kernel, stable, freude, viro,
linux-crypto
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.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] net: fix uninitialized variable issue
2015-12-15 19:02 ` Eric Dumazet
@ 2015-12-15 22:42 ` Tadeusz Struk
2015-12-15 23:15 ` Eric Dumazet
0 siblings, 1 reply; 5+ messages in thread
From: Tadeusz Struk @ 2015-12-15 22:42 UTC (permalink / raw)
To: Eric Dumazet
Cc: herbert, davem, netdev, linux-kernel, stable, freude, viro,
linux-crypto
On 12/15/2015 11:02 AM, Eric Dumazet wrote:
> 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")
>
It was added in this commit: 0345f93138b2 ("net: socket: add support for async operations")
Thanks
--
TS
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] net: fix uninitialized variable issue
2015-12-15 22:42 ` Tadeusz Struk
@ 2015-12-15 23:15 ` Eric Dumazet
0 siblings, 0 replies; 5+ messages in thread
From: Eric Dumazet @ 2015-12-15 23:15 UTC (permalink / raw)
To: Tadeusz Struk
Cc: herbert, davem, netdev, linux-kernel, stable, freude, viro,
linux-crypto
On Tue, 2015-12-15 at 14:42 -0800, Tadeusz Struk wrote:
> It was added in this commit: 0345f93138b2 ("net: socket: add support for async operations")
>
Thanks !
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net: fix uninitialized variable issue
2015-12-15 18:46 [PATCH] net: fix uninitialized variable issue Tadeusz Struk
2015-12-15 19:02 ` Eric Dumazet
@ 2015-12-15 20:47 ` David Miller
1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2015-12-15 20:47 UTC (permalink / raw)
To: tadeusz.struk
Cc: herbert, netdev, linux-kernel, stable, freude, viro, linux-crypto
From: Tadeusz Struk <tadeusz.struk@intel.com>
Date: Tue, 15 Dec 2015 10:46:17 -0800
> 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>
Looks good, applied, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-12-15 23:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-15 18:46 [PATCH] net: fix uninitialized variable issue Tadeusz Struk
2015-12-15 19:02 ` Eric Dumazet
2015-12-15 22:42 ` Tadeusz Struk
2015-12-15 23:15 ` Eric Dumazet
2015-12-15 20:47 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.