{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-99668","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-09-25T10:25:14.428Z","datePublished":"2026-11-20T05:50:18.124Z","dateUpdated":"2026-11-22T11:09:33.041Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-11-22T11:09:33.041Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/huge_memory: fix zapping migration entries for device-private THPs\n\nA PMD migration entry can refer to a device-private folio.\nzap_huge_pmd_folio() checks the folio type instead of the entry type,\nso it treats such a migration entry as a device-private entry.\n\nInstalling the migration entry already removed the reverse mapping and\ndropped the mapping reference. Zapping it must not repeat those\noperations. Concurrent MADV_DONTNEED during migration back to system\nmemory can trigger this.\n\nCheck the PMD entry type using pmd_is_device_private_entry().\n\nFix generated by an LLM and sent by Chris Mason in private.\n\n[ david: simplify description ]"}],"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 - madvise(MADV_DONTNEED) reaches the buggy check in zap_huge_pmd_folio through do_madvise, madvise_dontneed_single_vma, zap_vma_range_batched and zap_pmd_range. The zapped PMD is a migration entry that set_pmd_migration_entry wrote into the caller's page tables during do_huge_pmd_device_private.\nAC:L - The attacker first moves their own anonymous THP to device-private memory through GPU HMM, then faults it so __handle_mm_fault calls do_huge_pmd_device_private and migrate_vma_setup. set_pmd_migration_entry leaves the migration PMD installed across the device-to-RAM copy, and a second thread of the same process calls MADV_DONTNEED into that window.\nPR:L - Both the fault and madvise run as an unprivileged process on an anonymous VMA it owns. GPU HMM drivers (nouveau_dmem_migrate_to_ram, svm_migrate_to_ram) install the device-private THP for a render-node client, and zap_huge_pmd_folio does not consult capabilities.\nUI:N - The attacker calls madvise and generates the migrate-back fault on a device-private THP mapping that their own process already created.\nS:U - The repeated folio_put and folio_remove_rmap_pmd corrupt the device-private folio in the calling kernel. The damaged state is that kernel's folio refcount and mapcount, the same authority as the vulnerable mm code.\nC:H - set_pmd_migration_entry already called folio_put to drop the mapping pin. zap_huge_pmd_folio takes the folio_is_device_private(folio) branch and puts again, so the refcount hits zero and free_zone_device_folio runs while do_huge_pmd_device_private still holds the folio and will folio_unlock and folio_put it. That is a use-after-free of the folio.\nI:H - The extra folio_put returns the device-private folio to the driver free list (nouveau_dmem_folio_free) while migration still has it locked, so the later folio_unlock and folio_put modify the lock and refcount of whatever client reallocates that folio. The extra folio_remove_rmap_pmd also writes a negative _large_mapcount and underflows _nr_pages_mapped.\nA:H - free_zone_device_folio drops a folio that migrate_vma_finalize and do_huge_pmd_device_private still lock and put, which oopses the kernel or unlocks a live reallocated folio. The second folio_remove_rmap_pmd also feeds a huge negative delta, nr_pages plus ENTIRELY_MAPPED, into __folio_mod_stat."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/huge_memory.c"],"versions":[{"version":"368076f52ebeecd33e10a9f80905d7508b6b6149","lessThan":"2d7e94a16d0d33ce2cce5ea06cf61079c392d351","status":"affected","versionType":"git"},{"version":"368076f52ebeecd33e10a9f80905d7508b6b6149","lessThan":"63a940541358d09cc9f02d40b71eb8d3917a21c0","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/huge_memory.c"],"versions":[{"version":"6.19","status":"affected"},{"version":"0","lessThan":"6.19","status":"unaffected","versionType":"semver"},{"version":"7.3.5","lessThanOrEqual":"7.3.*","status":"unaffected","versionType":"semver"},{"version":"7.4-rc2","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.19","versionEndExcluding":"7.3.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.19","versionEndExcluding":"7.4-rc2"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/2d7e94a16d0d33ce2cce5ea06cf61079c392d351"},{"url":"https://git.kernel.org/stable/c/63a940541358d09cc9f02d40b71eb8d3917a21c0"}],"title":"mm/huge_memory: fix zapping migration entries for device-private THPs","x_generator":{"engine":"bippy-1.2.0"}}}}