Message ID | 20240426215512.2673806-18-leah.rumancik@gmail.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show
Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6337639FF2 for <linux-xfs@vger.kernel.org>; Fri, 26 Apr 2024 21:56:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714168568; cv=none; b=eILDfMPOQdXir/nGCnWzq9+c0yEyeldpFCXBOKYG+xrZY1oCCSfZdF+GY8vJTTpKd++hh0VnngMZ33OX9oO+wJLVBq+2fKZEOXGwp8JJe5qmicuRCXZ0523JmcIPrURp6Jliihz3d/GwV10jZFbCyxJlbL7nwcIinBR8+JXE76o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714168568; c=relaxed/simple; bh=K0CYLz+X0WaXFgwOIZ9fp3/KM0f7gN+QqCDJ8lRzRwI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NUR/grq24w3t9zG0GeVWIjprYCLMB8uT1ES7w0HYDzMZ8Z8nUFigQ74nnnKX+jScCTxW6gFA53AmPO7Nz/MZ8oOQaxyzxXsaPQwsVSiBsTKbjlO22LIVCGTEClV//XlqKqyckUyK6hjCtLSSY2g9nJyiVMyNQIPRlDp4TGg8r7E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=An0n5bdu; arc=none smtp.client-ip=209.85.214.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="An0n5bdu" Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1e3ff14f249so20158225ad.1 for <linux-xfs@vger.kernel.org>; Fri, 26 Apr 2024 14:56:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714168566; x=1714773366; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Y6LUDHkv9eYKxn5TY/+wGN2T9MmB63zoVimXrOLrpvw=; b=An0n5bduarcPDMux+Wp/2rsStbGTEsnRp1ZJlN6MJpsjz4AbXPTBwP5Bud1LISfgLD QmMwNZxDpMb7H6vU5asRh30zUq4PKystBsIpu3YFZIV1czzl4eknxo2uWdqTVXGaY9wQ X0GMbQ7njhhZuY1dS8kJY0Jr4DHD9AEYBv4OV5CGtUTHL44l/gIq1tMpXeK1J6g3CaZc M2/EEZ88kr7xIxYumsM3izVDCp18czwrEsovYeES/XiEseEpNc+iiRcr+k6AMKMziZyF Vxd1BfFKxmBnK/jz8kdW5rzBv5DFvRJHsR/+qvhmkzIuBGeN353LIIbh7H81o+FraJZj cMLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714168566; x=1714773366; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y6LUDHkv9eYKxn5TY/+wGN2T9MmB63zoVimXrOLrpvw=; b=ER5J7wzKxlRG02aXKSY2Xbgm9X7XAKK4dbfEHTymdIwa0K026Hzjs2Rw/tvLtNAEwP 0tKgmXVtR4Q4i8mKFY3JeZDeHH3vPm0FXfJAHN+8jSYtXwNfbem5u8WdYzqtuiFDMYNQ 9o0CF2zvqcBI3KOflpGcuXsiV0EKjJi8Flg/kBR5SE3nwS4yk72xAPo2K8d1ANNEyHMK LxkC4NCxA+SdiMvIzoeikWozk5nhMfWoWzlLqS71oiCYf4dw3n1zZaS9J5TxsV+QxpK8 amC5z5PcAy5PbKTQKuApudtagbTxyYysQWUoLzjqoD2LS77btFxrg0Dsj2U0qlk7u9mm qZUA== X-Gm-Message-State: AOJu0YyqPlWkZekDBTL/vBhazChjkmRrcasVJk9poVSf4KVLOuGUMjd+ ccFPfLe9WaypiYmvVTKIgO81wixHu+/HeayobW0YYCBiGSL1fyoG/ISh2Fa4 X-Google-Smtp-Source: AGHT+IF3mGN2BhcM7Mjv6dRXH7lrvSPsEGHlDzmfceQmklC2DrY+PM91hyiviN3/NqGgCxYUGaAG0w== X-Received: by 2002:a17:902:d50a:b0:1eb:4930:58d3 with SMTP id b10-20020a170902d50a00b001eb493058d3mr814463plg.4.1714168566572; Fri, 26 Apr 2024 14:56:06 -0700 (PDT) Received: from lrumancik.svl.corp.google.com ([2620:15c:2a3:200:2b3a:c37d:d273:a588]) by smtp.gmail.com with ESMTPSA id b18-20020a170903229200b001eb2e6b14e0sm855772plh.126.2024.04.26.14.56.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 14:56:06 -0700 (PDT) From: Leah Rumancik <leah.rumancik@gmail.com> To: linux-xfs@vger.kernel.org Cc: amir73il@gmail.com, chandan.babu@oracle.com, fred@cloudflare.com, mngyadam@amazon.com, Guo Xuenan <guoxuenan@huawei.com>, "Darrick J . Wong" <djwong@kernel.org>, Leah Rumancik <leah.rumancik@gmail.com> Subject: [PATCH 6.1 CANDIDATE 17/24] xfs: fix super block buf log item UAF during force shutdown Date: Fri, 26 Apr 2024 14:55:04 -0700 Message-ID: <20240426215512.2673806-18-leah.rumancik@gmail.com> X-Mailer: git-send-email 2.44.0.769.g3c40516874-goog In-Reply-To: <20240426215512.2673806-1-leah.rumancik@gmail.com> References: <20240426215512.2673806-1-leah.rumancik@gmail.com> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: <linux-xfs.vger.kernel.org> List-Subscribe: <mailto:linux-xfs+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-xfs+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit |
Series |
more backport proposals for linux-6.1.y
|
expand
|
diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c index 522d450a94b1..df7322ed73fa 100644 --- a/fs/xfs/xfs_buf_item.c +++ b/fs/xfs/xfs_buf_item.c @@ -1018,6 +1018,8 @@ xfs_buf_item_relse( trace_xfs_buf_item_relse(bp, _RET_IP_); ASSERT(!test_bit(XFS_LI_IN_AIL, &bip->bli_item.li_flags)); + if (atomic_read(&bip->bli_refcount)) + return; bp->b_log_item = NULL; xfs_buf_rele(bp); xfs_buf_item_free(bip);