Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2471290ybv; Fri, 21 Feb 2020 16:34:23 -0800 (PST) X-Google-Smtp-Source: APXvYqywUoe552BekxVpV5D6Gi8XHBWzp7wIJsnOuIzxx3PqOZshK5FaqRrEb5wL8b7lW+kSta+E X-Received: by 2002:a9d:730e:: with SMTP id e14mr29222222otk.62.1582331663264; Fri, 21 Feb 2020 16:34:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582331663; cv=none; d=google.com; s=arc-20160816; b=M8Dxr0Uj1nAHWEB0KMfwVMW1Y50FCVud+dw16vdl4db0vFCGrledbWS9M6voZ09GqP y1weCsAHgKrEVIzgdSVA/MGs7z5I1DSy/6nNW9NLfJVyJrNYPQAcfj2uhOl2tHcA1pWA 91fuQsJ7wOXSJlsEsjBqKNhBPlKcBidtbT8gbm0S9yCbX0zZGXA1pY44NhWq7LNeGyIG qzvkZU81LpwgYHloOnqzjbcdttCYVGghc2/Wc8Sn1qIfCsOhEXImCH3oz3YtWVKnxPP7 GciT9/Grm17dreCJNCe671Tnh1uCyZgqbMPkJelhBUDskYN3o1MAoRV4q2ZayeWlwNoA bmbg== 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; bh=OT5i5Yhcbhfz8EGL3Q+kqJzetxvxqnhmmbehysR7gdc=; b=zoFsAQEZSsT1fQL3tXd7d93q7b8HtDKIY4WoqJi9P/MEapHjPNrfS40klYrHbsmRaB KnLRmJU5Z31UeOAPqP4ogNFuJjzDWMQXxE6AedoJi7s0vV+p/yvCle5bx9czifzjkjDh Se/e+BbIJ52bLyhVw5NBES1KCHRb/ARZh/a/r8hAZHezbz0WdudvwASYJCePMCf5QEIq Tdc7G3JZdXegA5G3YHCobijuRH8cbyLfcd+ZwxPF3/RZzlwUostrX93vKXttyuDsz62l efBbQ3yTWHR3Hnp3C9C9YKDZxvbXWZMGEtKgl4NU15AG41GhmMW/3ArxWbbYEN1PLwpi WM+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u21si2266818otq.137.2020.02.21.16.34.12; Fri, 21 Feb 2020 16:34:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726851AbgBVAeF (ORCPT + 99 others); Fri, 21 Feb 2020 19:34:05 -0500 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:57123 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726735AbgBVAeF (ORCPT ); Fri, 21 Feb 2020 19:34:05 -0500 Received: from callcc.thunk.org (guestnat-104-133-8-109.corp.google.com [104.133.8.109] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 01M0XsLL016203 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Feb 2020 19:33:56 -0500 Received: by callcc.thunk.org (Postfix, from userid 15806) id 4BDFA4211EF; Fri, 21 Feb 2020 19:33:54 -0500 (EST) Date: Fri, 21 Feb 2020 19:33:54 -0500 From: "Theodore Y. Ts'o" To: "Jitindar SIngh, Suraj" Cc: "cai@lca.pw" , "adilger.kernel@dilger.ca" , "linux-ext4@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "paulmck@kernel.org" Subject: Re: null-ptr-deref due to "ext4: fix potential race between online resizing and write operations" Message-ID: <20200222003354.GB873427@mit.edu> References: <1582293736.7365.109.camel@lca.pw> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Fri, Feb 21, 2020 at 07:58:01PM +0000, Jitindar SIngh, Suraj wrote: > On Fri, 2020-02-21 at 09:02 -0500, Qian Cai wrote: > > Reverted the linux-next commit c20bac9bf82c ("ext4: fix potential > > race between > > s_flex_groups online resizing and access") fixed the crash below > > (with line > > numbers), > > Good catch, this is a bug where the dereference of the array > s_flex_groups needs to happen after the "if (flex_size > 1)" if > statement in fs/ext4/ialloc.c:373 Cai, thanks for noting the problem! Suraj, I've fixed up the patch on the ext4.git tree. - Ted