Skip to content

Commit f779172

Browse files
Dominique Martinetgregkh
authored andcommitted
9p: acl: fix uninitialized iattr access
[ Upstream commit e02a53d ] 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/[email protected] Addresses-Coverity-ID: 1195601 ("Uninitalized scalar variable") Signed-off-by: Dominique Martinet <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent ad93d62 commit f779172

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/9p/acl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ static int v9fs_xattr_set_acl(const struct xattr_handler *handler,
276276
switch (handler->flags) {
277277
case ACL_TYPE_ACCESS:
278278
if (acl) {
279-
struct iattr iattr;
279+
struct iattr iattr = { 0 };
280280
struct posix_acl *old_acl = acl;
281281

282282
retval = posix_acl_update_mode(inode, &iattr.ia_mode, &acl);

0 commit comments

Comments
 (0)