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 D435E35CBA9 for ; Wed, 12 Nov 2025 22:00:50 +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=1762984850; cv=none; b=eNwNiOTthNPIgFQUf66iCRASzIw55wxV78cqy2+VmHF1FkvMkJFPNaC4zt3DDpbCJGss4BTPY8VaJOQbfzSma21Pl0YAtYclgsDxpsoV5ZVNXaowb5Cj2jnPMtAeebfVeeCLRT6eT01NdJ7cggDhlfSyPHIcDmOF8KHzIIEq9so= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762984850; c=relaxed/simple; bh=VjPGIjWPRVDhN0f8pTEXoyLjh97pu2wUxp01vfIJSzQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=uc5BV948vSWzkn1toSrxuJav/zXuctuq38SruZo53aCNwzGeuLBoV2aPQS6DIJrG/ayq1Sg8I9biJUv+QcbatMCDPQubxap4faUHocbPcLJCcuxforMGXofONZ9YW0yLuPv2feRVXYGIigj1uMulvV/JrW/TfJgHdaP3QQcK1fQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=DO8NDHbQ; 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="DO8NDHbQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4DFE3C4CEF1; Wed, 12 Nov 2025 22:00:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1762984850; bh=VjPGIjWPRVDhN0f8pTEXoyLjh97pu2wUxp01vfIJSzQ=; h=From:To:Cc:Subject:Date:Reply-to:From; b=DO8NDHbQUtebvyyvmsgtuebMF/vLv9TSH5abfqm+6OEgS8olL3aH5yppFmcVjziHZ gqD50QklfHxZ0PGY0x6q4UrdAe/cHcC2vzACleyYLdZ8lD2AB6fr9goAmH8yizSYS3 Wqrv6MiLSCP+s3DkBkPwpBMg7s2/h3JlHtpD1Elo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40179: ext4: verify orphan file size is not too big Date: Wed, 12 Nov 2025 17:00:42 -0500 Message-ID: <2025111243-CVE-2025-40179-6d22@gregkh> X-Mailer: git-send-email 2.51.2 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=3085; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=udM81EaBDao3E7keNsoi2pq9JuH0oAd22R3y9nWU9mg=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmizN27ju78rKW3cq381U8rsu0Djn+5msO1df2utreL9 f/kySQ6dMSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEuGIY5tdy7u+YltyZeamz NfpC9e83T5okJzMs2Mn0U3PCpw33/ANj4+vnXZxx60tKCQA= 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: ext4: verify orphan file size is not too big In principle orphan file can be arbitrarily large. However orphan replay needs to traverse it all and we also pin all its buffers in memory. Thus filesystems with absurdly large orphan files can lead to big amounts of memory consumed. Limit orphan file size to a sane value and also use kvmalloc() for allocating array of block descriptor structures to avoid large order allocations for sane but large orphan files. The Linux kernel CVE team has assigned CVE-2025-40179 to this issue. Affected and fixed versions =========================== Issue introduced in 5.15 with commit 02f310fcf47fa9311d6ba2946a8d19e7d7d11f37 and fixed in 5.15.195 with commit 95a21611b14ae0a401720645245a8db16f040995 Issue introduced in 5.15 with commit 02f310fcf47fa9311d6ba2946a8d19e7d7d11f37 and fixed in 6.1.157 with commit 566a1d6084563bd07433025aa23bcea4427de107 Issue introduced in 5.15 with commit 02f310fcf47fa9311d6ba2946a8d19e7d7d11f37 and fixed in 6.6.113 with commit 304fc34ff6fc8261138fd81f119e024ac3a129e9 Issue introduced in 5.15 with commit 02f310fcf47fa9311d6ba2946a8d19e7d7d11f37 and fixed in 6.12.54 with commit a2d803fab8a6c6a874277cb80156dc114db91921 Issue introduced in 5.15 with commit 02f310fcf47fa9311d6ba2946a8d19e7d7d11f37 and fixed in 6.17.4 with commit 2b9da798ff0f4d026c5f0f815047393ebe7d8859 Issue introduced in 5.15 with commit 02f310fcf47fa9311d6ba2946a8d19e7d7d11f37 and fixed in 6.18-rc1 with commit 0a6ce20c156442a4ce2a404747bb0fb05d54eeb3 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-40179 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/ext4/orphan.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/95a21611b14ae0a401720645245a8db16f040995 https://git.kernel.org/stable/c/566a1d6084563bd07433025aa23bcea4427de107 https://git.kernel.org/stable/c/304fc34ff6fc8261138fd81f119e024ac3a129e9 https://git.kernel.org/stable/c/a2d803fab8a6c6a874277cb80156dc114db91921 https://git.kernel.org/stable/c/2b9da798ff0f4d026c5f0f815047393ebe7d8859 https://git.kernel.org/stable/c/0a6ce20c156442a4ce2a404747bb0fb05d54eeb3