Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3ECDE41C66 for ; Sat, 2 Mar 2024 22:00:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709416815; cv=none; b=RPfqUuioWTDFw/xfwDYhwfUb66OKX7ZCGbMaxNrDFq2a0Jkm6k1etlF4xE9PGnjGaMjn/41KsICEZlUsHDMIOo2amld8klYZvWzAXJA3yzqe0jIbbkr0sjUrnKCpwmJNJLyp3lZCGVTchkQHtBDFRmXmEhdIVWJSIKZ1sc0Opl0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709416815; c=relaxed/simple; bh=ZPmw6QyTSI5aEJeTiRDdd8qqmciGNT6t38xVlR95ZKI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=nO9h99XyfrP6PXArWOswE7hX4tzQjLYCd6n6yILUeGgHTOlhpp/rbjeCKs4+5nESkyKZOymWEMAbkWxQ9M9lq6evv3xFk/pQbpd7/grN5yZOVzRh7Tsl+W+Is8Omj/S1Sqi3Luz5NXJGuhsEVlU0C2L4SGOovUchYcWhCuTz6dc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=pDF4GRD5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="pDF4GRD5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3E3DC43394; Sat, 2 Mar 2024 22:00:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709416815; bh=ZPmw6QyTSI5aEJeTiRDdd8qqmciGNT6t38xVlR95ZKI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=pDF4GRD5zX5mEO8pOcxlA7Pzqij7FQFYt/cmBCkHVIZhJjQPZduL6JY2wNAWmonMX IzFZQCTvrXRcq0fmSZFnJtU39JqTy8oG6GChBckEQMH+Xnx0VSZyAuQEBPZpj0KIFD 9VeXwu46fs4RDJNr7SCuZURDuPj/e4U9vtQQPGP8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-52569: btrfs: remove BUG() after failure to insert delayed dir index item Date: Sat, 2 Mar 2024 23:00:03 +0100 Message-ID: <2024030255-CVE-2023-52569-a9c1@gregkh> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2367; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ZPmw6QyTSI5aEJeTiRDdd8qqmciGNT6t38xVlR95ZKI=; b=owGbwMvMwCRo6H6F97bub03G02pJDKmPF0b/auNmcok52adVdfvdg2Nurxac3Mn26+Fyrc6Ed 87BqW3dHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRqWcYFiyZGX+77J2hmaG+ x/wTE6v/WE/+EMgwPyhQ7ZfhqU2azHtrlEMDBZ38eNg4AA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: btrfs: remove BUG() after failure to insert delayed dir index item Instead of calling BUG() when we fail to insert a delayed dir index item into the delayed node's tree, we can just release all the resources we have allocated/acquired before and return the error to the caller. This is fine because all existing call chains undo anything they have done before calling btrfs_insert_delayed_dir_index() or BUG_ON (when creating pending snapshots in the transaction commit path). So remove the BUG() call and do proper error handling. This relates to a syzbot report linked below, but does not fix it because it only prevents hitting a BUG(), it does not fix the issue where somehow we attempt to use twice the same index number for different index items. The Linux kernel CVE team has assigned CVE-2023-52569 to this issue. Affected and fixed versions =========================== Fixed in 6.1.56 with commit 39c4a9522db0 Fixed in 6.5.6 with commit d10fd53393cc Fixed in 6.6 with commit 2c58c3931ede Please see https://www.kernel.org or a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2023-52569 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: fs/btrfs/delayed-inode.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/39c4a9522db0072570d602e9b365119e17fb9f4f https://git.kernel.org/stable/c/d10fd53393cc5de4b9cf1a4b8f9984f0a037aa51 https://git.kernel.org/stable/c/2c58c3931ede7cd08cbecf1f1a4acaf0a04a41a9