Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp576978rwb; Tue, 13 Dec 2022 23:16:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf6mpk7QgoOOMl1W6H9XOyd7OTuZRn7fYCb/3RRsOOrxx3vNNKg7cVs3WxITWQQAV31SKwv0 X-Received: by 2002:a17:906:7116:b0:7c1:8450:f963 with SMTP id x22-20020a170906711600b007c18450f963mr8906362ejj.34.1671002205201; Tue, 13 Dec 2022 23:16:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671002205; cv=none; d=google.com; s=arc-20160816; b=SchXe4oZhhA+3axCNRcxwa/wi9v7Vp9lKf68uNdcbx0HTp2h9QJTRT2UzSCACnNbJm MlrI78uOC8/6NLDlc1OYOeK3Dv+1ZYJYlTqSLKj9Yi4rLmNhZo6uBvBtS7BA4y1lJGN8 iXhaz1lezSvu0PIMFUZ/ekdi/66BlXnrHDN/DpvUsVWfYLhsA1nVbQI7rIbiWdrdCT9B iPhxlcO0B3WCo35mRrK+w8E56W+LpvWHmMtwFaRwqbIM1P0l8X7j0nTuxYI1l99oEWSn tpnCBfPBIoziQbclTHiy+1V3sWivZ7A0GRa/AWkW+pW8FVfuTne6cQp2X4bulb77K2qW i0nQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=toW2WjoNHRK4IODIsEpA1iasqtKP7Fs7/KgwXINckRg=; b=QBn0EM9cklMRD1Gdvpe6c0EolHbDs2Hk4OPfxB/rs+I7XtneRqFORwPFnu846zYRqH ZZBofKqZM1Al1d5FsG6ROcYIxrdhu0EEwqFKV8Zqe9+ibVNMHYVutcEJpdKzYsjJcZl0 MaROuRooYs1DhZA7WwWhtSiTt18FOXd6LC3fbe9SBukFAzzHFQpho2bx+9eIgTyNEuSQ N+q2KCo9308F44XkglU02IJRtVg1j8ZA5iBLQIKAW87xqrZdS8S2T77X+4Orjz02DDp5 Y6R0xzeyNdkMczMKF5LmBE+IwxS6GGYeOvtzGsYILehopb/0Og/uIkZdc2IamP1zQg/9 y7Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uBKr7RHg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hr24-20020a1709073f9800b007c173f77500si6288175ejc.427.2022.12.13.23.16.28; Tue, 13 Dec 2022 23:16:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uBKr7RHg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237463AbiLNGyq (ORCPT + 72 others); Wed, 14 Dec 2022 01:54:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229615AbiLNGyn (ORCPT ); Wed, 14 Dec 2022 01:54:43 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD6153897; Tue, 13 Dec 2022 22:54:42 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C49806181B; Wed, 14 Dec 2022 06:54:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0B54C433EF; Wed, 14 Dec 2022 06:54:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671000881; bh=/xvZZEVHwXif/yR6pv6H07haNPLvpHZxBhqpI8uxEYA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uBKr7RHgMmSW9bkc5ih/wW+Zyj1RpfL4wcWu1hzn1BctG6/k0ci7A6SPUquKdmJCm yAmzmpTm2rqmSikMIRZLP5aimWTBMzFn9rOJYDKQzzFrukmA0EioNL5Nkpwo+RNy1S JaCvrfPwLNmcKvRV8faV8jZ/6rI9VCTuDLNwgBEDioVjglVdMs0CcEh6Iw/Y3X+P0s z1Lvl6KZGC8lMqHvFx24QDpvN3pFpSg2kvnJ3/q1qE4OLbUJOd2w2DfA3dE6C35yuF OMSldDlQAbmTmZeCOAs/Gf+9We2ROWyKlvOC9xjZle50SqL2b8WhUL6YM6z14F8Hjh kn5SFCAqrocfQ== Date: Tue, 13 Dec 2022 22:54:39 -0800 From: Eric Biggers To: Jun Nie Cc: tytso@mit.edu, jaegeuk@kernel.org, linux-fscrypt@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] fscrypt: Fix null pointer when defer i_crypt_info Message-ID: References: <20221213081103.2182231-1-jun.nie@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 14, 2022 at 09:33:41AM +0800, Jun Nie wrote: > Eric Biggers 于2022年12月14日周三 02:54写道: > > > > On Tue, Dec 13, 2022 at 04:11:03PM +0800, Jun Nie wrote: > > > syzbot report below bug[1]. Fix it with checking null pointer before > > > deferring i_crypt_info. > > > > > > > Thanks, but this has already been fixed upstream by commit 105c78e12468 > > ("ext4: don't allow journal inode to have encrypt flag"). > > > > Also, I don't think adding a NULL check to __fscrypt_inode_uses_inline_crypto() > > is a good idea because it is only meant to be called when the inode's encryption > > key has already been set up. Instead of making the function return a > > potentially-incorrect result, it was better to address the root cause of why it > > was being called at an inappropriate time in the first place. > > > > - Eric > > Thanks for the information! Do you know what's the plan/schedule of > back porting, > such as linux-5.15.y branch? > > - Jun The commit has 'Cc: stable@vger.kernel.org', and it is marked as fixing a commit in 5.9. So it will be backported to 5.10 LTS and later. It will take a little while for the stable maintainers to pick it up, though, since it just made it upstream yesterday. - Eric