]> 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>
Wed, 28 Sep 2022 09:04:08 +0000 (11:04 +0200)
commit8c8d0f7ac82f4cca7f0dcffd29053953197c2865
tree5fba057623e68b46318db88422c8fed1299f4f41
parent1438e412aeda2db2edde26f4d46c67a2f333fe53
cifs: always initialize struct msghdr smb_msg completely

[ Upstream commit bedc8f76b3539ac4f952114b316bcc2251e808ce ]

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: Sasha Levin <sashal@kernel.org>
fs/cifs/connect.c
fs/cifs/transport.c