{
  "id": "CVE-2025-38084",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-38084",
  "published_at": "2025-06-28T07:44:25.379Z",
  "title": "mm/hugetlb: unshare page tables during VMA split, not before",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/hugetlb: unshare page tables during VMA split, not before\n\nCurrently, __split_vma() triggers hugetlb page table unsharing through\nvm_ops-\u003emay_split().  This happens before the VMA lock and rmap locks are\ntaken - which is too early, it allows racing VMA-locked page faults in our\nprocess and racing rmap walks from other processes to cause page tables to\nbe shared again before we actually perform the split.\n\nFix it by explicitly calling into the hugetlb unshare logic from\n__split_vma() in the same place where THP splitting also happens.  At that\npoint, both the VMA and the rmap(s) are write-locked.\n\nAn annoying detail is that we can now call into the helper\nhugetlb_unshare_pmds() from two different locking contexts:\n\n1. from hugetlb_split(), holding:\n    - mmap lock (exclusively)\n    - VMA lock\n    - file rmap lock (exclusively)\n2. hugetlb_unshare_all_pmds(), which I think is designed to be able to\n   call us with only the mmap lock held (in shared mode), but currently\n   only runs while holding mmap lock (exclusively) and VMA lock\n\nBackporting note:\nThis commit fixes a racy protection that was introduced in commit\nb30c14cd6102 (\"hugetlb: unshare some PMDs when splitting VMAs\"); that\ncommit claimed to fix an issue introduced in 5.13, but it should actually\nalso go all the way back.\n\n[jannh@google.com: v2]",
  "cpes": [
    "cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.8,
    "nvd": 5.5
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \u003c e8847d18cd9fff1edbb45e963d9141273c3b539c",
          "\u003e= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \u003c 366298f2b04d2bf1f2f2b7078405bdf9df9bd5d0",
          "\u003e= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \u003c 2511ac64bc1617ca716d3ba8464e481a647c1902",
          "\u003e= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \u003c af6cfcd0efb7f051af221c418ec8b37a10211947",
          "\u003e= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \u003c 9cf5b2a3b72c23fb7b84736d5d19ee6ea718762b",
          "\u003e= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \u003c 8a21d5584826f4880f45bbf8f72375f4e6c0ff2a",
          "\u003e= 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa, \u003c 081056dc00a27bccb55ccc3c6f230a3d5fd3f7e0"
        ],
        "fixed_in": [
          "e8847d18cd9fff1edbb45e963d9141273c3b539c",
          "366298f2b04d2bf1f2f2b7078405bdf9df9bd5d0",
          "2511ac64bc1617ca716d3ba8464e481a647c1902",
          "af6cfcd0efb7f051af221c418ec8b37a10211947",
          "9cf5b2a3b72c23fb7b84736d5d19ee6ea718762b",
          "8a21d5584826f4880f45bbf8f72375f4e6c0ff2a",
          "081056dc00a27bccb55ccc3c6f230a3d5fd3f7e0"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "2.6.20"
        ],
        "fixed_in": [
          "0",
          "5.10.239",
          "5.15.186",
          "6.1.142",
          "6.6.95",
          "6.12.35",
          "6.15.4",
          "6.16"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to e8847d18cd9fff1edbb45e963d9141273c3b539c or 366298f2b04d2bf1f2f2b7078405bdf9df9bd5d0 or 2511ac64bc1617ca716d3ba8464e481a647c1902 or af6cfcd0efb7f051af221c418ec8b37a10211947 or 9cf5b2a3b72c23fb7b84736d5d19ee6ea718762b or 8a21d5584826f4880f45bbf8f72375f4e6c0ff2a or 081056dc00a27bccb55ccc3c6f230a3d5fd3f7e0 or later.",
      "Upgrade Linux to 0 or 5.10.239 or 5.15.186 or 6.1.142 or 6.6.95 or 6.12.35 or 6.15.4 or 6.16 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
