]> git.itanic.dy.fi Git - linux-stable/commit
cifs: always initialize struct msghdr smb_msg completely
authorStefan Metzmacher <metze@samba.org>
Wed, 14 Sep 2022 03:25:47 +0000 (05:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Sep 2022 12:15:48 +0000 (14:15 +0200)
commit9a72466fb61b3cacf28faa9d805c1918f47f7029
tree53ce3c6fd3811e2df94cb68a9f7869ea761458a3
parent21c47a08f96a3ec44c6f4a78614ea586faaa37f5
cifs: always initialize struct msghdr smb_msg completely

commit bedc8f76b3539ac4f952114b316bcc2251e808ce upstream.

So far we were just lucky because the uninitialized members
of struct msghdr are not used by default on a SOCK_STREAM tcp
socket.

But as new things like msg_ubuf and sg_from_iter where added
recently, we should play on the safe side and avoid potention
problems in future.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Cc: stable@vger.kernel.org
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/connect.c
fs/cifs/transport.c