{
  "id": "CVE-2025-38447",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-38447",
  "published_at": "2025-07-25T15:27:29.36Z",
  "title": "mm/rmap: fix potential out-of-bounds page table access during batched unmap",
  "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/rmap: fix potential out-of-bounds page table access during batched unmap\n\nAs pointed out by David[1], the batched unmap logic in\ntry_to_unmap_one() may read past the end of a PTE table when a large\nfolio's PTE mappings are not fully contained within a single page\ntable.\n\nWhile this scenario might be rare, an issue triggerable from userspace\nmust be fixed regardless of its likelihood.  This patch fixes the\nout-of-bounds access by refactoring the logic into a new helper,\nfolio_unmap_pte_batch().\n\nThe new helper correctly calculates the safe batch size by capping the\nscan at both the VMA and PMD boundaries.  To simplify the code, it also\nsupports partial batching (i.e., any number of pages from 1 up to the\ncalculated safe maximum), as there is no strong reason to special-case\nfor fully mapped folios.",
  "cwe": "CWE-125",
  "cpes": [
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.16:rc1:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.16:rc2:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.16:rc3:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.16:rc4:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.16:rc5:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.8,
    "nvd": 7.1
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 354dffd29575cdf13154e8fb787322354aa9efc4, \u003c 510fe9c15d07e765d96be9a9dc37e5057c6c09f4",
          "\u003e= 354dffd29575cdf13154e8fb787322354aa9efc4, \u003c ddd05742b45b083975a0855ef6ebbf88cf1f532a"
        ],
        "fixed_in": [
          "510fe9c15d07e765d96be9a9dc37e5057c6c09f4",
          "ddd05742b45b083975a0855ef6ebbf88cf1f532a"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "6.15"
        ],
        "fixed_in": [
          "0",
          "6.15.7",
          "6.16"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 510fe9c15d07e765d96be9a9dc37e5057c6c09f4 or ddd05742b45b083975a0855ef6ebbf88cf1f532a or later.",
      "Upgrade Linux to 0 or 6.15.7 or 6.16 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
