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 9BAA934BA5B for ; Tue, 16 Dec 2025 14:32:40 +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=1765895560; cv=none; b=MkFukrJi0kj43KTfKJdJ/1njJk78EH5I60/QLNlMQO2MA0BXcJlyA0dCu2OigzQzzUCQGlLokNdd5Ad7bqNo3Vdp9zimgCnACCgz4Kz0svtzaq5L4MNapU3wwx2JiDCxIVc87C3jJ1wxlpg2ZCpEhKJJWYGEwYqNfieAB2U91t0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765895560; c=relaxed/simple; bh=B7HGQkFSEG2wBgWQsMDjqJO3KELYIdLYTG0Hrfnh1nQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=WsUfLHpIpRCoIBPyMbrlQPSLBH+M4yHVqL1pb5sdo/EFhp49JjKUDMA+zAHm4LwOQLx5IJJ9ZPaLlh5ThtChGAKPuZr3zwDOaxfamQxH0VrLiB8yJ+UEZNvSxhcsaXM5A1D7dVEKiX3JzkafbfMfhtl2jLfCu2nC9ZXLTF8aN9s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=JXa/sbeQ; 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="JXa/sbeQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CDCBDC4CEF1; Tue, 16 Dec 2025 14:32:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765895560; bh=B7HGQkFSEG2wBgWQsMDjqJO3KELYIdLYTG0Hrfnh1nQ=; h=From:To:Cc:Subject:Date:Reply-To:From; b=JXa/sbeQzM516CPn2PDXkjCbw/hlCE7i29yxF5G5mQ+d3vQM/QLTsWxaOp29hZ0cE 3MNHJGXS5AOtiApS+EUAIKpgtKWta8XsCSF1Od6qvYg49T7iWAauLhyygwyHq42N9F SNlov3j+xA7dY42/Ke5VaSke1DNyKPi85MkYOSc8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-68251: erofs: avoid infinite loops due to corrupted subpage compact indexes Date: Tue, 16 Dec 2025 15:32:27 +0100 Message-ID: <2025121624-CVE-2025-68251-782f@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=2508; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Y9jsjB4E+FxKyppuw680SKatRJa2X84Tfxl1RJcecpo=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmOuRUxp1huW79c8YXlx+SJ1sUOrJZPGlTnMPuF66kun 2f7+SFjRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExk3g+G+b7mZx7MjfGwvqww d/7kBzf/15seX8wwm0VY8PKvpWtPOW6Wq0j553R4t2ONEwA= 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: avoid infinite loops due to corrupted subpage compact indexes Robert reported an infinite loop observed by two crafted images. The root cause is that `clusterofs` can be larger than `lclustersize` for !NONHEAD `lclusters` in corrupted subpage compact indexes, e.g.: blocksize = lclustersize = 512 lcn = 6 clusterofs = 515 Move the corresponding check for full compress indexes to `z_erofs_load_lcluster_from_disk()` to also cover subpage compact compress indexes. It also fixes the position of `m->type >= Z_EROFS_LCLUSTER_TYPE_MAX` check, since it should be placed right after `z_erofs_load_{compact,full}_lcluster()`. The Linux kernel CVE team has assigned CVE-2025-68251 to this issue. Affected and fixed versions =========================== Issue introduced in 6.8 with commit 8d2517aaeea3ab8651bb517bca8f3c8664d318ea and fixed in 6.17.6 with commit 8675447a8794983f2b7e694b378112772c17635e Issue introduced in 6.8 with commit 8d2517aaeea3ab8651bb517bca8f3c8664d318ea and fixed in 6.18 with commit e13d315ae077bb7c3c6027cc292401bc0f4ec683 Issue introduced in 6.6.16 with commit 3f691aa676f29586e83e6c032713554a290418c3 Issue introduced in 6.7.4 with commit 22438a34d383ec2789eaf450728e38abc53051f8 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-2025-68251 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/zmap.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/8675447a8794983f2b7e694b378112772c17635e https://git.kernel.org/stable/c/e13d315ae077bb7c3c6027cc292401bc0f4ec683