]> git.baikalelectronics.ru Git - kernel.git/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)
committerSteve French <stfrench@microsoft.com>
Wed, 14 Sep 2022 03:55:45 +0000 (22:55 -0500)
commit3d52c5dc603423771d66bde845f951c877cc7c96
tree7459f5678cd94b2c88499249de5a1ee0abe6d0ae
parent100af32c8396287e72436554d78a5575212d4f6b
cifs: always initialize struct msghdr smb_msg completely

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>
fs/cifs/connect.c
fs/cifs/transport.c