Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp51798pxb; Mon, 31 Jan 2022 15:01:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJyiKni7n8xOHXYNeEMzPot30mkmJur/NrmBAzi5vcDw32AydoghyAnWZc1ULeBrz54QKZqW X-Received: by 2002:a63:8341:: with SMTP id h62mr9327564pge.343.1643670060488; Mon, 31 Jan 2022 15:01:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643670060; cv=none; d=google.com; s=arc-20160816; b=rMnKyTh/e8k7sfw5bjsyb4XL0eznHB15LT7dkRVwGebgkwcnLRkIj6H6++uctqD7CB f/rhU/qJIroPOvd2d5/skgTIYDpVg4tDBJ8A7IKHx8aYx4/HJ/DjaSqe2UPTnm/+lZLn lZdT5ZgQSZ07Iau/RskZPOzqQL9yqcrxsJEBr29TWghwAggFUcq6baSoDRR+o+oUOAM/ o90BSZDfoTJCcOs0n2OvVYgg0pfRJhfhoJGjfUgIlF9B8VRM1dgIzq4z86VwDn2fTTN3 qOGJPEDqYmqM14+MrqUrgIPt1t19+aoNjUVP5PVflI9owseqhLR8WVdY2IXEfNyR27L2 q/kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=578TITc4jAshN98KPW1mACvwvZQvutE7IYZHxyL+DHg=; b=IoXRZ0Uro+LyoZ94ntXwpi+BciIEvEe4eH4/e7OfI8Z+uNb4hJUoJkmyh4nwaLof8O CJcnwwS3s1dkn93jrPCEq4mxg/anvqCwOmioLOBv67RYag2+Oen8c0a8UZza3neCukZa /BQR8LfS77sPbWXvQ1WXid4GyihrBodLHvGlAPZZzNZudFdoLOsPowG0Wbt6NSKDV97R H1eJ9x/Qa9krVrCJF/YYSFwNiSUEaPxRLT8hFYfHBkfzEh1Jtv+PZuS1LdyifM2O9p35 cAadSc94nKn4S3urR7HEWimcleN1xR0sz8IO35rwQLMJTUNLmfKsPyJVz6Jqgux5ylCz PszQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mit.edu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y22si15548368pge.642.2022.01.31.15.00.35; Mon, 31 Jan 2022 15:01:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mit.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352207AbiA2Dz3 (ORCPT + 99 others); Fri, 28 Jan 2022 22:55:29 -0500 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:58964 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238931AbiA2Dz2 (ORCPT ); Fri, 28 Jan 2022 22:55:28 -0500 Received: from cwcc.thunk.org (pool-108-7-220-252.bstnma.fios.verizon.net [108.7.220.252]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 20T3tEUC022904 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 28 Jan 2022 22:55:15 -0500 Received: by cwcc.thunk.org (Postfix, from userid 15806) id BE7DC15C0040; Fri, 28 Jan 2022 22:55:14 -0500 (EST) From: "Theodore Ts'o" To: linux-ext4@vger.kernel.org, Lukas Czerner Cc: "Theodore Ts'o" , Dan Carpenter , kernel test robot Subject: Re: [PATCH] ext4: fix potential NULL pointer dereference in ext4_fill_super() Date: Fri, 28 Jan 2022 22:55:13 -0500 Message-Id: <164342850388.815473.363466652526479494.b4-ty@mit.edu> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20220119130209.40112-1-lczerner@redhat.com> References: <20220119130209.40112-1-lczerner@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, 19 Jan 2022 14:02:09 +0100, Lukas Czerner wrote: > By mistake we fail to return an error from ext4_fill_super() in case > that ext4_alloc_sbi() fails to allocate a new sbi. Instead we just set > the ret variable and allow the function to continue which will later > lead to a NULL pointer dereference. Fix it by returning -ENOMEM in the > case ext4_alloc_sbi() fails. > > > [...] Applied, thanks! [1/1] ext4: fix potential NULL pointer dereference in ext4_fill_super() commit: 7c6bb3d664aa05bf4366fd79a13921acfca28a6d Best regards, -- Theodore Ts'o