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 416EC35AABE for ; Thu, 11 Sep 2025 16:53:55 +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=1757609635; cv=none; b=WAXwSRZloJM56G80Veu0M/UhKtrIZYP/b6y+ez00K1tmAvQvV8Zo2RtTj/jZLwfe1jtR6Uj7FRpgrBfFBYThdlzwXrHTheQ+XDoRMffhdYaief+gLVjfMDxR8PujlkRl7S6Zxai/aWZyl2xIYJCmuXYj1oalsS6hoN+ESeTQuD4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757609635; c=relaxed/simple; bh=5kHtjhl+Cq0ksxyTEgnv8MBA+pEhBlvbuXJmXnY4PwA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ttoZe1FUYQlnuRG/EGvTm/UySbK2SmujdzUx4/wpJSf5DEn4zn7AS3RRiznAFhmVEIRbaX1hoLZ4UR/yLfv4yp30DFp1qw7Uhg4trWjTMsDY0C/nH036zHjDbvZASFstUOJSeGWzMY3lnInHrZ0bCsi1L3TyCqYFF/9SQmBN2mQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=V/x9JHuL; 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="V/x9JHuL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BBD3AC4CEF0; Thu, 11 Sep 2025 16:53:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757609635; bh=5kHtjhl+Cq0ksxyTEgnv8MBA+pEhBlvbuXJmXnY4PwA=; h=From:To:Cc:Subject:Date:Reply-to:From; b=V/x9JHuLbYl9/RhUmvw2/1tAqRWodzm9GlauGCMfRCScevEgw5Cfeq43qI3HRX89u Z5f+FcSjAnN+zVgmQ1vp+uYgJeej2ry2/L8wAHJNoSsjPB5xow+ZhD/3jK2a0r2JgB Gr85QiwIZtpIAICEhtxLa+FlXRPl7WSYmGrIYSHk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-39754: mm/smaps: fix race between smaps_hugetlb_range and migration Date: Thu, 11 Sep 2025 18:52:55 +0200 Message-ID: <2025091143-CVE-2025-39754-9cf6@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=2627; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=mfULPCGkXvSXnOGy46oDiIZ1O1+ORUI9/tlwukHaeao=; b=owGbwMvMwCRo6H6F97bub03G02pJDBmH/kVP+G67dts1270e0TuvCmwV+NbCrRud/uE6Y5jF6 Y8bm18+7ohlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJvApjWLAiLKNk6u3IJ6Gz Yr/PZHoStKJx1wmGeeavt31reT5FJnzygZ/O+W8/MNd2+QEA 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/smaps: fix race between smaps_hugetlb_range and migration smaps_hugetlb_range() handles the pte without holdling ptl, and may be concurrenct with migration, leaing to BUG_ON in pfn_swap_entry_to_page(). The race is as follows. smaps_hugetlb_range migrate_pages huge_ptep_get remove_migration_ptes folio_unlock pfn_swap_entry_folio BUG_ON To fix it, hold ptl lock in smaps_hugetlb_range(). The Linux kernel CVE team has assigned CVE-2025-39754 to this issue. Affected and fixed versions =========================== Issue introduced in 4.4 with commit 25ee01a2fca02dfb5a3ce316e77910c468108199 and fixed in 6.12.43 with commit 2a1f3663974162b8f1e098196f557cfc1d160138 Issue introduced in 4.4 with commit 25ee01a2fca02dfb5a3ce316e77910c468108199 and fixed in 6.15.11 with commit 09fc018f48871123ad5dbd7b03c956580232ed76 Issue introduced in 4.4 with commit 25ee01a2fca02dfb5a3ce316e77910c468108199 and fixed in 6.16.2 with commit b625883ccbcc2b57808db51d1375b1d7b9bcb3e5 Issue introduced in 4.4 with commit 25ee01a2fca02dfb5a3ce316e77910c468108199 and fixed in 6.17-rc2 with commit 45d19b4b6c2d422771c29b83462d84afcbb33f01 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-39754 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/proc/task_mmu.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/2a1f3663974162b8f1e098196f557cfc1d160138 https://git.kernel.org/stable/c/09fc018f48871123ad5dbd7b03c956580232ed76 https://git.kernel.org/stable/c/b625883ccbcc2b57808db51d1375b1d7b9bcb3e5 https://git.kernel.org/stable/c/45d19b4b6c2d422771c29b83462d84afcbb33f01