Skip to content
Heist/ feed
Back to feed
UnratedFix available

mm/huge_memory: skip device-private PMDs in madvise_free_huge_pmd

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: mm/huge_memory: skip device-private PMDs in madvise_free_huge_pmd madvise_free_pte_range() checks pmd_trans_huge(*pmd) unlocked, then madvise_free_huge_pmd() takes pmd_trans_huge_lock(). pmd_is_huge() returns true for a device-private PMD, so orig_pmd can be device-private and enter the !pmd_present() branch. Skip device-private PMDs in that non-present branch and continue to out before calling pmd_folio(). Downgrade the check to VM_WARN_ON_ONCE() so an unexpected PMD softleaf logs a warning rather than panicking. Drop the thp_migration_supported() guard: it expands to IS_ENABLED(CONFIG_ARCH_SUPPORTS_PMD_SOFTLEAF), and both pmd_is_migration_entry() and pmd_is_device_private_entry() already return false when that config is not selected, so the guard suppresses only the case where the warning would already be silent. Potential trigger: an HMM-based GPU driver races with madvise(MADV_FREE): migrate_vma_pages() flips the PMD to a device-private entry between the caller's pmd_trans_huge() check and the callee's pmd_trans_huge_lock().

Products
Kernel
Affected versions
Not specified
Fixed versions
7.2.4
CVEs
CVE-2026-93218
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 16:49 UTC · Revision 1

Source evidence

mm/huge_memory: skip device-private PMDs in madvise_free_huge_pmd

core-osv · Original source

Published 24 Sept 2026, 15:10 UTC

In the Linux kernel, the following vulnerability has been resolved: mm/huge_memory: skip device-private PMDs in madvise_free_huge_pmd madvise_free_pte_range() checks pmd_trans_huge(*pmd) unlocked, then madvise_free_huge_pmd() takes pmd_trans_huge_lock(). pmd_is_huge() returns true for a device-private PMD, so orig_pmd can be device-private and enter the !pmd_present() branch. Skip device-private PMDs in that non-present branch and continue to out before calling pmd_folio(). Downgrade the check to VM_WARN_ON_ONCE() so an unexpected PMD softleaf logs a warning rather than panicking. Drop the thp_migration_supported() guard: it expands to IS_ENABLED(CONFIG_ARCH_SUPPORTS_PMD_SOFTLEAF), and both pmd_is_migration_entry() and pmd_is_device_private_entry() already return false when that config is not selected, so the guard suppresses only the case where the warning would already be silent. Potential trigger: an HMM-based GPU driver races with madvise(MADV_FREE): migrate_vma_pages() flips the PMD to a device-private entry between the caller's pmd_trans_huge() check and the callee's pmd_trans_huge_lock().

osv:CVE-2026-93218

Kernel

Fixed versions: 7.2.4

Complete source record
{
  "id": "e5ae2ac30fa95b2d089aea473b4640de4d6ac7a70168a589a9209b57013c290f",
  "url": "https://osv.dev/vulnerability/CVE-2026-93218",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "mm/huge_memory: skip device-private PMDs in madvise_free_huge_pmd",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: mm/huge_memory: skip device-private PMDs in madvise_free_huge_pmd madvise_free_pte_range() checks pmd_trans_huge(*pmd) unlocked, then madvise_free_huge_pmd() takes pmd_trans_huge_lock(). pmd_is_huge() returns true for a device-private PMD, so orig_pmd can be device-private and enter the !pmd_present() branch. Skip device-private PMDs in that non-present branch and continue to out before calling pmd_folio(). Downgrade the check to VM_WARN_ON_ONCE() so an unexpected PMD softleaf logs a warning rather than panicking. Drop the thp_migration_supported() guard: it expands to IS_ENABLED(CONFIG_ARCH_SUPPORTS_PMD_SOFTLEAF), and both pmd_is_migration_entry() and pmd_is_device_private_entry() already return false when that config is not selected, so the guard suppresses only the case where the warning would already be silent. Potential trigger: an HMM-based GPU driver races with madvise(MADV_FREE): migrate_vma_pages() flips the PMD to a device-private entry between the caller's pmd_trans_huge() check and the callee's pmd_trans_huge_lock().",
    "evidence": "osv:CVE-2026-93218",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "7.2.4",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2026-93218",
      "aliases": [
        "CVE-2026-93218"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "368076f52ebeecd33e10a9f80905d7508b6b6149"
                },
                {
                  "fixed": "5e3026bf736498115884d6c7bd0308ba29e0474c"
                },
                {
                  "fixed": "ce579dcf730ce5ed8043a5eeea18a3e6706a97e5"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-93218.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.19.0"
                },
                {
                  "fixed": "7.2.4"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-93218.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:37.418282230Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/5e3026bf736498115884d6c7bd0308ba29e0474c",
        "https://git.kernel.org/stable/c/ce579dcf730ce5ed8043a5eeea18a3e6706a97e5",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/93xxx/CVE-2026-93218.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-93218",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/93xxx/CVE-2026-93218.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-93218",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 504892,
  "published_at": "2026-09-24T15:10:41.37+00:00"
}