{"id":"CVE-2026-99868","aliases":["CVE-2026-99868"],"related":[],"kind":"vulnerability","state":"published","title":"drm/amdkfd: split vram_pages of SVM ranges prefetched without a GPU mapping","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdkfd: split vram_pages of SVM ranges prefetched without a GPU mapping\n\nWhen an SVM range is split, svm_range_split_pages() gives the new range\nthe number of VRAM pages counted in its part of the dma_addr arrays and\nsubtracts it from the old range. Pages migrated to VRAM by a prefetch\nhave no dma_addr entries until the range is mapped on a GPU, e.g. with\nno ACCESS attribute, or with XNACK off before the delayed restore worker\nmapped it, so the new range gets 0 and the old one keeps the count for\nboth.\n\nMigrating the parts back to system memory then gets the accounting\nwrong: the old part keeps a VRAM page count after all its pages are\ngone, so its svm_bo is never freed, and the new part underflows. On\nnavi31, as an unprivileged process: prefetch 4 MiB to the GPU, prefetch\nthe upper 2 MiB and then the lower 2 MiB back to system memory:\n\n  Recorded vram pages(0x0) should not be less than migration pages(0x200).\n  WARNING: ../amdkfd/kfd_migrate.c:922 at svm_migrate_vram_to_ram+0xbdc/0xcd0 [amdgpu]\n\nand /sys/class/kfd/kfd/proc/<pid>/vram_<gpu_id> stays at 4194304 until\nthe process exits.\n\nWithout dma_addr arrays, the split is still exact when the old range is\ncompletely in VRAM, which is what a prefetch of the whole range leaves.\nGive the new range all its pages in that case. The warning is gone and\nthe VRAM usage drops back to 0.\n\nThis doesn't cover a range that is only partly in VRAM without dma_addr\narrays, e.g. after a partial migration, since svm_migrate_ram_to_vram()\nonly counts the pages it actually migrated. That would need VRAM\nresidency to be tracked per page independently of dma_addr.\n\nv2:\n- Rename counted to has_dma_addr and compare against old->npages (Philip)\n- Mention the XNACK off case and the partial migration limitation (Philip)\n\n(cherry picked from commit 7ca6f3359b557a267c7b07a2fd748b1473395e10)","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdkfd: split vram_pages of SVM ranges prefetched without a GPU mapping\n\nWhen an SVM range is split, svm_range_split_pages() gives the new range\nthe number of VRAM pages counted in its part of the dma_addr arrays and\nsubtracts it from the old range. Pages migrated to VRAM by a prefetch\nhave no dma_addr entries until the range is mapped on a GPU, e.g. with\nno ACCESS attribute, or with XNACK off before the delayed restore worker\nmapped it, so the new range gets 0 and the old one keeps the count for\nboth.\n\nMigrating the parts back to system memory then gets the accounting\nwrong: the old part keeps a VRAM page count after all its pages are\ngone, so its svm_bo is never freed, and the new part underflows. On\nnavi31, as an unprivileged process: prefetch 4 MiB to the GPU, prefetch\nthe upper 2 MiB and then the lower 2 MiB back to system memory:\n\n  Recorded vram pages(0x0) should not be less than migration pages(0x200).\n  WARNING: ../amdkfd/kfd_migrate.c:922 at svm_migrate_vram_to_ram+0xbdc/0xcd0 [amdgpu]\n\nand /sys/class/kfd/kfd/proc/<pid>/vram_<gpu_id> stays at 4194304 until\nthe process exits.\n\nWithout dma_addr arrays, the split is still exact when the old range is\ncompletely in VRAM, which is what a prefetch of the whole range leaves.\nGive the new range all its pages in that case. The warning is gone and\nthe VRAM usage drops back to 0.\n\nThis doesn't cover a range that is only partly in VRAM without dma_addr\narrays, e.g. after a partial migration, since svm_migrate_ram_to_vram()\nonly counts the pages it actually migrated. That would need VRAM\nresidency to be tracked per page independently of dma_addr.\n\nv2:\n- Rename counted to has_dma_addr and compare against old->npages (Philip)\n- Mention the XNACK off case and the partial migration limitation (Philip)\n\n(cherry picked from commit 7ca6f3359b557a267c7b07a2fd748b1473395e10)","source":"cvelist"}],"published":"2026-11-30T13:17:48.597Z","modified":"2026-12-01T06:17:54.940Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"006ad514a50cc49d904fd004b69c842ddfaabf1f","fixed":"179bf8516d1276eda573245bbca6dc95f370aacb","status":"affected"},{"type":"git","introduced":"006ad514a50cc49d904fd004b69c842ddfaabf1f","fixed":"08a3f27f91a91fe105012ce8d910540d6a54b37d","status":"affected"},{"type":"git","introduced":"006ad514a50cc49d904fd004b69c842ddfaabf1f","fixed":"72360c3c34ef95f4ca0b27574c765d67504516c2","status":"affected"},{"type":"git","introduced":"006ad514a50cc49d904fd004b69c842ddfaabf1f","fixed":"52957e813f2f025c86e4aa6e86cb4963ef94fd00","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.8","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.8","status":"unaffected"},{"type":"semver","introduced":"6.12.117","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.63","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.4","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/179bf8516d1276eda573245bbca6dc95f370aacb","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/08a3f27f91a91fe105012ce8d910540d6a54b37d","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/72360c3c34ef95f4ca0b27574c765d67504516c2","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/52957e813f2f025c86e4aa6e86cb4963ef94fd00","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-99868","url":"https://www.cve.org/CVERecord?id=CVE-2026-99868","licence":"CVE Terms of Use","modified":"2026-12-01T05:43:57.733Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-99868","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99868","licence":"Public domain","modified":"2026-12-01T06:17:54.940Z"}],"updatedAt":"2026-12-01T06:32:51.270Z","epss":{"score":0.002,"percentile":0.10345,"date":"2026-12-01T12:00:22.000Z"}}