{"api_version":"1","generated_at":"2026-11-22T20:39:58+00:00","cve":"CVE-2026-99668","urls":{"html":"https://cve.report/CVE-2026-99668","api":"https://cve.report/api/cve/CVE-2026-99668.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-99668","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-99668"},"summary":{"title":"mm/huge_memory: fix zapping migration entries for device-private THPs","description":"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 ]","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-20 06:18:01","updated_at":"2026-11-22 11:17:05"},"problem_types":[],"metrics":[{"version":"3.1","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"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","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"references":[{"url":"https://git.kernel.org/stable/c/2d7e94a16d0d33ce2cce5ea06cf61079c392d351","name":"https://git.kernel.org/stable/c/2d7e94a16d0d33ce2cce5ea06cf61079c392d351","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/63a940541358d09cc9f02d40b71eb8d3917a21c0","name":"https://git.kernel.org/stable/c/63a940541358d09cc9f02d40b71eb8d3917a21c0","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-99668","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99668","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 368076f52ebeecd33e10a9f80905d7508b6b6149 2d7e94a16d0d33ce2cce5ea06cf61079c392d351 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 368076f52ebeecd33e10a9f80905d7508b6b6149 63a940541358d09cc9f02d40b71eb8d3917a21c0 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.19","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.19 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.5 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc2 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2026","cve_id":"99668","cve":"CVE-2026-99668","epss":"0.001560000","percentile":"0.047320000","score_date":"2026-11-21","updated_at":"2026-11-22 00:14:17"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["mm/huge_memory.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"2d7e94a16d0d33ce2cce5ea06cf61079c392d351","status":"affected","version":"368076f52ebeecd33e10a9f80905d7508b6b6149","versionType":"git"},{"lessThan":"63a940541358d09cc9f02d40b71eb8d3917a21c0","status":"affected","version":"368076f52ebeecd33e10a9f80905d7508b6b6149","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["mm/huge_memory.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.19"},{"lessThan":"6.19","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.5","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc2","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.5","versionStartIncluding":"6.19","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc2","versionStartIncluding":"6.19","vulnerable":true}],"negate":false,"operator":"OR"}]}],"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":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"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."}]}],"providerMetadata":{"dateUpdated":"2026-11-22T11:09:33.041Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"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"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-99668","datePublished":"2026-11-20T05:50:18.124Z","dateReserved":"2026-09-25T10:25:14.428Z","dateUpdated":"2026-11-22T11:09:33.041Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-20 06:18:01","lastModifiedDate":"2026-11-22 11:17:05","problem_types":[],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"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","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":5.9}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"99668","Ordinal":"1","Title":"mm/huge_memory: fix zapping migration entries for device-private","CVE":"CVE-2026-99668","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"99668","Ordinal":"1","NoteData":"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 ]","Type":"Description","Title":"mm/huge_memory: fix zapping migration entries for device-private"}]}}}