{"id":"CVE-2026-89967","state":"PUBLISHED","title":"mm/migrate_device: avoid out-of-bounds writes for compound folios","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/migrate_device: avoid out-of-bounds writes for compound folios\n\nmigrate_device_range() and migrate_device_pfns() clear the entries\nfollowing a compound folio so that the PFN arrays retain their\npage-granular representation.\n\nIf a compound folio extends beyond the end of the caller-provided range,\nthe loops clear all following folio entries without limiting them to the\nnumber of slots remaining in the npages-sized array, causing an\nout-of-bounds write.\n\nDo not proceed with a compound folio if its page-granular representation\ndoes not fit entirely in the remaining PFN array.  If this happens, drop\nany reference and lock acquired for the folio, clear the remaining\nentries, and stop collecting.\n\nObserved with a KASAN x86 QEMU kernel using the HMM migrate_anon_huge_zero\nselftest.  Closing /dev/hmm_dmirror0 after migrating an anonymous huge\npage to device memory exercises:\n\n  dmirror_fops_release()\n    -> dmirror_device_evict_chunk()\n      -> migrate_device_range()","publishedAt":"2026-09-16T10:32:48.164Z","updatedAt":"2026-10-19T08:55:40.822Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a30b48bf1b244f11bf9b6d20cdccfe0c2264130c","status":"affected","lessThan":"99186b185c245f5987d7f8715d5504c8d8cc04a0","versionType":"git"},{"version":"a30b48bf1b244f11bf9b6d20cdccfe0c2264130c","status":"affected","lessThan":"dc41e961a269f2ca4196e669d6d8e05480899cd4","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/migrate_device.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.19","versionType":"semver"},{"version":"7.2.5","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/migrate_device.c"]}],"references":["https://git.kernel.org/stable/c/99186b185c245f5987d7f8715d5504c8d8cc04a0","https://git.kernel.org/stable/c/dc41e961a269f2ca4196e669d6d8e05480899cd4"],"weaknesses":[],"ingestedAt":"2026-10-29T20:13:26.108Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/89xxx/CVE-2026-89967.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-89967","state":"PUBLISHED","datePublished":"2026-09-16T10:32:48.164Z","dateUpdated":"2026-10-19T08:55:40.822Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-11T19:38:34.778Z"},"containers":{"cna":{"title":"mm/migrate_device: avoid out-of-bounds writes for compound folios","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/migrate_device: avoid out-of-bounds writes for compound folios\n\nmigrate_device_range() and migrate_device_pfns() clear the entries\nfollowing a compound folio so that the PFN arrays retain their\npage-granular representation.\n\nIf a compound folio extends beyond the end of the caller-provided range,\nthe loops clear all following folio entries without limiting them to the\nnumber of slots remaining in the npages-sized array, causing an\nout-of-bounds write.\n\nDo not proceed with a compound folio if its page-granular representation\ndoes not fit entirely in the remaining PFN array.  If this happens, drop\nany reference and lock acquired for the folio, clear the remaining\nentries, and stop collecting.\n\nObserved with a KASAN x86 QEMU kernel using the HMM migrate_anon_huge_zero\nselftest.  Closing /dev/hmm_dmirror0 after migrating an anonymous huge\npage to device memory exercises:\n\n  dmirror_fops_release()\n    -> dmirror_device_evict_chunk()\n      -> migrate_device_range()"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a30b48bf1b244f11bf9b6d20cdccfe0c2264130c","status":"affected","lessThan":"99186b185c245f5987d7f8715d5504c8d8cc04a0","versionType":"git"},{"version":"a30b48bf1b244f11bf9b6d20cdccfe0c2264130c","status":"affected","lessThan":"dc41e961a269f2ca4196e669d6d8e05480899cd4","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/migrate_device.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.19","versionType":"semver"},{"version":"7.2.5","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/migrate_device.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/99186b185c245f5987d7f8715d5504c8d8cc04a0"},{"url":"https://git.kernel.org/stable/c/dc41e961a269f2ca4196e669d6d8e05480899cd4"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The OOB write is in migrate_device_range()/migrate_device_pfns() on the device-private eviction path, reached from local HMM/GPU SVM (close of /dev/hmm_dmirror*, Nouveau dmem teardown, Intel Xe drm_pagemap_evict_to_ram after DRM_XE_VM_BIND), not from received network packets.\nAC:L - The attacker creates a compound device folio by migrating an anonymous THP or huge-zero page, then triggers eviction of a too-small PFN array (dmirror close/HMM_DMIRROR_RELEASE or Xe TTM eviction of a CPU_ADDR_MIRROR BO). The HMM selftest hits this deterministically; no victim timing is required.\nPR:L - Intel Xe DRM_XE_VM_BIND is DRM_RENDER_ALLOW with no capable() or DRM-master check. An unprivileged local user with typical render/video-group access to /dev/dri/renderD* can migrate a THP to device memory and force drm_pagemap_evict_to_ram.\nUI:N - The attacker performs mmap/madvise, the migrate ioctl, and eviction or close entirely in their own process. No other user or administrator needs to mount a filesystem, open a file, or otherwise interact.\nS:U - The overflow corrupts host-kernel memory adjacent to the caller-provided src_pfns kvcalloc/kvmalloc array. That is standard local privilege escalation in the same security authority, not a KVM/Xen guest-to-host escape or IOMMU/DMA bypass.\nC:H - migrate_device_* zeros every tail slot of a compound folio without clipping to npages, overflowing the PFN array by up to (folio_nr_pages-remaining) pointers (~4KB for a 2MB THP). That heap corruption can be turned into an arbitrary kernel read via overlapping objects.\nI:H - The same unbounded store is an out-of-bounds kernel write into adjacent slab/vmalloc objects. Zeroing neighboring heap metadata, pointers, or function pointers is exploitable for an arbitrary write and control-flow hijack, not a bounded integrity change.\nA:H - KASAN reports this overflow on the HMM migrate_anon_huge_zero selftest when closing /dev/hmm_dmirror0, and smashing adjacent kernel objects with zeros causes an oops or panic even without a completed exploit."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-19T08:55:40.822Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.19","versionEndExcluding":"7.2.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.19","versionEndExcluding":"7.3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}