All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: clear msg_get_inq in __get_compat_msghdr()
@ 2022-09-14  9:51 Tetsuo Handa
  2022-09-14  9:54 ` Jens Axboe
  2022-09-20 15:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Tetsuo Handa @ 2022-09-14  9:51 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Jens Axboe
  Cc: Network Development

syzbot is still complaining uninit-value in tcp_recvmsg(), for
commit 1228b34c8d0ecf6d ("net: clear msg_get_inq in __sys_recvfrom() and
__copy_msghdr_from_user()") missed that __get_compat_msghdr() is called
instead of copy_msghdr_from_user() when MSG_CMSG_COMPAT is specified.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Fixes: 1228b34c8d0ecf6d ("net: clear msg_get_inq in __sys_recvfrom() and __copy_msghdr_from_user()")
---
 net/compat.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/compat.c b/net/compat.c
index fe9be3c56ef7..385f04a6be2f 100644
--- a/net/compat.c
+++ b/net/compat.c
@@ -52,6 +52,7 @@ int __get_compat_msghdr(struct msghdr *kmsg,
 		kmsg->msg_namelen = sizeof(struct sockaddr_storage);
 
 	kmsg->msg_control_is_user = true;
+	kmsg->msg_get_inq = 0;
 	kmsg->msg_control_user = compat_ptr(msg->msg_control);
 	kmsg->msg_controllen = msg->msg_controllen;
 
-- 
2.18.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: clear msg_get_inq in __get_compat_msghdr()
  2022-09-14  9:51 [PATCH] net: clear msg_get_inq in __get_compat_msghdr() Tetsuo Handa
@ 2022-09-14  9:54 ` Jens Axboe
  2022-09-20 15:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2022-09-14  9:54 UTC (permalink / raw)
  To: Tetsuo Handa, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Network Development

On 9/14/22 3:51 AM, Tetsuo Handa wrote:
> syzbot is still complaining uninit-value in tcp_recvmsg(), for
> commit 1228b34c8d0ecf6d ("net: clear msg_get_inq in __sys_recvfrom() and
> __copy_msghdr_from_user()") missed that __get_compat_msghdr() is called
> instead of copy_msghdr_from_user() when MSG_CMSG_COMPAT is specified.

Looks good to me:

Reviewed-by: Jens Axboe <axboe@kernel.dk>

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: clear msg_get_inq in __get_compat_msghdr()
  2022-09-14  9:51 [PATCH] net: clear msg_get_inq in __get_compat_msghdr() Tetsuo Handa
  2022-09-14  9:54 ` Jens Axboe
@ 2022-09-20 15:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-09-20 15:40 UTC (permalink / raw)
  To: Tetsuo Handa; +Cc: davem, edumazet, kuba, pabeni, axboe, netdev

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 14 Sep 2022 18:51:54 +0900 you wrote:
> syzbot is still complaining uninit-value in tcp_recvmsg(), for
> commit 1228b34c8d0ecf6d ("net: clear msg_get_inq in __sys_recvfrom() and
> __copy_msghdr_from_user()") missed that __get_compat_msghdr() is called
> instead of copy_msghdr_from_user() when MSG_CMSG_COMPAT is specified.
> 
> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Fixes: 1228b34c8d0ecf6d ("net: clear msg_get_inq in __sys_recvfrom() and __copy_msghdr_from_user()")
> 
> [...]

Here is the summary with links:
  - net: clear msg_get_inq in __get_compat_msghdr()
    https://git.kernel.org/netdev/net/c/d547c1b717fc

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-20 15:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-14  9:51 [PATCH] net: clear msg_get_inq in __get_compat_msghdr() Tetsuo Handa
2022-09-14  9:54 ` Jens Axboe
2022-09-20 15:40 ` patchwork-bot+netdevbpf

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.