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 8EBE226FA60 for ; Thu, 4 Sep 2025 15:34:31 +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=1757000071; cv=none; b=NmEvRoeOhCqWcEB/D1UVCw8AcZ/xRgfgc+MHe2HFSvRVff+g89NrpJpiNoOIQhkbi4DkbCWU5dQSdJhuxbBK1IyIFvrJrzBpPzSWlwegbWv2kfTvvVSkUiYw0mC+2x4XAddu5deIcZ5jvvQU2paCc0z6RHjMEsOfRpK84QHFIZ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757000071; c=relaxed/simple; bh=PbZl/g64Nn7zlPZrAK0qQTD2Pu19WwFgMgSI4xIBPPk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=cm95EkNhOIYrrgZBI7bIJCEaTsOuRXGPJoMuOsk1yzLRxVhzNgkhs4lcDf8aT/Zswptzqt+cFAOPLDiIPFod92B7d6WvmAiTafQDMrjcV5CzUSmVHemj5T2J0+iPZQ7n+k97rSBZwzyyIBAo42ceSN4aXwCsreKbBPDhuN30GrA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=QVKK3Haa; 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="QVKK3Haa" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0634EC4CEF0; Thu, 4 Sep 2025 15:34:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757000071; bh=PbZl/g64Nn7zlPZrAK0qQTD2Pu19WwFgMgSI4xIBPPk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=QVKK3Haaha70rDW76rRx6AfP/+37NRApQIGyDPmidlE5dhYSpqDYJUT52EQnjMdcw eSbFcr11gCW2T4LNXbOrchoLUM4Rbb5LdpTtuipPltC2HsW5QzL7rwrXDtPlGmyAzQ KSPC083h999+yvgcilBawHeAqsvyDjPeif82RR4w= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38709: loop: Avoid updating block size under exclusive owner Date: Thu, 4 Sep 2025 17:33:14 +0200 Message-ID: <2025090456-CVE-2025-38709-f62c@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=2739; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=vfcBkZY+O9SpzFRM8eQt1Evx129ozX9aZBJQVPSC6FA=; b=owGbwMvMwCRo6H6F97bub03G02pJDBk7N2qkHtjco7z9xef7Hhwfl+le2DqByev9UsdJ2gzZX V6bC9SaOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiMw0YFuxtDe5KOuJy0HfG +sQ3BTsdfPLFuRkWbKmqjtyU5mWt1u+te6bvbqzcBvfFAA== 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: Avoid updating block size under exclusive owner Syzbot came up with a reproducer where a loop device block size is changed underneath a mounted filesystem. This causes a mismatch between the block device block size and the block size stored in the superblock causing confusion in various places such as fs/buffer.c. The particular issue triggered by syzbot was a warning in __getblk_slow() due to requested buffer size not matching block device block size. Fix the problem by getting exclusive hold of the loop device to change its block size. This fails if somebody (such as filesystem) has already an exclusive ownership of the block device and thus prevents modifying the loop device under some exclusive owner which doesn't expect it. The Linux kernel CVE team has assigned CVE-2025-38709 to this issue. Affected and fixed versions =========================== Fixed in 6.6.103 with commit ce8da5d13d8c2a7b30b2fb376a22e8eb1a70b8bb Fixed in 6.12.43 with commit 139a000d20f2f38ce34296feddd641d730fe1c08 Fixed in 6.15.11 with commit b928438cc87c0bf7ae078e4b7b6e14261e84c5c5 Fixed in 6.16.2 with commit 5d67b30aefeb7a949040bbb1b4e3b84c5d29a624 Fixed in 6.17-rc1 with commit 7e49538288e523427beedd26993d446afef1a6fb 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-38709 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/ce8da5d13d8c2a7b30b2fb376a22e8eb1a70b8bb https://git.kernel.org/stable/c/139a000d20f2f38ce34296feddd641d730fe1c08 https://git.kernel.org/stable/c/b928438cc87c0bf7ae078e4b7b6e14261e84c5c5 https://git.kernel.org/stable/c/5d67b30aefeb7a949040bbb1b4e3b84c5d29a624 https://git.kernel.org/stable/c/7e49538288e523427beedd26993d446afef1a6fb