CVE-2026-68240: drm/gpusvm: publish dpagemap early to avoid device mapping leak on error
Greg Kroah-Hartman <[email protected]>
| Newsgroups | org.kernel.vger.linux-cve-announce |
|---|---|
| Message-ID | <2026081018-CVE-2026-68240-a4bf@gregkh> |
From: Greg Kroah-Hartman <[email protected]> Description =========== In the Linux kernel, the following vulnerability has been resolved: drm/gpusvm: publish dpagemap early to avoid device mapping leak on error drm_gpusvm_get_pages() only stored the local dpagemap into svm_pages->dpagemap on the success path. If a later page failed (e.g. -EOPNOTSUPP when ctx->allow_mixed is false) and jumped to err_unmap, svm_pages->dpagemap was still NULL, so __drm_gpusvm_unmap_pages() skipped device_unmap() and leaked the device mappings already created. Assign svm_pages->dpagemap when the first device page is mapped so the err_unmap path can device_unmap() those mappings. This issue was found by Sashiko AI review. The Linux kernel CVE team has assigned CVE-2026-68240 to this issue. Affected and fixed versions =========================== Issue introduced in 6.18 with commit f70da6f99d4f40c5f481c92e3b65d5e36eaa6dc9 and fixed in 6.18.44 with commit e8362523fd1b61712f7d996802f9b5dee545c7e6 Issue introduced in 6.18 with commit f70da6f99d4f40c5f481c92e3b65d5e36eaa6dc9 and fixed in 7.1.6 with commit 72e4fca5529e45b5beebad79d804de442f632324 Issue introduced in 6.18 with commit f70da6f99d4f40c5f481c92e3b65d5e36eaa6dc9 and fixed in 7.2-rc4 with commit 7f708f51e3955bda0d77a0b67ab9bea6c97fea99 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-2026-68240 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/e8362523fd1b61712f7d996802f9b5dee545c7e6 https://git.kernel.org/stable/c/72e4fca5529e45b5beebad79d804de442f632324 https://git.kernel.org/stable/c/7f708f51e3955bda0d77a0b67ab9bea6c97fea99