Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2114268pxk; Sat, 19 Sep 2020 13:20:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQTvJ2RogldF6x5Rx/j1ZgB7N5vWWkVTtO718Jy4jftRy4ZFZDM56HjpBosZm8x9zkK5aY X-Received: by 2002:a17:906:6a52:: with SMTP id n18mr41523304ejs.58.1600546816273; Sat, 19 Sep 2020 13:20:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600546816; cv=none; d=google.com; s=arc-20160816; b=uG6RBZXG+nLo/Guh3PqEgPyCzrxLe+DDtfs3X7/yNSs+gXi+zfDV1Odb3xnG4rXu54 vuDNmRH7tcstw90MhAQ83qXuGcpRBzlakh12yCy/wzvB7YMjuekD7Ym22BLrdr1SYiCO Cy/14XJM3ipcrSofpo6OJTMSpDsab3OoearCaEvV3lyg1gPr1RSJ/o/y2Ujp+2RUtpG+ iNgfceWBob0N6sLEInwhFsPcYvI19byJL0E/q3z4rYvxpHTqwXsgnZimmtD0qRVTTZfY vZ+jiXm/8cWc07thYrbGkYXI71hk7A+yLVZDjfWPQ+3Uz8K5tevHK6VW061k930eAt4b lBpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:from:subject:dkim-signature; bh=nufqMxRxzBynEUzPSmKE11m5kNg4+eB3mixf5Nnih4E=; b=Hl8DYdGv7gqUPA0wd9PRQYq15Tq2oE0eAdFuRv30SbV0h1MpobgdTnN3YpfZHsgn7A 5ZtMmOHz1PUtIWykyKAfMH0Iqh15rAUJodCxcKz7z4U9kKemiC86p1BnQskBNQY6tqXu f2sWC+4Yxd83NgbtmKVsIFsjLIjSPA9gpUov67u5QrOkK55G5x5O/XqMW9abg5E5BEP9 tbjAGOc+Le4rZQ14Q4Sq3FyLEWx5SMum2kuZvv8VDi+zBd1ebiRW6Zt61zFSMbnHtbYo yfOr/rfPiTRNnEBQFDOVlO4O6ihRdvFHg8NjZmEdhGrQNE8v4KoT6aIP6Vo8v8uOueUI V1Tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dswyVVpW; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id fw23si5150606ejb.402.2020.09.19.13.19.51; Sat, 19 Sep 2020 13:20:16 -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=@gmail.com header.s=20161025 header.b=dswyVVpW; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726621AbgISURq (ORCPT + 99 others); Sat, 19 Sep 2020 16:17:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726511AbgISURq (ORCPT ); Sat, 19 Sep 2020 16:17:46 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15035C0613CE; Sat, 19 Sep 2020 13:17:46 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id k8so5734093pfk.2; Sat, 19 Sep 2020 13:17:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=nufqMxRxzBynEUzPSmKE11m5kNg4+eB3mixf5Nnih4E=; b=dswyVVpWzVbiP2kS5AD/QD8cHzI45lM/MxkySFRQSVYmP2C8cVcZnsoIUHMkeP0p6/ NlTrTAXVIQGKSljeVEQhU+rnZwZ3C/3m2dB4u56v+olo8gfT5B9MdaXdKTVwCBBXSfso d5Z4wDdJJBRlamEyPm/YjKSiZ8yioEkioxLfq+AigV1SPZ/xhfZr0jOIVyYzat9wDWYC 51w3q3tm5bQ7RG8qzu+7WpdTHbkb0eyDyFpKSEapx3qUPx39/PPaLOEEJuICYPy02oWM UnjgNwiJitmwsUd5YiujlNl9YLxZIOY8BPW9NDqyDoHD3//eqchZuhpJIFz3Tx97SysN eKpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=nufqMxRxzBynEUzPSmKE11m5kNg4+eB3mixf5Nnih4E=; b=L7q3f+lVdQWz5koVnjAq++F2J045zwW+UsnLWFb2cdoChW+tdV9g2b7PeM4nG+OdqA 0WVyNt7Ssad8I2VFRgattaVfuMbenElb2M/sCD7nL/F96amVb413wNm0LVg/aVRVtUU1 pJhuXPep9Adfd/UPkSyAFUUqyHmERBVH/MoZ627oVBdLRoPIOjJTP5AROPohdLhWq8D0 drNLTPK3ipjC+bjKsOcI9iPWCfeWK5ba9KM4y1uKhNWoorlh0+nSnJTfGNUURNObHY68 /zRSynaIk22FZq1M0hk3hR5CqAuDxCv5uoUn0AXQ3JsRylWCgjvE5HZhEwGZCu/7XY9s UNyQ== X-Gm-Message-State: AOAM532ORsq3/aD383vrB/oD9QGONCSOLttvFL78oT3KQyns55nMvScT i3nsadjXVV57YNGdX8ndoPEmRmUWhO3FMTvfj+A= X-Received: by 2002:aa7:8aca:0:b029:13e:d13d:a07d with SMTP id b10-20020aa78aca0000b029013ed13da07dmr37930221pfd.20.1600546664624; Sat, 19 Sep 2020 13:17:44 -0700 (PDT) Received: from [192.168.0.104] ([49.207.212.24]) by smtp.gmail.com with ESMTPSA id d20sm6371822pjv.39.2020.09.19.13.17.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 19 Sep 2020 13:17:43 -0700 (PDT) Subject: Re: [Linux-kernel-mentees] [PATCH] fs: fix KMSAN uninit-value bug by initializing nd in do_file_open_root From: Anant Thazhemadam To: Al Viro , Greg KH Cc: Eric Biggers , linux-fsdevel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, syzbot+4191a44ad556eacc1a7a@syzkaller.appspotmail.com, linux-kernel@vger.kernel.org References: <20200916052657.18683-1-anant.thazhemadam@gmail.com> <20200916054157.GC825@sol.localdomain> <20200917002238.GO3421308@ZenIV.linux.org.uk> <20200919144451.GF2712238@kroah.com> <20200919161727.GG3421308@ZenIV.linux.org.uk> <20200919165558.GH3421308@ZenIV.linux.org.uk> <26d881e5-f68a-b3b7-4cb0-04a3c6c384ac@gmail.com> Message-ID: Date: Sun, 20 Sep 2020 01:47:39 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: <26d881e5-f68a-b3b7-4cb0-04a3c6c384ac@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19-09-2020 17:03, Anant Thazhemadam wrote: > On 19-09-2020 22:25, Al Viro wrote: >> On Sat, Sep 19, 2020 at 05:17:27PM +0100, Al Viro wrote: >> >>> Lovely... That would get an empty path and non-directory for a starting >>> point, but it should end up with LAST_ROOT in nd->last_type. Which should >>> not be able to reach the readers of those fields... Which kernel had >>> that been on? >> Yecchhh... I see what's going on; I suspect that this ought to be enough. >> Folks, could somebody test it on the original reproducer setup? > Sure. I can do that. Looks like this patch actually fixes this bug. I made syzbot test the patch, and no issues were triggered! Note:??? syzbot tested the patch with the KMSAN kernel, which was recently rebased on v5.9-rc4. Thanks, Anant