{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "717cf9357325055ab6b41c4e0581f4d67601eb58"
            },
            {
              "fixed": "ef619ce17a4a0f5f85649ced1ce96fe53737e4f3"
            },
            {
              "fixed": "90f2f099e69bfb341c714751369c36cf3a420f6c"
            },
            {
              "fixed": "50ee565c1e900e247e439e4139839b060c968343"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "6.17.0"
            },
            {
              "fixed": "6.18.64"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.19.0"
            },
            {
              "fixed": "7.3.4"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99923.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/memfd: fix hugetlb reservation accounting in error paths\n\nIf hugetlb_add_to_page_cache() in memfd_alloc_folio() fails with -EEXIST,\na concurrent fault has already instantiated the folio in the page cache,\nand the reservation now belongs to that folio.  Calling\nhugetlb_unreserve_pages() in that case incorrectly removes the region\nbacking the cached folio and releases one reservation more than it should,\nleaving that folio in the page cache with no region recording it.\n\nThat leaves resv_huge_pages one page short until that folio is removed\nfrom the page cache, so available_huge_pages() reports a page that is not\nactually free and the pool can grant one reservation more than it can\nback.  Applications using hugetlb memfds can then fail to allocate or\nfault in a page they already reserved.  They see -ENOMEM or -ENOSPC from\nthe allocation or fault path even though the reservation and\nHugePages_Free still look healthy.\n\nSo hold the hugetlb fault mutex from hugetlb_reserve_pages() until the\nerror-path unreserve completes to make the reserve, allocate and\ninstantiate steps atomic against concurrent faults.  With the mutex held\nfrom the start, a concurrent fault can no longer consume the reservation\nbetween reserve and allocate/instantiate.  If a fault completed before the\nmutex was taken, it has already added the region for that index, so\nhugetlb_reserve_pages() returns 0 and the error path leaves the region in\nplace.",
  "id": "CVE-2026-99923",
  "modified": "2026-12-01T20:46:06.477028902Z",
  "published": "2026-11-30T13:18:19.011Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/50ee565c1e900e247e439e4139839b060c968343"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/90f2f099e69bfb341c714751369c36cf3a420f6c"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/ef619ce17a4a0f5f85649ced1ce96fe53737e4f3"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99923.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-99923"
    },
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "mm/memfd: fix hugetlb reservation accounting in error paths"
}