Skip to content

Commit

Permalink
net: clear msg_get_inq in __get_compat_msghdr()
Browse files Browse the repository at this point in the history
syzbot is still complaining uninit-value in tcp_recvmsg(), for
commit 1228b34 ("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: 1228b34 ("net: clear msg_get_inq in __sys_recvfrom() and __copy_msghdr_from_user()")
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Link: https://lore.kernel.org/r/d06d0f7f-696c-83b4-b2d5-70b5f2730a37@I-love.SAKURA.ne.jp
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Tetsuo Handa authored and Jakub Kicinski committed Sep 20, 2022
1 parent 68fe503 commit d547c1b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit d547c1b

Please sign in to comment.