Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp127878pxk; Tue, 15 Sep 2020 23:18:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlEszBmkZJMaOFqAOgMS9cnvFTOgTw7fj2W4yGMeUJOJHONJvSFxc7FKnGm90rNJ5z+sEd X-Received: by 2002:a17:906:b156:: with SMTP id bt22mr23421909ejb.481.1600237135029; Tue, 15 Sep 2020 23:18:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600237135; cv=none; d=google.com; s=arc-20160816; b=a5ICcOVjaLLKlgWTkWMV9Wv2wCRCqYn2evissNl04+3vWa00v4MsgfZlf9RH/kPj0E /78vB7ckhetEYvV4IVCLLQjfr7jkO8wZWBk/4dp+cNg0er5H3Y5xBl5I9gKBH6xLT52P OPrrAvREzjS6vzpuGQmIwJZntPuqJLwVxaaK84Brnxjnt/nvaY8GbhEfw94RXed7FbNZ SZY0Jypon806L3hX3cz5hsJlhhkWWuVaRm2c3azyWzyt3VM7zip3iJ8A6O/zTEQhHX8i mAPk77gqKlifsI/Xoz9ncwmxNYRpm0ZEtfmyndmucJIvk+k5ulM8yZS2r1yu+qUK+/6U R/Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=1FeN9RUCQkpP8rFk9zMjFMsMbdJinfBwncvpOPiw/sk=; b=BIktDlefYUyySGw0fldA7bTiZcV3kPk6DSAsQUsJyLgFPZoq8oYSVo4TytiS1Gu1WE Yo8aPVd8UnXGtAfYE+ob9QFm7KattDPJ2DrTH+UWh7/61VGqti1aU6RD2vRRWQExgwmC YEGV9L0PZh2gfHkc19Wi9usAE4IKADbESreIHlGdTIqYwAHlE1Ja3kpr8WRIgDMn6BdT clDUtmKeGOmjX/G9u9hP4hX4zQdhkm85qd6PRr7U75c6Xdu8cKs8iReCDvp/JbCWXrBp yGgVxUwxosGqqvGfrTJAvHJVhs6fCgymywlu/n/owUchrefXea7fXxRseoqsdYFVGjXZ pJxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kroah.com header.s=fm1 header.b=o9xA6zzn; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=WhPubNBp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y9si3227876ejg.460.2020.09.15.23.18.32; Tue, 15 Sep 2020 23:18:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kroah.com header.s=fm1 header.b=o9xA6zzn; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=WhPubNBp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726189AbgIPGPu (ORCPT + 99 others); Wed, 16 Sep 2020 02:15:50 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:60017 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726093AbgIPGPt (ORCPT ); Wed, 16 Sep 2020 02:15:49 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 29E185C00F5; Wed, 16 Sep 2020 02:15:47 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 16 Sep 2020 02:15:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=1FeN9RUCQkpP8rFk9zMjFMsMbdJ infBwncvpOPiw/sk=; b=o9xA6zznMel1d8/0CDVc5OYSNmEgxGIpOxDctBhzIWE lBXGqJlO8b1ePb9CbhfqZvwesuhmz4963su9cBPKtqYSKvbWKkl2m74i8jF2sjaW iPVY8/wr8pe/xjWMTUWMqyhIcJKiXb3qHDd8YewU3hSG71RUewTQwZioXnj2Jqpv Y3b9QII/aE65gZCXIkvMKndzPxJmzx+E8tE/zgi6oRpawR40ZpSy7ZkEwhwjzXdH oH7ZG2U/LmtOpxcwnX6ZZ23pMQt/LCSa//s49sMfHkxj70m3fCyNmUflSRVrkcAS TnuLYa5wfd+6LMybUxyne9/ZoGoVIbKbstmlYH6ssjQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=1FeN9R UCQkpP8rFk9zMjFMsMbdJinfBwncvpOPiw/sk=; b=WhPubNBp9ZHvAuf7n+yp1o M7JxwmAf3ckif65SowVRFr2gAcrF1V3GTmBHllx4mgZi+9WOI1YZPK6L8q09IxnS Tuk4AQiR/IQnRb6Y9wrEqqi5M/UnFCxaHNzFTa9lBHfBjZNQ3S3QBJSRqsWpLQoc gJyXhndSUBkbTmg7oKdPguP5m7G7gy3wCEJS/weSvcWleaI/5tmzVSoNoqyHFww0 esyQFoQFGCqYS3eYYAchKgi59Q6DFmMVlenBT212ZqOaFbJZbIhXhpbTubdjze8F i+GVWg2FTcCiIYXK6QB2rsTZjNmOqZ1m3WsNOokegaHZKtj66qtzW3dxRL4DU/Ng == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrtddugdellecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepifhrvghgucfm jfcuoehgrhgvgheskhhrohgrhhdrtghomheqnecuggftrfgrthhtvghrnhepjeehheetve eiffeutdfhleekkeefleevgfdufeehtdejgeejhfdvffeggfdugeefnecuffhomhgrihhn pehshiiikhgrlhhlvghrrdgrphhpshhpohhtrdgtohhmnecukfhppeekfedrkeeirdejge drieegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhep ghhrvghgsehkrhhorghhrdgtohhm X-ME-Proxy: Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) by mail.messagingengine.com (Postfix) with ESMTPA id 5259E3064684; Wed, 16 Sep 2020 02:15:46 -0400 (EDT) Date: Wed, 16 Sep 2020 08:16:22 +0200 From: Greg KH To: Anant Thazhemadam Cc: linux-kernel@vger.kernel.org, Alexander Viro , linux-fsdevel@vger.kernel.org, syzbot+4191a44ad556eacc1a7a@syzkaller.appspotmail.com, linux-kernel-mentees@lists.linuxfoundation.org Subject: Re: [Linux-kernel-mentees] [PATCH] fs: fix KMSAN uninit-value bug by initializing nd in do_file_open_root Message-ID: <20200916061622.GA142621@kroah.com> References: <20200916052657.18683-1-anant.thazhemadam@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200916052657.18683-1-anant.thazhemadam@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 16, 2020 at 10:56:56AM +0530, Anant Thazhemadam wrote: > The KMSAN bug report for the bug indicates that there exists; > Local variable ----nd@do_file_open_root created at: > do_file_open_root+0xa4/0xb40 fs/namei.c:3385 > do_file_open_root+0xa4/0xb40 fs/namei.c:3385 What does this "error" mean? > Initializing nd fixes this issue, and doesn't break anything else either > > Fixes: https://syzkaller.appspot.com/bug?extid=4191a44ad556eacc1a7a > Reported-by: syzbot+4191a44ad556eacc1a7a@syzkaller.appspotmail.com > Tested-by: syzbot+4191a44ad556eacc1a7a@syzkaller.appspotmail.com > Signed-off-by: Anant Thazhemadam > --- > fs/namei.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/namei.c b/fs/namei.c > index e99e2a9da0f7..b27382586209 100644 > --- a/fs/namei.c > +++ b/fs/namei.c > @@ -3404,7 +3404,7 @@ struct file *do_filp_open(int dfd, struct filename *pathname, > struct file *do_file_open_root(struct dentry *dentry, struct vfsmount *mnt, > const char *name, const struct open_flags *op) > { > - struct nameidata nd; > + struct nameidata nd = {}; What exactly does setting this structure to all 0 fix here that is currently "broken"? confused, greg k-h