Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp354235pxm; Wed, 2 Mar 2022 17:09:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJwayLbifUjHPJLzUsxylNfFDka/wvouFb69zhZvKZ9ZDkqiXstRoBCKveb9xy9n09COwH0z X-Received: by 2002:a65:4143:0:b0:375:89f4:b46a with SMTP id x3-20020a654143000000b0037589f4b46amr27897352pgp.335.1646269783993; Wed, 02 Mar 2022 17:09:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646269783; cv=none; d=google.com; s=arc-20160816; b=bKP07jzdnjJoQVinQlNfaKfBmtnU5czUK+txoGKTBvs2+iAwdYPbGtIPK7ximun1vs y1Odbrmt+JtykPVPutIMfOScdJRT4Wql5TU9ns1j6mXrxOeuO963GqeQ+O/VqaMIPjBc 9NUwQiek7HwDqlfluMjjdDYca4iKboSWzuDsTd6nkNOoS1EJy8Jsw70g5nSsMuimODt3 ISROBtD6HBTz1k5rhxgKzByFq37g7G9GW2RC2xlFPb3tuNBTjUGKMs0RJTHw0ceKX3gU g+/n7d8lqgBQ5uXm5JD3TNQELYF80DtdBAFdkTYjeI47YF7qK5NnTvlBCPgh3Zkxob6n 0QOw== 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=yy7ARXhOF/2Tc1NTdVJ8BkqhgMy00m0y4SnkrZ2G6po=; b=LMhC71jQ3p3QssNKJ0TJtpMZOKr0G/lnSZTupWHGKcF5viXh99YwkoskCx07MQX2bF HGLUaqYdAZXUXwNm3hxeJ5rnrDd1e3+BGNcRvEaIO9fRP+gm96yh5u+ixrlmZ605Sskd aDBCwfl4280TPgIAHlKRqx/wf2ktdtQAFevbdzCSEUaPRJmsoY0z7m2HufU4+RFuiTYc 56iye9OhN8JxVHrFvm5rO33Mu9nOSf5CGJK1PJkGHzbc/ogGdgnDRoWBJl0iGVzt9bcp U4Nckw8bTJQPqcljl+yd7giEmv/FWjvIsLB+oEtQQnTVA4YrOknih2ToZHwNZljy9m1K VKww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t62-20020a638141000000b003739ad0ca07si561476pgd.833.2022.03.02.17.09.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 17:09:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 679824504D; Wed, 2 Mar 2022 16:41:45 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230456AbiCCAm0 (ORCPT + 99 others); Wed, 2 Mar 2022 19:42:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230452AbiCCAmX (ORCPT ); Wed, 2 Mar 2022 19:42:23 -0500 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F822443D0 for ; Wed, 2 Mar 2022 16:41:38 -0800 (PST) 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 2230fTWx019236 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 2 Mar 2022 19:41:30 -0500 Received: by cwcc.thunk.org (Postfix, from userid 15806) id 9F87315C33A4; Wed, 2 Mar 2022 19:41:29 -0500 (EST) From: "Theodore Ts'o" To: Ritesh Harjani , linux-ext4@vger.kernel.org Cc: "Theodore Ts'o" , syzbot+afa2ca5171d93e44b348@syzkaller.appspotmail.com, Jan Kara Subject: Re: [PATCH] jbd2: Fix use-after-free of transaction_t race Date: Wed, 2 Mar 2022 19:41:24 -0500 Message-Id: <164626805478.621144.10561349500023646398.b4-ty@mit.edu> X-Mailer: git-send-email 2.31.0 In-Reply-To: <948c2fed518ae739db6a8f7f83f1d58b504f87d0.1644497105.git.ritesh.list@gmail.com> References: <948c2fed518ae739db6a8f7f83f1d58b504f87d0.1644497105.git.ritesh.list@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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-ext4@vger.kernel.org On Thu, 10 Feb 2022 21:07:11 +0530, Ritesh Harjani wrote: > jbd2_journal_wait_updates() is called with j_state_lock held. But if > there is a commit in progress, then this transaction might get committed > and freed via jbd2_journal_commit_transaction() -> > jbd2_journal_free_transaction(), when we release j_state_lock. > So check for journal->j_running_transaction everytime we release and > acquire j_state_lock to avoid use-after-free issue. > > [...] Applied, thanks! [1/1] jbd2: Fix use-after-free of transaction_t race commit: cc16eecae687912238ee6efbff71ad31e2bc414e Best regards, -- Theodore Ts'o