{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "27e1f8273113adec0e98bf513e4091636b27cc2a"
            },
            {
              "fixed": "0af947ae4d91af0c6e9573220a1298cd8302b6c3"
            },
            {
              "fixed": "1f54708f40b8dea6951426ca567fc96160693388"
            },
            {
              "fixed": "fe2817e3d5ea347214342c9a5cd8bcbff20c0574"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "5.4.0"
            },
            {
              "fixed": "6.18.64"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.19.0"
            },
            {
              "fixed": "7.3.5"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99665.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/khugepaged: preserve dirty bits when collapsing PTE-mapped THPs\n\ntry_collapse_pte_mapped_thp() clears PTEs without transferring their dirty\nbits to the folio. A shmem read fault can map a clean folio writable, so\na later store only dirties the PTE. Losing that dirty bit allows reclaim\nto discard modified data.\n\nThe assumption that regular files are read-only is also obsolete since\ncommit 1b6444331bebb (\"mm/khugepaged: enable clean pagecache folio collapse\nfor writable files\"). In any case, transferring PTE dirty bits to the folio\nwhen removing mappings (and while the folio is still mapped) is the right\nthing to do.\n\nUse get_and_clear_ptes() to collect the dirty bits and mark the folio\ndirty before unmapping it. Update the comment.\n\nThis was reproduced with shmem using MADV_COLLAPSE followed by\nMADV_PAGEOUT.\n\nFix generated by an LLM and sent by Chris Mason in private.\n\n[ david: adjust comment; simplify description; cover file-thp as well ]",
  "id": "CVE-2026-99665",
  "modified": "2026-11-20T06:45:39.567199265Z",
  "published": "2026-11-20T05:50:15.647Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/0af947ae4d91af0c6e9573220a1298cd8302b6c3"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/1f54708f40b8dea6951426ca567fc96160693388"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/fe2817e3d5ea347214342c9a5cd8bcbff20c0574"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99665.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-99665"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "mm/khugepaged: preserve dirty bits when collapsing PTE-mapped THPs"
}