{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-138899","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-11-30T13:22:15.902Z","datePublished":"2026-11-30T13:26:01.377Z","dateUpdated":"2026-11-30T13:26:01.377Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-11-30T13:26:01.377Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/huge_memory: skip zone device folios in madvise_free_huge_pmd()\n\nPatch series \"mm: reject zone device folios in more folio walkers\", v2.\n\nSeveral LRU-oriented mm walkers resolve the folio backing a PMD entry (or\na physical pfn) and then reclaim, age, migrate, or lazyfree it without\never checking for ZONE_DEVICE memory.\n\nThis series adds missing folio_is_zone_device() rejections, matching the\nchecks that comparable walkers already perform.\n\n- mm/huge_memory, mm/madvise: the !pmd_present branch above these sites\n  only filters device-private entries (which are non-present).\n\n  A present zone device PMD (e.g. device-coherent) would still reach the\n  folio and be lazyfreed / aged / paged out. Add an explicit check.\n\n- mm/mempolicy: queue_folios_pmd() can see a present zone device PMD\n  (e.g. device-coherent) and queue it for migration.\n\nNo crash reproducer - this is a correctness/hardening cleanup found by\ninspection.  All checks are placed after the folio is resolved and before\nit is acted upon, on paths that already hold the relevant page-table lock,\nso no locking or refcount changes are involved.\n\n\nThis patch (of 3):\n\nmadvise_free_huge_pmd() resolves the folio backing a PMD via pmd_folio()\nand marks it lazyfree without checking for zone device memory.\n\nThe surrounding guards do not cover every zone device case:\n\n - MADV_FREE only operates on anonymous VMAs (DAX mappings are excluded)\n\n - !pmd_present() branch rejects device-private and migration entries\n\n - present zone device PMD (device coherent THP) is not filtered.\n   Unlike vm_normal_page_pmd(), it performs no special/pfnmap check,\n   and would be marked lazyfree here.\n\nBail out when the folio is a zone device folio."}],"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":"a30b48bf1b244f11bf9b6d20cdccfe0c2264130c","lessThan":"79b8838922c0f2eb2a7e58b5b4185d9d92992fed","status":"affected","versionType":"git"},{"version":"a30b48bf1b244f11bf9b6d20cdccfe0c2264130c","lessThan":"3a09df924fa2ba75ac80acb9bce4eed79be218fa","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.4","lessThanOrEqual":"7.3.*","status":"unaffected","versionType":"semver"},{"version":"7.4-rc1","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.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.19","versionEndExcluding":"7.4-rc1"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/79b8838922c0f2eb2a7e58b5b4185d9d92992fed"},{"url":"https://git.kernel.org/stable/c/3a09df924fa2ba75ac80acb9bce4eed79be218fa"}],"title":"mm/huge_memory: skip zone device folios in madvise_free_huge_pmd()","x_generator":{"engine":"bippy-1.2.0"}}}}