Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

9p: acl: fix uninitialized iattr access

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>

+1 -1
+1 -1
fs/9p/acl.c
··· 276 276 switch (handler->flags) { 277 277 case ACL_TYPE_ACCESS: 278 278 if (acl) { 279 - struct iattr iattr; 279 + struct iattr iattr = { 0 }; 280 280 struct posix_acl *old_acl = acl; 281 281 282 282 retval = posix_acl_update_mode(inode, &iattr.ia_mode, &acl);