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 0038123F415 for ; Thu, 3 Apr 2025 07:19: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=1743664781; cv=none; b=qJH10j8u+HZDrTkDky5fhamer2oesUrO+rh9Qhpw0ny+C5tvrEXO3PfSp6JOfnsiuqyk2JDM/bG6MlO/7eO4yf5gdhTULzXmAke2vPIBDFuAvKyca7wuUoZ4TAJIIhQrGL7YGDKcb7uUj4r9AZJaRv1u3gB4d0I6ZCYZRf0Q034= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743664781; c=relaxed/simple; bh=Kz0yekDUH5qSZXSB9iNV7ItsZO4Ie1bwKvklchcYcdM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=XFH8gJaA6TC9ZFBVx2gVJwvrzuS3UXuw/vkZqR3hjkLvEK1HQHDlkl1JYiKdISdeEHbE9eljgbQaJRuYGdiTBUD/mFA+RA/cinVw1keroojMQkHFP87uv71Dfofqs64Uqrn8djBqIWFUqvJGyMv7aqLNSSvewSGYlPEqobroJg8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=bIy6iSOn; 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="bIy6iSOn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8314BC4CEE3; Thu, 3 Apr 2025 07:19:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1743664780; bh=Kz0yekDUH5qSZXSB9iNV7ItsZO4Ie1bwKvklchcYcdM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=bIy6iSOnpqiB7BIb9rvxjLfWMN760iDhbOdfps+cYbE8JUVoPQ5Sm956hfQMGHB8L +QGpd3QyrqBkwXlys6ap4yI1MqP3ej/ssL0n/ypctPItz+tLtYx3S4ONKgECmTekOU wZK5iAtdOJIqYhM2dQyF4M/c5EonHs61YYJP/JHE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-22000: mm/huge_memory: drop beyond-EOF folios with the right number of refs Date: Thu, 3 Apr 2025 08:17:52 +0100 Message-ID: <2025040349-CVE-2025-22000-50c3@gregkh> X-Mailer: git-send-email 2.49.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=2417; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Kz0yekDUH5qSZXSB9iNV7ItsZO4Ie1bwKvklchcYcdM=; b=owGbwMvMwCRo6H6F97bub03G02pJDOnvzGRv+blPjAw/u2CyiF/W9OmXnjnziShkPTr1c/Kmm 1eEdr3S6ohlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJzP7EMIer8U379etSM1K+ CC7v7vX5vE55ch/DXIHIJxLXn9uffGqQ5cqffmGiv5GAOQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: mm/huge_memory: drop beyond-EOF folios with the right number of refs When an after-split folio is large and needs to be dropped due to EOF, folio_put_refs(folio, folio_nr_pages(folio)) should be used to drop all page cache refs. Otherwise, the folio will not be freed, causing memory leak. This leak would happen on a filesystem with blocksize > page_size and a truncate is performed, where the blocksize makes folios split to >0 order ones, causing truncated folios not being freed. The Linux kernel CVE team has assigned CVE-2025-22000 to this issue. Affected and fixed versions =========================== Issue introduced in 6.9 with commit c010d47f107f609b9f4d6a103b6dfc53889049e9 and fixed in 6.12.21 with commit 86368616a9ce51f6b41efa251b6e066893851d67 Issue introduced in 6.9 with commit c010d47f107f609b9f4d6a103b6dfc53889049e9 and fixed in 6.13.9 with commit 92ad820a1f2d95d5a8d6c2bd3f391bbb068a5f9e Issue introduced in 6.9 with commit c010d47f107f609b9f4d6a103b6dfc53889049e9 and fixed in 6.14 with commit 14efb4793519d73fb2902bb0ece319b886e4b4b9 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-22000 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: mm/huge_memory.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/86368616a9ce51f6b41efa251b6e066893851d67 https://git.kernel.org/stable/c/92ad820a1f2d95d5a8d6c2bd3f391bbb068a5f9e https://git.kernel.org/stable/c/14efb4793519d73fb2902bb0ece319b886e4b4b9