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 D8A168F4A for ; Tue, 9 Dec 2025 01:24:39 +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=1765243479; cv=none; b=GXjmlV3dhcMw4lxfoYzD/oxpADb5T3c+b+bdTOaH/qmeb5Rxvdh+k1+VCnylmCwYfF2UAQWX/mtwEcrb1zPs9azW91ZSG08bY123mmQ5qkXIBi+YfLobhvXSPZxCM2hFJ5dslyBU3esC9gGbi1tYB/siDPjn86APMbCkneatQjc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765243479; c=relaxed/simple; bh=X1qb8Ht/Y60DFahI2ltTv64pNB0q8eb4R5+HB9uG5r4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=N8VJNJf1SQeBuwFHjyLBqvsL0Ouns+XwiInQ4+vkDn7SlK0+UyB40es6VZbTscs6p+jZrdqJQGqOYUKKBJg1x5cVis46i4eedi9/gLJgFyMn9IfI26Iird4loh0eT+487pQfQsjTZWVL4oV2i4+mnmaQToEiuzNLO55nSJYiaXE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jgC5dkc2; 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="jgC5dkc2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E789DC4CEF1; Tue, 9 Dec 2025 01:24:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765243479; bh=X1qb8Ht/Y60DFahI2ltTv64pNB0q8eb4R5+HB9uG5r4=; h=From:To:Cc:Subject:Date:Reply-To:From; b=jgC5dkc2tWnjwgHy4X1KoSyMXJ+7ceaTxcJY3TeQyaM4YuIUjmpwbjjX+RPi/Ompq ju1JHgihWawrlzN9j8GcEP8i5TlpxNonjg116SFdfPYLNfDPOYTnyGiVUIdNNkDUbw R8zEeGyuOwvpnSoZItIXnBbK/Ee5t5zgDq9tb684= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53820: loop: loop_set_status_from_info() check before assignment Date: Tue, 9 Dec 2025 10:24:34 +0900 Message-ID: <2025120933-CVE-2023-53820-fb6c@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=3424; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=A6BW5n/2ywXpqUSNL4sAid1t5A8q8ln1OLy+42S7l+s=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnmVUGZi36V++peOHB+02nxrcH7b0je4irKvlMjqrXkm c1P/49MHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRlZIMC6YpnDB522kw4+dd 7fADjboL+MLfiTPMr/ndwbHSLUS29c0FLndtph/mAtnLAA== 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: loop: loop_set_status_from_info() check before assignment In loop_set_status_from_info(), lo->lo_offset and lo->lo_sizelimit should be checked before reassignment, because if an overflow error occurs, the original correct value will be changed to the wrong value, and it will not be changed back. More, the original patch did not solve the problem, the value was set and ioctl returned an error, but the subsequent io used the value in the loop driver, which still caused an alarm: loop_handle_cmd do_req_filebacked loff_t pos = ((loff_t) blk_rq_pos(rq) << 9) + lo->lo_offset; lo_rw_aio cmd->iocb.ki_pos = pos The Linux kernel CVE team has assigned CVE-2023-53820 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10.140 with commit 6858933131d0dadac071c4d33335a9ea4b8e76cf and fixed in 5.10.173 with commit c79a924ed6afac1708dfd370ba66bcf6a852ced6 Issue introduced in 5.15.64 with commit 0455bef69028c65065f16bb04635591b2374249b and fixed in 5.15.100 with commit 3e7d0968203d668af6036b9f9199c7b62c8a3581 Issue introduced in 6.0 with commit c490a0b5a4f36da3918181a8acdc6991d967c5f3 and fixed in 6.1.18 with commit 4be26d553a3f1d4f54f25353d1496c562002126d Issue introduced in 6.0 with commit c490a0b5a4f36da3918181a8acdc6991d967c5f3 and fixed in 6.2.5 with commit 258809bf22bf71d53247856f374f2b1d055f2fd4 Issue introduced in 6.0 with commit c490a0b5a4f36da3918181a8acdc6991d967c5f3 and fixed in 6.3 with commit 9f6ad5d533d1c71e51bdd06a5712c4fbc8768dfa Issue introduced in 4.9.327 with commit 18e28817cb516b39de6281f6db9b0618b2cc7b42 Issue introduced in 4.14.292 with commit adf0112d9b8acb03485624220b4934f69bf13369 Issue introduced in 5.19.6 with commit 9be7fa7ead18a48940df7b59d993bbc8b9055c15 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-53820 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: drivers/block/loop.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/832580af82ace363205039a8e7c4ef04552ccc1a https://git.kernel.org/stable/c/861021710bba9dfa0749a3c209a6c1773208b1f1 https://git.kernel.org/stable/c/c79a924ed6afac1708dfd370ba66bcf6a852ced6 https://git.kernel.org/stable/c/3e7d0968203d668af6036b9f9199c7b62c8a3581 https://git.kernel.org/stable/c/4be26d553a3f1d4f54f25353d1496c562002126d https://git.kernel.org/stable/c/258809bf22bf71d53247856f374f2b1d055f2fd4 https://git.kernel.org/stable/c/9f6ad5d533d1c71e51bdd06a5712c4fbc8768dfa