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 97FEC2C08D0 for ; Tue, 9 Dec 2025 04:11:08 +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=1765253469; cv=none; b=Yk2D4/GVSRQlQ8Qn5HK6G2ioE5uLYcbnNNqkozBmOMnONKCE6XR3qgFYdb5bIi5D7wkgKabhdGK69RIfNBqq4phtuQoiGJSWnh5V/i0sTBC7Cqv+T99n+Bb18dvDyt+J/v7nrRpnABr5WEMUeQeC09d7E/oS+m19w4ONFQQA8oA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765253469; c=relaxed/simple; bh=mF+7fNKGuG4FryJVUHRvQibSXLIqxOymcmLiO2F+4BI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=tlQSl3EApmQLm7pcjN+uH4cBYKc19Jp7T9F46guFTdmv0lTSewazGCk/JT3Fbv950uWwH3twu1E9diTXm5N4LqnqBNpbpW2UoAKUKf0ATYH1O+8dHwY/u9q4w1fMXyb6w2LCyVrHjnOwB9z1buFaAJQLT0bdTtPKlMXnyyMj/f4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mO7UG+7h; 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="mO7UG+7h" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A6966C4CEF5; Tue, 9 Dec 2025 04:11:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765253467; bh=mF+7fNKGuG4FryJVUHRvQibSXLIqxOymcmLiO2F+4BI=; h=From:To:Cc:Subject:Date:Reply-To:From; b=mO7UG+7hyj9QNl61Qq+A3NkD5jGvRAkCe7u4L0PJELZ9V67uu1qbc4ze7ZeCqQf/h qDW7k268thgATI6MmLzvUNdaC+9yV/sAh3uk6HQts4VMqDRvvKLrPZtSLaAwBy22rM biaxWYjT6y9yc/S8vkC4mNTRMj5jesJUr2jAndFk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40336: drm/gpusvm: fix hmm_pfn_to_map_order() usage Date: Tue, 9 Dec 2025 13:10:18 +0900 Message-ID: <2025120911-CVE-2025-40336-781e@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1989; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=d7Z/fFjEdIscPnrMnwOvxphjnLqxahQMNGOiRBgwO2Q=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnmC5W3XbHQ2H5iopDLEzleVtadJZo3TmVXP1me83ON1 dQnJmpzO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAirzgYFvR2Z5fJHZB8Y3bO XGvGDZuVRnPuuTDMFZVdFnxPVeJlq5MT78sZfJz5N+zCAQ== 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: drm/gpusvm: fix hmm_pfn_to_map_order() usage Handle the case where the hmm range partially covers a huge page (like 2M), otherwise we can potentially end up doing something nasty like mapping memory which is outside the range, and maybe not even mapped by the mm. Fix is based on the xe userptr code, which in a future patch will directly use gpusvm, so needs alignment here. v2: - Add kernel-doc (Matt B) - s/fls/ilog2/ (Thomas) The Linux kernel CVE team has assigned CVE-2025-40336 to this issue. Affected and fixed versions =========================== Fixed in 6.17.8 with commit 08e9fd78ba1b9e95141181c69cc51795c9888157 Fixed in 6.18 with commit c50729c68aaf93611c855752b00e49ce1fdd1558 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-40336 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: drivers/gpu/drm/drm_gpusvm.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/08e9fd78ba1b9e95141181c69cc51795c9888157 https://git.kernel.org/stable/c/c50729c68aaf93611c855752b00e49ce1fdd1558