Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp333152pxk; Thu, 3 Sep 2020 00:25:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQwk8UDNaaosDDjJ4nMI5SaNuQPtxGT1+v89UscrsI3QSQA4qA9FGHfOlPvs0XB7FvXKuA X-Received: by 2002:a50:ef09:: with SMTP id m9mr1684893eds.230.1599117921700; Thu, 03 Sep 2020 00:25:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599117921; cv=none; d=google.com; s=arc-20160816; b=DhkGJtDOSgao8WYqt9yV7kjaL8JL/grhhA+n1jmYbrq2piBRbav7zbYNluN4ItTtPb SHtcnaInMuVk/oWkedFPRruMgJdxAaEt7gLaB9l1GxDglOghLG6f34XJ7IGdjQVMciBc KUz7wIf8gZhiOe2c5p2PABAcb29MxwmEwI7L6m0EDn+sHWJRw7RnMmPum0XtZYx/Rufo 6dom3AOJfRjRwVBsfWw+irbOkivKAKionIznTAYxlgRvf5p27mdJ+vMB+6Vl+8uSVaA3 A+UA7zukeqXXUpAJOB90kLcYigEdrZhvOAMf8Sjb2VEK1qS+Te9wQQheAg/rVEPTzwMn Ctpw== 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 :dkim-signature; bh=xtCcxTYMpjBSX+MDnv73jbCTU3aLiCTczQOMAgWGsmE=; b=qORSj+W1N+7SaCwfY77bcK/Z3H+a5IdGASUabSMN/mr7QtAWnsYcHFTZ9lTNvdMXIe sJ3DpTLl4LSaocxGa1k+1B0l50MBcgeI5hpzjRNXCyyyvmCCA5wE8CjmQtodgAE554P2 BmeSWO19Z7NsWNwfoyvAhs9uggywnHoNMGvdaRGRaOJRYkgUlQvQsxitsNQ8b+CqkmFf kfAwa7tHQWMos3hgrhITz+I9gHTtdsPWXAl3BunINnFjBIW2ZZk5YaXWsBm89ANRuJ8Y T60SBvc7Mt6DhiDqx2VEYEMG3S9CCEa2TF6C+SxLcyp0x52eh/kUfIjdN3raG06rES9M bjQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iTf3qyc4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mb25si1505710ejb.279.2020.09.03.00.24.59; Thu, 03 Sep 2020 00:25:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iTf3qyc4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728115AbgICHYL (ORCPT + 99 others); Thu, 3 Sep 2020 03:24:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725943AbgICHYH (ORCPT ); Thu, 3 Sep 2020 03:24:07 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67745C061244; Thu, 3 Sep 2020 00:24:06 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id o20so1556383pfp.11; Thu, 03 Sep 2020 00:24:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=xtCcxTYMpjBSX+MDnv73jbCTU3aLiCTczQOMAgWGsmE=; b=iTf3qyc48zHHpG2gTxA5HZEc9keVFMo5eH2gF9icUZl1zSpN2ZTRZV7PdUEezjnT+z vgTRUTJMcL+QztuWJ60M2bIKT0GQck0D80pD55uvOdS8CC1BzIT5aP8yV1P8WLGq4dDZ wkROWgJorCnGpD2Y42FVo58Ps1IRNoYoJZLamkFOIjEcnNbS8FnTgPGupe8whjX4a2Ba cii6fWuw5dwmJaRww2XPTT/dCca6jlzVY5Jy3bnizPr9oLXMO2TUTpK8Wcud/0RL4xg9 5TVVL70AU0WIF9/HGAF6rADMUjm0lCQSRUvw6gUjAMgDPzzKS11/ot+klu9fnxBBaaap UA1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=xtCcxTYMpjBSX+MDnv73jbCTU3aLiCTczQOMAgWGsmE=; b=a2Y9l5QS88dQgJ33+ETEi2V/Bg7uknUHoHjBcncyEx6+H6iAq+ysSzBOjCjzDRmzR9 OoLeWKE9zka7LtYpWmEPVF89mVtxoEuAjPSh8xg9mmWhV8qCuQdLHcuB+5H5zhnPomAW cIVqIhWfQBzpvskP4teJ5BuusfhIF2qOGDTG5TZkjptcuBkfdqvl8N5ID5FoGLaYwaj3 41unv63cwS6thNlr6U8+1Y50WBpL+yVn80QLZKJ6IVxo+z9PPof8W52qfqbkeQkYmOyH DlLJCAcGRoLMPuXxWjcH5oUh9LAsNwpMcdO8K/ixaJVM7L7RReh5QU4VcI/06xfvOI0t 2nrQ== X-Gm-Message-State: AOAM532BXiXZEvK+WwOWV5qkmVU2Q9xEStnB2/J5U/nI/H25zjSnH9e1 eC8MAnC/75Jmizkgsc2KCQ== X-Received: by 2002:a05:6a00:23c5:: with SMTP id g5mr2554151pfc.160.1599117845943; Thu, 03 Sep 2020 00:24:05 -0700 (PDT) Received: from PWN ([161.117.80.159]) by smtp.gmail.com with ESMTPSA id 1sm1841092pfe.70.2020.09.03.00.24.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 00:24:05 -0700 (PDT) Date: Thu, 3 Sep 2020 03:23:57 -0400 From: Peilin Ye To: Christoph Hellwig Cc: Jens Axboe , Hillf Danton , Christoph Hellwig , Johannes Thumshirn , Jan Kara , Ming Lei , Konstantin Khlebnikov , Greg Kroah-Hartman , linux-block@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, syzkaller-bugs@googlegroups.com, linux-kernel@vger.kernel.org Subject: Re: [Linux-kernel-mentees] [PATCH] block: Fix use-after-free in bdev_del_partition() Message-ID: <20200903072357.GA623968@PWN> References: <000000000000520ffc05ae2f4fee@google.com> <20200903065534.623691-1-yepeilin.cs@gmail.com> <20200903065950.GA19012@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200903065950.GA19012@lst.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 03, 2020 at 08:59:50AM +0200, Christoph Hellwig wrote: > On Thu, Sep 03, 2020 at 02:55:34AM -0400, Peilin Ye wrote: > > In bdev_del_partition(), `part` is being looked up outside the critical > > section. This is causing bdev_del_partition() to delete the same partition > > more than once. Fix it by reverting commit cddae808aeb7. > > We've already fix the problem properly: > > https://git.kernel.dk/cgit/linux-block/commit/?h=block-5.9&id=08fc1ab6d748ab1a690fd483f41e2938984ce353 Ah, I searched linux-kernel but didn't see your patch, sorry about that. I should have searched linux-block too. Thank you, Peilin