Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3275510rdh; Thu, 28 Sep 2023 07:28:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGh5nTssUWQ7SS3BIcHt0phxV40Dt1FNk9Cv32laoOZEFJ01fbwD6TK9KoP83oIpMfnuT2v X-Received: by 2002:a05:6870:2045:b0:1bb:84af:bf8f with SMTP id l5-20020a056870204500b001bb84afbf8fmr1407928oad.58.1695911283517; Thu, 28 Sep 2023 07:28:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695911283; cv=none; d=google.com; s=arc-20160816; b=jZvMJ6bnNg0qWeuRhnxtx5mNhQftVppYVg9P+TQE1kwCW10ToQq67GnZzaU23AKXjW pWtEpFDtuW5hYeaZWK1bISItpIXIFvtNpgSHANbKPJXSj0+FFtTa9tnmv0FQq9Kxg7uR n87I/YJi4vBsMxPWTRtso3gPlAWLHxrXc233SuexUEDq8ShJSCRgSiAOoQe1AW19sb0m 6n0XMUWirkK+Zh4kQUgB9dIESq9fyni8pGdW1KcfdFXMpmSwIxEDMVw1nEkpZ3JzmwO9 giyXBclqE+gxeTYmOwGije++evEEw52opR1pKzVRqv7Yt8AqYK07AAYD3Kz74Exjxxiw zqoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6Dg6G5NYkGLr0eWe04c4RUxjLhdkFIrJohD7fivs7+I=; fh=2etaPNKgvtlvprFT8KGZeN4buwdHPV3Xfo3rqgrANRo=; b=DsZzT0S+tI9xPCndHoQc5E2wziCw9ctPBlI4rzIcBJ98yNM4UwfjiJIIr3HaEehVP+ AGnQS4kqLxJT1AnPdyCYkFV6E9UyVo11+vYAIAJO/UPdQbNIZxCP8J85tcLKz/fV7dqc 6Dg/dY+99oJMWx5iezolhzWX3YO65IulaIXrHdd96pLtAjHgZ4yeRaTiQjw0X8DalOdc FxPOrem+CAxQvvv7Bx3VrD4O4mXu44kM/ZtCY8T/TOdO+cj51FBfTF7Lhc6eaAILOhSd A1fTFNQW031RBPLTDV8EtT2T4X8iVVVmQj5H1xs9yovxliIOcm6PNvQhpr3Tp8WnCfDK N4PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eecH+hYN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id h184-20020a6383c1000000b00584a3d634e9si8436433pge.415.2023.09.28.07.28.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 07:28:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eecH+hYN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id E6B9D807C5C5; Thu, 28 Sep 2023 07:05:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232481AbjI1OFP (ORCPT + 99 others); Thu, 28 Sep 2023 10:05:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231576AbjI1OFO (ORCPT ); Thu, 28 Sep 2023 10:05:14 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76C0E136; Thu, 28 Sep 2023 07:05:13 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AAF12C433C7; Thu, 28 Sep 2023 14:05:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695909913; bh=6Dg6G5NYkGLr0eWe04c4RUxjLhdkFIrJohD7fivs7+I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eecH+hYNl1FzuaL1MIwHBXZB+0Mq+StxV0YlfEPwkHSesdnDkVhUnqueXXgDXND34 Vid4AiYpP2OEH2Kou6VCBofuWqZZVaDzjPayS9ZW+QuznbLqxQmqi9fvkKUW0I2TJu htWysiynk9Al4HngkWulPoPWj1cEBduQ0g8fLoya4veWhesMEbRxFMhXwZMkIjIkBc 3tNy2OkYlBN5o+gSX97eaGkqBmbYMK9iHqum7M2dmni3Crkf68NWEdhJbRbNpMutS7 EVI2GNRrjrFggn2ZxUSpAmaOx2YLoia23tVyjMdH+nZRMM9b7A8zckQ/vpK+9oy4Ny PMPduQjnfhKdA== Date: Thu, 28 Sep 2023 16:05:08 +0200 From: Christian Brauner To: Linus Torvalds , Jann Horn Cc: Mateusz Guzik , viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v2] vfs: shave work on failed file open Message-ID: <20230928-themen-dilettanten-16bf329ab370@brauner> References: <20230926162228.68666-1-mjguzik@gmail.com> <20230927-kosmetik-babypuppen-75bee530b9f0@brauner> <20230928-kulleraugen-restaurant-dd14e2a9c0b0@brauner> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230928-kulleraugen-restaurant-dd14e2a9c0b0@brauner> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 28 Sep 2023 07:05:30 -0700 (PDT) > So I spent a good chunk of time going through this patch. The main thing that makes me go "we shouldn't do this" is that KASAN isn't able to detect UAF issues as Jann pointed out so I'm getting really nervous about this. And Jann also pointed out some potential issues with __fget_files_rcu() as well...