Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7813918imu; Mon, 3 Dec 2018 20:34:51 -0800 (PST) X-Google-Smtp-Source: AFSGD/U+icELe8Qn15sJJ8uCgfWPlu93ywHbVxuFURfrOWeccDpLgZj8klpRNIMuKijVZHi+Bn7o X-Received: by 2002:a62:3603:: with SMTP id d3mr19388947pfa.146.1543898091518; Mon, 03 Dec 2018 20:34:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543898091; cv=none; d=google.com; s=arc-20160816; b=Raba5vTQ3QdYwZsR5oYaZJiobjgsKAdT37HpuoI4DzSBFyx+XThZAT8VFeJ79Mw8/Z cggJuDguIlRPSt4CLQOlC2L0H3kkUn5aneVpGv4hTIHUrtLGodtqxYTyPOJU7XDtZAl5 0wBgHGh/DEluz/IgwjLGU/PJJxL1rDBben3SHUgHpuG7HhBap7FkWP9Wu8kxdmI6WxO9 MVem5h/ebzmjz307HqykSt5iags0rox4rmQsh+kKdSjTkfzwTKg99LwPLjU8LOvIwJ/H jm9VK8owQdCK0rptOiHxuwNou8Lk7/x4eXQfQOoZLeIHw0DU94prAq8QWLspRSTEd4qh a2Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=U0hf+QFwQWhecs7cFf6uPgdOiQD/L6O4HpP1VpkadQA=; b=P144BTejIi1Z3SYKdFBaSDOzWyWcVgVp5sa51YcaEDvgGRV3wud8daIc31qBjVX6By mGiam3qx22MX7KCttKW3mS1QjA7Vp5BR+Gh7Bao8Jds8skK6UtyoZ7wPodJviP5/bgp7 VdlupMS/KUoTduNx39xAODdNMt22jhbvSKqNv1dxO8c5zo3hcpjewS1Ng+5ifCIm3F0l wrJligDA+Wr9F8jEX4MScYtJC0tr4+sR/iQOIfHJ1wRA+Aryg1KxJ7LW4SoUBXBfRmaj e5CN0ocj2d30VmOTXKuHepwIZTiZYvvFT2ehDlSc/FMoJ9jhQT6+h1sHZ4q8mGka2dwN W5aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@thunk.org header.s=ef5046eb header.b=eZeEYYwC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 a28si15115156pgl.530.2018.12.03.20.34.23; Mon, 03 Dec 2018 20:34:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@thunk.org header.s=ef5046eb header.b=eZeEYYwC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726017AbeLDEdY (ORCPT + 99 others); Mon, 3 Dec 2018 23:33:24 -0500 Received: from imap.thunk.org ([74.207.234.97]:38872 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725977AbeLDEdY (ORCPT ); Mon, 3 Dec 2018 23:33:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=thunk.org; s=ef5046eb; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=U0hf+QFwQWhecs7cFf6uPgdOiQD/L6O4HpP1VpkadQA=; b=eZeEYYwCTOD1j6Z/V9mbwQne+c wFkhAvSaBwTRumURj7KvlNMfCdr22W7eh9ez7+Tja1PD4+ONRxOlj1e6geZe96vwDssb2ro7l0SRp Bjk39zr7akb8/Is4j0wsxRifaZ4A085tOSk/OyIjVPhp/tTNHXd1zKlRk9xwWKQSo20A=; Received: from root (helo=callcc.thunk.org) by imap.thunk.org with local-esmtp (Exim 4.89) (envelope-from ) id 1gU2Oc-0007tq-91; Tue, 04 Dec 2018 04:33:18 +0000 Received: by callcc.thunk.org (Postfix, from userid 15806) id A009C7A47B7; Mon, 3 Dec 2018 23:33:16 -0500 (EST) Date: Mon, 3 Dec 2018 23:33:16 -0500 From: "Theodore Y. Ts'o" To: Jan Kara Cc: Pan Bian , Andreas Dilger , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ext4: fix possible use after free in ext4_quota_enable Message-ID: <20181204043316.GC4981@thunk.org> Mail-Followup-To: "Theodore Y. Ts'o" , Jan Kara , Pan Bian , Andreas Dilger , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org References: <1543202466-68277-1-git-send-email-bianpan2016@163.com> <20181127091453.GA16301@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181127091453.GA16301@quack2.suse.cz> User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 27, 2018 at 10:14:53AM +0100, Jan Kara wrote: > On Mon 26-11-18 11:21:06, Pan Bian wrote: > > The function frees qf_inode via iput but then pass qf_inode to > > lockdep_set_quota_inode on the failure path. This may result in a > > use-after-free bug. The patch frees df_inode only when it is never used. > > > > Signed-off-by: Pan Bian > > Fixes: daf647d2dd5("ext4: add lockdep annotations for i_data_sem") > > Thanks for the fix! The patch looks good. You can add: > > Reviewed-by: Jan Kara Thanks, applied. - Ted