{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-99665",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-09-25T10:25:14.427Z",
        "datePublished": "2026-11-20T05:50:15.647Z",
        "dateUpdated": "2026-12-01T06:51:53.274Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-12-01T06:51:53.274Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "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 ]"
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "mm/khugepaged.c"
                    ],
                    "versions": [
                        {
                            "version": "27e1f8273113adec0e98bf513e4091636b27cc2a",
                            "lessThan": "6c464f31f20de4a402361b47aa1ed03c1c751ea7",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "27e1f8273113adec0e98bf513e4091636b27cc2a",
                            "lessThan": "6f27bc4072cd1b4c451056244595bf8d28185fd7",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "27e1f8273113adec0e98bf513e4091636b27cc2a",
                            "lessThan": "3e5e2c190539f360f48a98301f5ba3a0946ca093",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "27e1f8273113adec0e98bf513e4091636b27cc2a",
                            "lessThan": "0af947ae4d91af0c6e9573220a1298cd8302b6c3",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "27e1f8273113adec0e98bf513e4091636b27cc2a",
                            "lessThan": "1f54708f40b8dea6951426ca567fc96160693388",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "27e1f8273113adec0e98bf513e4091636b27cc2a",
                            "lessThan": "fe2817e3d5ea347214342c9a5cd8bcbff20c0574",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "mm/khugepaged.c"
                    ],
                    "versions": [
                        {
                            "version": "5.4",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "5.4",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.276",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.227",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.120",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.64",
                            "lessThanOrEqual": "6.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.3.5",
                            "lessThanOrEqual": "7.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.4-rc2",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.4",
                                    "versionEndExcluding": "5.10.276"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.4",
                                    "versionEndExcluding": "5.15.227"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.4",
                                    "versionEndExcluding": "6.12.120"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.4",
                                    "versionEndExcluding": "6.18.64"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.4",
                                    "versionEndExcluding": "7.3.5"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.4",
                                    "versionEndExcluding": "7.4-rc2"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/6c464f31f20de4a402361b47aa1ed03c1c751ea7"
                },
                {
                    "url": "https://git.kernel.org/stable/c/6f27bc4072cd1b4c451056244595bf8d28185fd7"
                },
                {
                    "url": "https://git.kernel.org/stable/c/3e5e2c190539f360f48a98301f5ba3a0946ca093"
                },
                {
                    "url": "https://git.kernel.org/stable/c/0af947ae4d91af0c6e9573220a1298cd8302b6c3"
                },
                {
                    "url": "https://git.kernel.org/stable/c/1f54708f40b8dea6951426ca567fc96160693388"
                },
                {
                    "url": "https://git.kernel.org/stable/c/fe2817e3d5ea347214342c9a5cd8bcbff20c0574"
                }
            ],
            "title": "mm/khugepaged: preserve dirty bits when collapsing PTE-mapped THPs",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}