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 CFF48145B27 for ; Tue, 9 Dec 2025 00:05:09 +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=1765238709; cv=none; b=q0GdLx+Io8xoke+n2HS86RTHIVlhg0kMQwuhJn5oa+8i4HoYJVT2ELUmfcijEB8R95DJa8x8ttUxxgjWZHY40M0AZLP1Zui4g+M+Q7yIV4rveAh+GISnMnJqfQ/zCjxPBpGxQqlyuvUHXxqYN39QoPlOZUyzJIKxKf27JlGCvyo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765238709; c=relaxed/simple; bh=Lre8luIx6w7KEcOUxN7mRwwzczPUfQf8RgdMdJdDKQ0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=mOr34o56KJ6c8akxLuJqhu4EqgVlqEmxvXzUoP2cUG11p05jRVHQ81iDksmL2wpX0QEjEAYmGESgYx1DVjXaY2Ygqqa0Jy1fILj2ddr0UOaGZctvNy8vxh8of1KR+UeJqtH8v0G7G9JXbVUcciCOKUwqdcje2x4LhCRnG+z3KWQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=cXHBl04z; 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="cXHBl04z" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68B41C4CEF1; Tue, 9 Dec 2025 00:05:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765238709; bh=Lre8luIx6w7KEcOUxN7mRwwzczPUfQf8RgdMdJdDKQ0=; h=From:To:Cc:Subject:Date:Reply-To:From; b=cXHBl04zhjRgPLnF7E/9ECHvFsI+I34tXdWXPhfGAr2SiFkpqvSbaF1QQvg9As7m7 +jdgwjA1QeqU8YiGLKMQueHl75vAUytUfg1SPdAVIkpgpQogPn8LK0q9QOdenIBPaI FeL7cnHvP+3F/Wn6rj7/gGCnPZ88gBdhiOWkE8y8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53777: erofs: kill hooked chains to avoid loops on deduplicated compressed images Date: Tue, 9 Dec 2025 09:01:58 +0900 Message-ID: <2025120938-CVE-2023-53777-f842@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=3441; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=uK/hQFrDbF6vAvzfRYo3YR+c4KUwrc0sQsaknZB+mm0=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnmaY+W3Jg10UXyPktVopb+xOffbaf5L5uw01mNrafvM mvPzaNZHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjARK2GG+YkKbCfXib66KR5n eY/XNWjr29M6xxjm1x/SrNGS/nFt6Tnr3M3bKm9eM32cAgA= 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: erofs: kill hooked chains to avoid loops on deduplicated compressed images After heavily stressing EROFS with several images which include a hand-crafted image of repeated patterns for more than 46 days, I found two chains could be linked with each other almost simultaneously and form a loop so that the entire loop won't be submitted. As a consequence, the corresponding file pages will remain locked forever. It can be _only_ observed on data-deduplicated compressed images. For example, consider two chains with five pclusters in total: Chain 1: 2->3->4->5 -- The tail pcluster is 5; Chain 2: 5->1->2 -- The tail pcluster is 2. Chain 2 could link to Chain 1 with pcluster 5; and Chain 1 could link to Chain 2 at the same time with pcluster 2. Since hooked chains are all linked locklessly now, I have no idea how to simply avoid the race. Instead, let's avoid hooked chains completely until I could work out a proper way to fix this and end users finally tell us that it's needed to add it back. Actually, this optimization can be found with multi-threaded workloads (especially even more often on deduplicated compressed images), yet I'm not sure about the overall system impacts of not having this compared with implementation complexity. The Linux kernel CVE team has assigned CVE-2023-53777 to this issue. Affected and fixed versions =========================== Issue introduced in 6.0 with commit 267f2492c8f71dac44399988b510f9bf6b074a51 and fixed in 6.1.39 with commit d3b39ea24835ac03da1a30f93ae7c05d55a40191 Issue introduced in 6.0 with commit 267f2492c8f71dac44399988b510f9bf6b074a51 and fixed in 6.3.13 with commit b5b0d52f00e4bacb0ebdf47cd7016b0485fffad2 Issue introduced in 6.0 with commit 267f2492c8f71dac44399988b510f9bf6b074a51 and fixed in 6.4.4 with commit 10c2b98a40d9044a3e97f4697ca6213bad7e19c2 Issue introduced in 6.0 with commit 267f2492c8f71dac44399988b510f9bf6b074a51 and fixed in 6.5 with commit 967c28b23f6c89bb8eef6a046ea88afe0d7c1029 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-53777 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/erofs/zdata.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/d3b39ea24835ac03da1a30f93ae7c05d55a40191 https://git.kernel.org/stable/c/b5b0d52f00e4bacb0ebdf47cd7016b0485fffad2 https://git.kernel.org/stable/c/10c2b98a40d9044a3e97f4697ca6213bad7e19c2 https://git.kernel.org/stable/c/967c28b23f6c89bb8eef6a046ea88afe0d7c1029