{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-99918",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-09-25T10:25:14.445Z",
        "datePublished": "2026-11-30T13:18:16.236Z",
        "dateUpdated": "2026-11-30T13:18:16.236Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-11-30T13:18:16.236Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/madvise: atomically clear the young bit on THP MADV_COLD\n\nAs-is, madvise_cold_or_pageout_pte_range() discards the hardware young bit\nby invalidating the PMD, doing pmd_mkold() and subsequently writing to the\npmd again.  However, it does so in a racy manner, looking at a\npossibly-stale snapshot.  It's entirely possible that a write elsewhere\nset the hardware D bit, which this logic now loses.\n\nFix it by using pmdp_test_and_clear_young().  This is an atomic\nmodification of the PMD entry, and thus safe against any possible racing\nwrites.  As a (nice) side-effect, this elides one non-required TLB flush\nin pmdp_invalidate().\n\nThis bug can interact with the swapping system in complicated ways,\nleading to data loss.  For instance, if a folio is marked lazyfree, but\nwas later read from, and then MADV_COLD'd while racing a write to that\nsame THP, dropping the dirty bit may lead to data loss as\nreclaim/MADV_PAGEOUT drops the \"clean\" anon folio:\n\nT0                                T1\n================================================================\nMADV_FREE(thp)\t\t\t|\n  folio marked lazyfree\t\t|\nread(thp)\t\t\t|\n  PMD marked young by hardware\t|\n\t\t\t\t| MADV_COLD(thp)\nwrite(thp)\t\t\t|   if (pmd_young(pmd)) {\n  PMD marked dirty by hardware\t|     set(pmdp, pmd_mkold(pmd));\nMADV_PAGEOUT/reclaim\t\t|\n  dirty bit may or may not be   |\n  set\t\t\t\t|\n    reclaim/pageout may drop    |\n    the folio\t\t\t|"
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "mm/madvise.c"
                    ],
                    "versions": [
                        {
                            "version": "9c276cc65a58faf98be8e56962745ec99ab87636",
                            "lessThan": "9eeed293486a5389bc07232613ed57e875c5bdd8",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "9c276cc65a58faf98be8e56962745ec99ab87636",
                            "lessThan": "17ee2edd085250973eb00cbd98c8b2e0f1a64eda",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "9c276cc65a58faf98be8e56962745ec99ab87636",
                            "lessThan": "fe34430e1f0c5788160508da2265d904c6afab83",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "9c276cc65a58faf98be8e56962745ec99ab87636",
                            "lessThan": "be48a2b1253655b4f4fdde4c950ff5c87f2ec51a",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "9c276cc65a58faf98be8e56962745ec99ab87636",
                            "lessThan": "866940b1ccbf8061528986484eac73e44f8a1c52",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "9c276cc65a58faf98be8e56962745ec99ab87636",
                            "lessThan": "be6be6707c2953dc4ee979e7e4605fe436d87429",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "9c276cc65a58faf98be8e56962745ec99ab87636",
                            "lessThan": "5a4d557c02049f75c260dd5492c6e1961e49e77e",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "9c276cc65a58faf98be8e56962745ec99ab87636",
                            "lessThan": "246c8cc33438a71c28f9b86baa492d9a0a130316",
                            "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/madvise.c"
                    ],
                    "versions": [
                        {
                            "version": "5.4",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "5.4",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.275",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.226",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.193",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.163",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.117",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.63",
                            "lessThanOrEqual": "6.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.3.4",
                            "lessThanOrEqual": "7.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.4-rc1",
                            "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.275"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.4",
                                    "versionEndExcluding": "5.15.226"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.4",
                                    "versionEndExcluding": "6.1.193"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.4",
                                    "versionEndExcluding": "6.6.163"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.4",
                                    "versionEndExcluding": "6.12.117"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.4",
                                    "versionEndExcluding": "6.18.63"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.4",
                                    "versionEndExcluding": "7.3.4"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.4",
                                    "versionEndExcluding": "7.4-rc1"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/9eeed293486a5389bc07232613ed57e875c5bdd8"
                },
                {
                    "url": "https://git.kernel.org/stable/c/17ee2edd085250973eb00cbd98c8b2e0f1a64eda"
                },
                {
                    "url": "https://git.kernel.org/stable/c/fe34430e1f0c5788160508da2265d904c6afab83"
                },
                {
                    "url": "https://git.kernel.org/stable/c/be48a2b1253655b4f4fdde4c950ff5c87f2ec51a"
                },
                {
                    "url": "https://git.kernel.org/stable/c/866940b1ccbf8061528986484eac73e44f8a1c52"
                },
                {
                    "url": "https://git.kernel.org/stable/c/be6be6707c2953dc4ee979e7e4605fe436d87429"
                },
                {
                    "url": "https://git.kernel.org/stable/c/5a4d557c02049f75c260dd5492c6e1961e49e77e"
                },
                {
                    "url": "https://git.kernel.org/stable/c/246c8cc33438a71c28f9b86baa492d9a0a130316"
                }
            ],
            "title": "mm/madvise: atomically clear the young bit on THP MADV_COLD",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}