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 8C3042522A7 for ; Thu, 4 Sep 2025 15:34:01 +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=1757000041; cv=none; b=Zi8j6mG+6q7/xM1XCSjBfNxqyYwx0kz7o6PLKu+t4qfOF6F+VgS0XchUoY9WnBT78LaASIw9nBka29YB5lOAj7UEtg44Rwki6UTDU2q0+13CAcGSQNoDToIf60ACIPATM5SRhPNDazdN6+9ZIaT2Bv+Zrub5O6yVloUUfPqsaf8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757000041; c=relaxed/simple; bh=4efLhdjI22ZlOD7E//zi19fxdiCnL6wFuu0v2/5gt98=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ciAAddg4xraS/pg+OQ3jzE3etEO/5VFTdLfD9uIvmvxKWsp8w/Tby173tTn8IAwDTl2QP32QKfnej6buVSpT7P9WsPI+5mugTyCk/x+tkI48TTHIPbAI+85n8jcNaqw7WSI0IoJqo9W1Q02xCF5x2Z0MlETBeekVv/KrIW9g8Yk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ozSNoj/v; 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="ozSNoj/v" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EEEA8C4CEF0; Thu, 4 Sep 2025 15:34:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757000041; bh=4efLhdjI22ZlOD7E//zi19fxdiCnL6wFuu0v2/5gt98=; h=From:To:Cc:Subject:Date:Reply-to:From; b=ozSNoj/vy7mqT4cD3HH2379hlQClfqDXQLzhJAbddrRME3zfEAR2LiNw1QAlWBwcC pdCXtL2pCUu38uxFYc7xkf8MosmSB3NyMiftanTEfIDWIPZrZJJVSObJ72E6MT5MGT hTH6ktu78UBqm7zf2kr/PswePmf0fVJedJ4o9duA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38686: userfaultfd: fix a crash in UFFDIO_MOVE when PMD is a migration entry Date: Thu, 4 Sep 2025 17:32:51 +0200 Message-ID: <2025090447-CVE-2025-38686-281b@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=2554; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=jT13UmcjMd8BJ5Tk539fD1ndR9O5d811NhxeIwdfR4k=; b=owGbwMvMwCRo6H6F97bub03G02pJDBk7Nyrwn9L4pqWiYRzaxjvx2HbNl78cWyOzqn2te1UNA 6Z7nzjREcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABN5b8ywYOcXfWnd+c4Fia4J xRs3cS49VMC8m2HBDbcZ+39Jre38kKDOM9Fi3SHB+q+fAQ== 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: userfaultfd: fix a crash in UFFDIO_MOVE when PMD is a migration entry When UFFDIO_MOVE encounters a migration PMD entry, it proceeds with obtaining a folio and accessing it even though the entry is swp_entry_t. Add the missing check and let split_huge_pmd() handle migration entries. While at it also remove unnecessary folio check. [surenb@google.com: remove extra folio check, per David] The Linux kernel CVE team has assigned CVE-2025-38686 to this issue. Affected and fixed versions =========================== Issue introduced in 6.8 with commit adef440691bab824e39c1b17382322d195e1fab0 and fixed in 6.12.43 with commit bb81c18dbd42650c844e160cafa7cbb20243a96a Issue introduced in 6.8 with commit adef440691bab824e39c1b17382322d195e1fab0 and fixed in 6.15.11 with commit 1202abad7a7ccd28c426d2844771a387b07629a4 Issue introduced in 6.8 with commit adef440691bab824e39c1b17382322d195e1fab0 and fixed in 6.16.2 with commit 7f1101a0a181243ad587ececdffc4845f035549f Issue introduced in 6.8 with commit adef440691bab824e39c1b17382322d195e1fab0 and fixed in 6.17-rc2 with commit aba6faec0103ed8f169be8dce2ead41fcb689446 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-38686 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/userfaultfd.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/bb81c18dbd42650c844e160cafa7cbb20243a96a https://git.kernel.org/stable/c/1202abad7a7ccd28c426d2844771a387b07629a4 https://git.kernel.org/stable/c/7f1101a0a181243ad587ececdffc4845f035549f https://git.kernel.org/stable/c/aba6faec0103ed8f169be8dce2ead41fcb689446