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 C2CCA22D4C8 for ; Tue, 30 Dec 2025 12:11:05 +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=1767096665; cv=none; b=srt1GvUzWdvHaTKDqAG9b7nGLbcG6LEDKybHeDa4VKMeD+qX82qrFAsEKtPueMWxzk6HNisbnLCsefPkckhfy3GEs0wuG3XGmSVVoFxIiFV6qlv1t/RtOOnsaTLKUziKsRadn2fdLCsZD+tEjka1swPRJSfZ7xiSWywelYmdwFc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767096665; c=relaxed/simple; bh=nWED0q/gn1OTxX+JTG1ahRlNo/eFGteB8gj14Ezog14=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=M/Mi0wLHduAkd3b+kmMb+oDgbyv0/NVXd1xdhs8UZoLJrIN72sco5Mpy8L755qVzJmR/MrFoEsel0qIU5hpc8pLs1jBjkhAZ4JsadE/M6/echliAdEVD7JtZr3NB8wl2uMzyJU9q3HuuuWpbIm6SqUf/+AsVdNhkqJCjXvnh1ro= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Ckw6vmIP; 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="Ckw6vmIP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A3F8C4CEFB; Tue, 30 Dec 2025 12:11:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767096665; bh=nWED0q/gn1OTxX+JTG1ahRlNo/eFGteB8gj14Ezog14=; h=From:To:Cc:Subject:Date:Reply-To:From; b=Ckw6vmIPSNCwZrwerGbuzu9Mmy6pbOSVtVXPJ5fKv43Dc6NcLnoSJSNsc+TZqZPjC rdrSCU8C85COJ/RYb+XhnH20ncM3MGoW5OFeoEZ9znquG4GFS8SrkfGJXp/VQawk/c 0j8Lnq/DrCAn3s8hplc9pGsiVKlL3vJg1c6+EIbk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-54185: btrfs: remove BUG_ON()'s in add_new_free_space() Date: Tue, 30 Dec 2025 13:09:53 +0100 Message-ID: <2025123025-CVE-2023-54185-3c5c@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2340; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=0/+rARLYc2t0MoHY8/7pLNKUhQ9ejciucYchTpWy+ho=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnBB75+uaS+pM/3svnFbQfWGUpkFs1RlD5cVlm+i18vT DrUueRMRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzksBPD/Dj9ws5Z8u4R8o+a rqhacMSsunXJmGHBqXKFp8eenDnKfYLn1oazflJ9EaraAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: btrfs: remove BUG_ON()'s in add_new_free_space() At add_new_free_space() we have these BUG_ON()'s that are there to deal with any failure to add free space to the in memory free space cache. Such failures are mostly -ENOMEM that should be very rare. However there's no need to have these BUG_ON()'s, we can just return any error to the caller and all callers and their upper call chain are already dealing with errors. So just make add_new_free_space() return any errors, while removing the BUG_ON()'s, and returning the total amount of added free space to an optional u64 pointer argument. The Linux kernel CVE team has assigned CVE-2023-54185 to this issue. Affected and fixed versions =========================== Fixed in 6.1.45 with commit 23e72231f8281505883514b23709076e234d4f27 Fixed in 6.4.10 with commit f775ceb0cb530e4a469b718fb2a24843071087f5 Fixed in 6.5 with commit d8ccbd21918fd7fa6ce3226cffc22c444228e8ad Please see https://www.kernel.org for 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-54185 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/block-group.c fs/btrfs/block-group.h fs/btrfs/free-space-tree.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/23e72231f8281505883514b23709076e234d4f27 https://git.kernel.org/stable/c/f775ceb0cb530e4a469b718fb2a24843071087f5 https://git.kernel.org/stable/c/d8ccbd21918fd7fa6ce3226cffc22c444228e8ad