Commit e4191e54 authored by Stefan Metzmacher's avatar Stefan Metzmacher Committed by Jialin Zhang
Browse files

cifs: always initialize struct msghdr smb_msg completely

stable inclusion
from stable-v5.10.146
commit 2a2e503a62e5c3efdad7749bb13c64e09e8c377d
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6D0VX

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2a2e503a62e5c3efdad7749bb13c64e09e8c377d



--------------------------------

[ Upstream commit bedc8f76 ]

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: default avatarStefan Metzmacher <metze@samba.org>
Cc: stable@vger.kernel.org
Reviewed-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
Reviewed-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
Reviewed-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 278e9173
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment