Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2040435imm; Fri, 7 Sep 2018 09:54:07 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZfJt8mupW2dw16zdqKvJuhrwFlZByvcoFVeihfTaVA+TrIsYC+qCydUkBIEZCJnvvGD8Z9 X-Received: by 2002:a17:902:8215:: with SMTP id x21-v6mr8734020pln.175.1536339247143; Fri, 07 Sep 2018 09:54:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536339247; cv=none; d=google.com; s=arc-20160816; b=ooka+i5JsCfsGFDoWPdpNyexQx5Li7Kp6sl31pa3lh9ZDwyoG7lx3i8JBS6AOQeG0E MWZlqsb4SQXT0bFaM6T2xkreptMDt2317BMQeqGC9Aly/W0++ffJ8KxpjS0VBmnpSOID QOYZt4JoP2/uKB+e9x0DwCdnhyuYBsBB4UmXtqc+t6JySCFbDTO87YGSCYXEFQJ/lE0D CE9aU8A41jsClu7ZPgcP7XgfiJaiFHeAgspU8f5etbzYzoNlEc1ZtXRq9QJ2oaPmDqtZ 7cepnQysYZLVmX/dwZPHYUJEUMdv1im/mXnsXTeuyHZAKCB1nwCw+2jz1s6Cvvv0XLCr baJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=w0Z3X/3FN5CQkyd50S8BsP8Q2A6h+/85xGTB+6sVNnQ=; b=UKSpaCq66V8jCM1oAhZ0Z2Y6txVOAtOiJUixTFn+sXJfJ20WaLK79Yg7FC2iBe+DZ3 lIorGpHYazW12I74ea7TRBCGHDcEom7Epw7rH002wWpZTJmgBCz2qReDb7nJoOCgeC2w 5kdMHDeIOWzpQ0IdlHapLtn1UEhoP5ENNcF13AD1b/WdcbA7ccQ/dVOas1pODOLTUXfF DSALUEW0IVyuH4/H3TKJNFaqABSg9a7EsPN8oKZLVL3xaIHWqDtY1K8e3eBCgovTCnmH uQPeV/18K0bLPWFIPBF8FNigJDWLUdfEtzKth1qO54tW1PNuiHuha5reNFdMRU6yGNmI +r9A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q2-v6si8663277pgs.108.2018.09.07.09.53.51; Fri, 07 Sep 2018 09:54:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726598AbeIGVdA (ORCPT + 99 others); Fri, 7 Sep 2018 17:33:00 -0400 Received: from nautica.notk.org ([91.121.71.147]:38082 "EHLO nautica.notk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726002AbeIGVc7 (ORCPT ); Fri, 7 Sep 2018 17:32:59 -0400 Received: by nautica.notk.org (Postfix, from userid 1001) id 3478AC01A; Fri, 7 Sep 2018 18:51:12 +0200 (CEST) From: Dominique Martinet To: v9fs-developer@lists.sourceforge.net, Eric Van Hensbergen , Latchesar Ionkov Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Dominique Martinet Subject: [PATCH 1/4] 9p: acl: fix uninitialized iattr access Date: Fri, 7 Sep 2018 18:50:54 +0200 Message-Id: <1536339057-21974-2-git-send-email-asmadeus@codewreck.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1536339057-21974-1-git-send-email-asmadeus@codewreck.org> References: <1536339057-21974-1-git-send-email-asmadeus@codewreck.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dominique Martinet 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. Addresses-Coverity-ID: 1195601 ("Uninitalized scalar variable") Signed-off-by: Dominique Martinet --- fs/9p/acl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.17.1