summaryrefslogtreecommitdiff
path: root/fs/9p
diff options
context:
space:
mode:
authorDominique Martinet <dominique.martinet@cea.fr>2018-09-08 00:10:57 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-03 13:15:58 +0200
commitc9928b45845bfd4c13e41ae8391769cf6f7eb198 (patch)
treed3a1f37ebec20af47f78bfb292f57a6b8d5a32a7 /fs/9p
parentce3220827dcccba5a18e7587062995dab94b9c6a (diff)
9p: acl: fix uninitialized iattr access
[ Upstream commit e02a53d92e197706cad1627bd84705d4aa20a145 ] iattr is passed to v9fs_vfs_setattr_dotl which does send various values from iattr over the wire, even if it tells the server to only look at iattr.ia_valid fields this could leak some stack data. Link: http://lkml.kernel.org/r/1536339057-21974-2-git-send-email-asmadeus@codewreck.org Addresses-Coverity-ID: 1195601 ("Uninitalized scalar variable") Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/9p')
-rw-r--r--fs/9p/acl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/9p/acl.c b/fs/9p/acl.c
index 082d227fa56b..6261719f6f2a 100644
--- a/fs/9p/acl.c
+++ b/fs/9p/acl.c
@@ -276,7 +276,7 @@ static int v9fs_xattr_set_acl(const struct xattr_handler *handler,
switch (handler->flags) {
case ACL_TYPE_ACCESS:
if (acl) {
- struct iattr iattr;
+ struct iattr iattr = { 0 };
struct posix_acl *old_acl = acl;
retval = posix_acl_update_mode(inode, &iattr.ia_mode, &acl);