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 1F04F3093C4 for ; Mon, 15 Sep 2025 14:11:59 +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=1757945520; cv=none; b=jhmXtMZgXfY2tO07vfEHKio4t5P1vBfyDTtxxRIG2+SgfqUuGKHtkak2xYJRWxN7ujEDtpS891jozj9hDTGNj2Z/myBhstOZGvHXr/WEnR07HHeKlwlwzXaGPZr97f2ybYoN0yi3yn81aQbdqge8F5qrHGQ/ET2iJAHosRi2fPQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757945520; c=relaxed/simple; bh=F5v7q9t0h9lmtL4Cj1/6mRfEGFkaMQ/Y1lCPW8I+PEQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=FdVN+e45OXOrfLApyZuWhAlumwB/j2RdPtYoATRQ40tqohrOa0y2x8sLN/k+aetl0ewQBuLYtYd9SCt4W8gdvlKy5syKjNUHJwp4TPfTFCJJbf5G9/fwwIhLmJKdwW874qgRMDXMZBPzBwhx1CZE8H3Ae9fe7fjVcrtgNAzlXp0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=1P+ySIyP; 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="1P+ySIyP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B19CBC4CEF1; Mon, 15 Sep 2025 14:11:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757945519; bh=F5v7q9t0h9lmtL4Cj1/6mRfEGFkaMQ/Y1lCPW8I+PEQ=; h=From:To:Cc:Subject:Date:Reply-to:From; b=1P+ySIyPJ5Mtqs6CEe5QZOwhsddkUopkeN/B/0+hFDSflVcQiK9Qt0aB6jDhnTUM8 l5OWC28FkO+EChXCj79wOslNVnM2HlUn0YKV8VqD1UsKycR9LfQA7ggK3dmFWP+9zf 1sNamrBLKu3zw3TNda8puXh91Ykl2zxhnj7lK7Mo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53183: btrfs: exit gracefully if reloc roots don't match Date: Mon, 15 Sep 2025 16:02:37 +0200 Message-ID: <2025091556-CVE-2023-53183-b15d@gregkh> X-Mailer: git-send-email 2.51.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=2732; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=wqvJnQ0Sz+TgUmlsLg/lA/IiwdZ24aEZ+5wtoFI0+CA=; b=owGbwMvMwCRo6H6F97bub03G02pJDBknZEImXgvZ9nWHv1gYk+XH14FrjTzVjmffO3VD24JT9 nY8X5lTRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEyEYQnDgh2qZp+C1umpiFeZ nz/GdvuptL6BF8M8K7PPd81+5fjffdOX3irfe0ouP2AaAA== 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: exit gracefully if reloc roots don't match [BUG] Syzbot reported a crash that an ASSERT() got triggered inside prepare_to_merge(). [CAUSE] The root cause of the triggered ASSERT() is we can have a race between quota tree creation and relocation. This leads us to create a duplicated quota tree in the btrfs_read_fs_root() path, and since it's treated as fs tree, it would have ROOT_SHAREABLE flag, causing us to create a reloc tree for it. The bug itself is fixed by a dedicated patch for it, but this already taught us the ASSERT() is not something straightforward for developers. [ENHANCEMENT] Instead of using an ASSERT(), let's handle it gracefully and output extra info about the mismatch reloc roots to help debug. Also with the above ASSERT() removed, we can trigger ASSERT(0)s inside merge_reloc_roots() later. Also replace those ASSERT(0)s with WARN_ON()s. The Linux kernel CVE team has assigned CVE-2023-53183 to this issue. Affected and fixed versions =========================== Fixed in 5.15.127 with commit 69dd147de419b04d1d8d2ca67ef424cddd5b8fd5 Fixed in 6.1.46 with commit 9d04716e36654275aea00fb93fc9b30b850925e7 Fixed in 6.4.11 with commit a96b6519ac71583835cb46d74bc450de5a13877f Fixed in 6.5 with commit 05d7ce504545f7874529701664c90814ca645c5d 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-53183 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/relocation.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/69dd147de419b04d1d8d2ca67ef424cddd5b8fd5 https://git.kernel.org/stable/c/9d04716e36654275aea00fb93fc9b30b850925e7 https://git.kernel.org/stable/c/a96b6519ac71583835cb46d74bc450de5a13877f https://git.kernel.org/stable/c/05d7ce504545f7874529701664c90814ca645c5d