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 3794F21CC58 for ; Sat, 28 Jun 2025 07:44: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=1751096680; cv=none; b=N/7jEPJ68oNdgca5BzYItJCCrqhVVQnlDUvoZFoWWaly+74QEQJECR0fCsrOk/s4gDU4VJsdXD8TCL0n6AO48Gazlz0F1oXxMG2z20jSLCabLrZXRWYkynnVf8OJpi1xu0+urTs9VfBolXMxUlN2rKbmfpAFfwrHu8k0ZAxbX+I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751096680; c=relaxed/simple; bh=CZPbwpTSnVVbm6unGf2MRuvNcOSHPZW8bvpo8OB+l8A=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=X8sauSEfIhNdC99WZ4CGI8omxrGKh7kElvbTx3ztrLpsdQulMcGQQ9OO1RivcEAalx2I8B3OUICPDgrfrxGXMWLokHyWxZ2C4JYvo1mKZPScnETSmGOCNa/drMEaCMFncMqWphBbRuRHtfCpfmdpefZRTDVm0/3WeflicW2cepA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Ct/UU7qa; 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="Ct/UU7qa" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64C8BC4CEEA; Sat, 28 Jun 2025 07:44:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1751096679; bh=CZPbwpTSnVVbm6unGf2MRuvNcOSHPZW8bvpo8OB+l8A=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Ct/UU7qaoJt9KVE33WM6tnk9SDUIQ8od0xDnWz6DY6JvyT8KVURhOLC5HYLvMoEXr Ory/lyVPFb/2qx7Xx3v8s6deSH3A9RqvhCDU/8qVxImrkmiLDwQ+pBzCBLyTn53zSx 4TUPbcLlcspoHjetNtPTWApCrmSKOCMRveTACitw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38085: mm/hugetlb: fix huge_pmd_unshare() vs GUP-fast race Date: Sat, 28 Jun 2025 09:44:36 +0200 Message-ID: <2025062836-CVE-2025-38085-8075@gregkh> X-Mailer: git-send-email 2.50.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=3557; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=RAH6T8a48rMmp8+K+QqT5y7mZgDy6aYS1hFpb+ssoTg=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnxc1NaN5/ZpDB9L+vUPWx/+Fp0Uub3/OK/enl59olPl 4t2zHmY1hHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATCVzEsGBPZWjs4icRx288 21Kx9MTB6BmbLmYyzGYVWi2T/LdU4fXDvexLDL9s3zRTJRMA 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: mm/hugetlb: fix huge_pmd_unshare() vs GUP-fast race huge_pmd_unshare() drops a reference on a page table that may have previously been shared across processes, potentially turning it into a normal page table used in another process in which unrelated VMAs can afterwards be installed. If this happens in the middle of a concurrent gup_fast(), gup_fast() could end up walking the page tables of another process. While I don't see any way in which that immediately leads to kernel memory corruption, it is really weird and unexpected. Fix it with an explicit broadcast IPI through tlb_remove_table_sync_one(), just like we do in khugepaged when removing page tables for a THP collapse. The Linux kernel CVE team has assigned CVE-2025-38085 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.20 with commit 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa and fixed in 5.10.239 with commit 952596b08c74e8fe9e2883d1dc8a8f54a37384ec Issue introduced in 2.6.20 with commit 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa and fixed in 5.15.186 with commit a3d864c901a300c295692d129159fc3001a56185 Issue introduced in 2.6.20 with commit 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa and fixed in 6.1.142 with commit b7754d3aa7bf9f62218d096c0c8f6c13698fac8b Issue introduced in 2.6.20 with commit 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa and fixed in 6.6.95 with commit fe684290418ef9ef76630072086ee530b92f02b8 Issue introduced in 2.6.20 with commit 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa and fixed in 6.12.35 with commit 034a52b5ef57c9c8225d94e9067f3390bb33922f Issue introduced in 2.6.20 with commit 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa and fixed in 6.15.4 with commit a6bfeb97941a9187833b526bc6cc4ff5706d0ce9 Issue introduced in 2.6.20 with commit 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa and fixed in 6.16-rc1 with commit 1013af4f585fccc4d3e5c5824d174de2257f7d6d 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-38085 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/hugetlb.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/952596b08c74e8fe9e2883d1dc8a8f54a37384ec https://git.kernel.org/stable/c/a3d864c901a300c295692d129159fc3001a56185 https://git.kernel.org/stable/c/b7754d3aa7bf9f62218d096c0c8f6c13698fac8b https://git.kernel.org/stable/c/fe684290418ef9ef76630072086ee530b92f02b8 https://git.kernel.org/stable/c/034a52b5ef57c9c8225d94e9067f3390bb33922f https://git.kernel.org/stable/c/a6bfeb97941a9187833b526bc6cc4ff5706d0ce9 https://git.kernel.org/stable/c/1013af4f585fccc4d3e5c5824d174de2257f7d6d