{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-99667",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-09-25T10:25:14.428Z",
        "datePublished": "2026-11-20T05:50:17.274Z",
        "dateUpdated": "2026-11-22T11:09:31.836Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-11-22T11:09:31.836Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/khugepaged: always recheck the pmd in try_collapse_pte_mapped_thp()\n\ntry_collapse_pte_mapped_thp() drops the PTE lock after it has cleared the\npage table, and takes the PMD lock and the PTE lock to remove it.\n\nIn between, MADV_DONTNEED with CONFIG_PT_RECLAIM can reclaim the\npage table. The pmd_same() check is supposed to handle this, but it is\nonly done with CONFIG_SPLIT_PTE_PTLOCKS.\n\nFix it by performing the check unconditionally.\n\nFix generated by an LLM and sent by Josef Bacik in private.\n\n[ david: adjust description ]"
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 7,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - try_collapse_pte_mapped_thp() is reached by the caller's madvise(MADV_COLLAPSE) through do_madvise() -> madvise_collapse() -> collapse_single_pmd(), racing that process's madvise(MADV_DONTNEED) -> madvise_dontneed_single_vma() -> zap_pte_range() -> zap_empty_pte_table(). No remote protocol message carries the PMD.\nAC:H - pmd_same() is inside if (ptl != pml) and is skipped only when both locks are &mm->page_table_lock (!CONFIG_SPLIT_PTE_PTLOCKS). That option is def_bool y for SMP && NR_CPUS>=4 (x86_64_defconfig sets SMP; arm64 SMP is def_bool y, NR_CPUS default 512). The attacker can race the two madvise calls but cannot turn split locks off; zap_empty_pte_table() also needs CONFIG_PT_RECLAIM.\nPR:L - SYSCALL_DEFINE3(madvise) -> do_madvise() handles MADV_COLLAPSE and MADV_DONTNEED with no capable() check. An unprivileged process can memfd_create() and mmap a file whose VMA passes thp_vma_allowable_order(..., TVA_FORCED_COLLAPSE, PMD_ORDER).\nUI:N - The attacker creates the mapping and issues both madvise calls from its own threads. try_collapse_pte_mapped_thp() does not wait for another user to mount, open, or fault the range.\nS:U - The bad free is in the caller's page tables and the kernel allocator of the same kernel. It does not cross a KVM/Xen guest-to-host or IOMMU boundary.\nC:H - If zap_empty_pte_table() wins the window, pmd_clear() stores a zero PMD and the skipped pmd_same() lets pmdp_collapse_flush() return it. pte_free_defer(pmd_pgtable()) then __free_pages() pfn_to_page(0), so that reserved direct-map page can be allocated and its previous contents read.\nI:H - __free_pages(pfn_to_page(0)) returns a page x86 still direct-maps (set_memory_4k(__va(0))) and reserves (memblock_reserve(0, SZ_1M), the range real-mode trampoline memory is taken from). Reallocating it writes kernel-aliased memory: a buddy use-after-free of a live kernel page.\nA:H - pte_free_now() -> pagetable_dtor_free() -> __free_pages() on reserved pfn 0 hits bad_page() when check_pages_enabled (CONFIG_DEBUG_VM) and otherwise links that still-direct-mapped page onto the buddy freelist, so later reuse crashes or corrupts the kernel."
                        }
                    ]
                }
            ],
            "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": "6375e95f381e3dc85065b6f74263a61522736203",
                            "lessThan": "3f6b29ecde19cab035f59b65012bc9de9a45eccc",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "6375e95f381e3dc85065b6f74263a61522736203",
                            "lessThan": "9c766a46421509d5a2f46753be3964ae128bf938",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "6375e95f381e3dc85065b6f74263a61522736203",
                            "lessThan": "aa72cf34d90da7019591ab67533a8ece8b41da2d",
                            "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": "6.14",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.14",
                            "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": "6.14",
                                    "versionEndExcluding": "6.18.64"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.14",
                                    "versionEndExcluding": "7.3.5"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.14",
                                    "versionEndExcluding": "7.4-rc2"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/3f6b29ecde19cab035f59b65012bc9de9a45eccc"
                },
                {
                    "url": "https://git.kernel.org/stable/c/9c766a46421509d5a2f46753be3964ae128bf938"
                },
                {
                    "url": "https://git.kernel.org/stable/c/aa72cf34d90da7019591ab67533a8ece8b41da2d"
                }
            ],
            "title": "mm/khugepaged: always recheck the pmd in try_collapse_pte_mapped_thp()",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}