{"api_version":"1","generated_at":"2026-11-30T19:28:12+00:00","cve":"CVE-2026-99580","urls":{"html":"https://cve.report/CVE-2026-99580","api":"https://cve.report/api/cve/CVE-2026-99580.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-99580","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-99580"},"summary":{"title":"mm/userfaultfd: only allocate anon_vma in CoW mappings","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/userfaultfd: only allocate anon_vma in CoW mappings\n\nfind_vma_and_prepare_anon() can end up allocating an anon_vma in VMAs that\nare not CoW mappings, which is wrong.\n\nIf we have a MAP_SHARED R/O file mapped, we lack VM_SHARED (but do have\nVM_MAYSHARE) and lack VM_MAYWRITE.\n\nWhile uffd later rejects such mappings (uffd registration requires\nVM_MAYWRITE, see comment in validate_dst_vma) find_vma_and_prepare_anon()\nstill wrongly allocates an anon vma before it validates the vma.\n\nThis in turn later confuses copy_page_range()->vma_needs_copy() such\nthat we end up calling copy_hugetlb_page_range() with ranges that\nactually do not contain *any* per-pagetable information that would\nrequire copying, which is the basis for PMD-table sharing in the first\nplace.\n\ncopy_hugetlb_page_range() should not have to worry about shared\nPMD tables at all: it doesn't make any sense to copy page tables that are\nshared, as they can be fully recreated later. Ending up in the function\nwith shareable page tables is the real issue.\n\nIf a destination PMD table is shared in copy_hugetlb_page_range(), it\nmight get concurrently unshared as we are not holding relevant\nlocks, resulting in us using a page table that is no longer mapped and\npossibly freed after calling:\n\n\tdst_pte = huge_pte_alloc(dst, dst_vma, addr, sz);\n\nTo fix it, do not allocate an anon_vma in non-CoW mappings and add a\nsafety guard to copy_hugetlb_page_range(), making sure that we never\nend up messing with shared PMD tables in there.\n\nBefore commit 867a43a34ff8a (\"userfaultfd: use per-vma locks in userfaultfd\noperations\") we would always validate the VMA before allocating an\nanon_vma, and consequently never wrongly allocate an anon_vma.\n\nAs uffd_lock_vma() is part of the same lookup machinery and\nalso contains a misleading VM_SHARED check, change that one as well\ndirectly for consistency.\n\nA follow-up cleanup will stop taking the hugetlb_vma_lock_read(src_vma)\nlock in copy_hugetlb_page_range() entirely. Further, the usage of\nVM_SHARED in userfaultfd code should be cleaned up later to focus on\nCoW vs. non-CoW mappings.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-20 06:17:49","updated_at":"2026-11-22 11:16:57"},"problem_types":[],"metrics":[{"version":"3.1","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"references":[{"url":"https://git.kernel.org/stable/c/20704188d669ed74a624fd67dfa4711bcb1087b6","name":"https://git.kernel.org/stable/c/20704188d669ed74a624fd67dfa4711bcb1087b6","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/3bf446c8ce64938f86439906d730a2cd5c0b31e2","name":"https://git.kernel.org/stable/c/3bf446c8ce64938f86439906d730a2cd5c0b31e2","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/a90e7044b34f801fbafcb682e8ee827a6db26002","name":"https://git.kernel.org/stable/c/a90e7044b34f801fbafcb682e8ee827a6db26002","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/514c9247db305922591d806ec65d3c3fe420538d","name":"https://git.kernel.org/stable/c/514c9247db305922591d806ec65d3c3fe420538d","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-99580","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99580","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 867a43a34ff8a38772212045262b2c9b77807ea3 a90e7044b34f801fbafcb682e8ee827a6db26002 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 867a43a34ff8a38772212045262b2c9b77807ea3 3bf446c8ce64938f86439906d730a2cd5c0b31e2 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 867a43a34ff8a38772212045262b2c9b77807ea3 20704188d669ed74a624fd67dfa4711bcb1087b6 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 867a43a34ff8a38772212045262b2c9b77807ea3 514c9247db305922591d806ec65d3c3fe420538d git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.9","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.9 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.118 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.64 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.5 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2026","cve_id":"99580","cve":"CVE-2026-99580","epss":"0.001630000","percentile":"0.054830000","score_date":"2026-11-23","updated_at":"2026-11-24 00:07:47"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["mm/hugetlb.c","mm/userfaultfd.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"a90e7044b34f801fbafcb682e8ee827a6db26002","status":"affected","version":"867a43a34ff8a38772212045262b2c9b77807ea3","versionType":"git"},{"lessThan":"3bf446c8ce64938f86439906d730a2cd5c0b31e2","status":"affected","version":"867a43a34ff8a38772212045262b2c9b77807ea3","versionType":"git"},{"lessThan":"20704188d669ed74a624fd67dfa4711bcb1087b6","status":"affected","version":"867a43a34ff8a38772212045262b2c9b77807ea3","versionType":"git"},{"lessThan":"514c9247db305922591d806ec65d3c3fe420538d","status":"affected","version":"867a43a34ff8a38772212045262b2c9b77807ea3","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["mm/hugetlb.c","mm/userfaultfd.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.9"},{"lessThan":"6.9","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.118","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.64","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.5","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.118","versionStartIncluding":"6.9","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.64","versionStartIncluding":"6.9","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.5","versionStartIncluding":"6.9","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"6.9","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/userfaultfd: only allocate anon_vma in CoW mappings\n\nfind_vma_and_prepare_anon() can end up allocating an anon_vma in VMAs that\nare not CoW mappings, which is wrong.\n\nIf we have a MAP_SHARED R/O file mapped, we lack VM_SHARED (but do have\nVM_MAYSHARE) and lack VM_MAYWRITE.\n\nWhile uffd later rejects such mappings (uffd registration requires\nVM_MAYWRITE, see comment in validate_dst_vma) find_vma_and_prepare_anon()\nstill wrongly allocates an anon vma before it validates the vma.\n\nThis in turn later confuses copy_page_range()->vma_needs_copy() such\nthat we end up calling copy_hugetlb_page_range() with ranges that\nactually do not contain *any* per-pagetable information that would\nrequire copying, which is the basis for PMD-table sharing in the first\nplace.\n\ncopy_hugetlb_page_range() should not have to worry about shared\nPMD tables at all: it doesn't make any sense to copy page tables that are\nshared, as they can be fully recreated later. Ending up in the function\nwith shareable page tables is the real issue.\n\nIf a destination PMD table is shared in copy_hugetlb_page_range(), it\nmight get concurrently unshared as we are not holding relevant\nlocks, resulting in us using a page table that is no longer mapped and\npossibly freed after calling:\n\n\tdst_pte = huge_pte_alloc(dst, dst_vma, addr, sz);\n\nTo fix it, do not allocate an anon_vma in non-CoW mappings and add a\nsafety guard to copy_hugetlb_page_range(), making sure that we never\nend up messing with shared PMD tables in there.\n\nBefore commit 867a43a34ff8a (\"userfaultfd: use per-vma locks in userfaultfd\noperations\") we would always validate the VMA before allocating an\nanon_vma, and consequently never wrongly allocate an anon_vma.\n\nAs uffd_lock_vma() is part of the same lookup machinery and\nalso contains a misleading VM_SHARED check, change that one as well\ndirectly for consistency.\n\nA follow-up cleanup will stop taking the hugetlb_vma_lock_read(src_vma)\nlock in copy_hugetlb_page_range() entirely. Further, the usage of\nVM_SHARED in userfaultfd code should be cleaned up later to focus on\nCoW vs. non-CoW mappings."}],"metrics":[{"cvssV3_1":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"scenarios":[{"lang":"en","value":"AV:L - UFFDIO_ZEROPAGE reaches find_vma_and_prepare_anon() through userfaultfd_ioctl(), userfaultfd_zeropage(), mfill_atomic(), and uffd_mfill_lock() on the caller's mm. mmap() of an O_RDONLY hugetlb file clears VM_SHARED and VM_MAYWRITE in mm/mmap.c while leaving VM_MAYSHARE; no received packet supplies that VMA.\nAC:L - The attacker reopens the hugetlb fd O_RDONLY, faults a PUD-spanning MAP_SHARED|MAP_NORESERVE VMA so huge_pmd_share() can attach a PMD, then races fork() with another of their processes' munmap(). dup_mmap() holds the forking mm's mmap_lock and hugetlb_vma_lock_read(src_vma); the other process's huge_pmd_unshare() takes the inode i_mmap write lock, which huge_pmd_share() has already dropped.\nPR:L - find_vma_and_prepare_anon() calls anon_vma_prepare() before validate_dst_vma() sees that the VMA has no uffd context. userfaultfd_syscall_allowed() accepts UFFD_USER_MODE_ONLY with no CAP_SYS_PTRACE, and hugetlb_file_setup(HUGETLB_ANONHUGE_INODE) does not call can_do_hugetlb_shm().\nUI:N - The attacker mmaps its own O_RDONLY hugetlb VMA, calls UFFDIO_ZEROPAGE so anon_vma_prepare() runs before validate_dst_vma() rejects it, then forks while its other process unmaps the sharer. No other user mounts or opens the file.\nS:U - set_huge_pte_at() in copy_hugetlb_page_range() corrupts a page-table page in the forking host's kernel. The result stays in that kernel security authority.\nC:H - vma_needs_copy() follows the stray anon_vma into copy_hugetlb_page_range(). After huge_pmd_unshare() pud_clears the shared PMD, the last mapper's free_pmd_range() frees it via pmd_free_tlb() and ___pmd_free_tlb(), and the copy still reads ptdesc->pt_share_count and huge_ptep_get(dst_pte) on the reused page.\nI:H - huge_pte_lock() takes the split PMD ptl inside that freed page, and set_huge_pte_at() stores the source huge PTE through the same dst_pte. Reclaiming the page as a page table or a slab object turns those stores into a kernel write.\nA:H - huge_pte_lock() and set_huge_pte_at() run after ___pmd_free_tlb() has returned the PMD page to the allocator. Locking a reused spinlock or writing a recycled page table oopses or hangs the kernel, and the attacker can repeat the fork against a new sharer."}]}],"providerMetadata":{"dateUpdated":"2026-11-22T11:09:02.427Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/a90e7044b34f801fbafcb682e8ee827a6db26002"},{"url":"https://git.kernel.org/stable/c/3bf446c8ce64938f86439906d730a2cd5c0b31e2"},{"url":"https://git.kernel.org/stable/c/20704188d669ed74a624fd67dfa4711bcb1087b6"},{"url":"https://git.kernel.org/stable/c/514c9247db305922591d806ec65d3c3fe420538d"}],"title":"mm/userfaultfd: only allocate anon_vma in CoW mappings","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-99580","datePublished":"2026-11-20T05:49:12.114Z","dateReserved":"2026-09-25T10:25:14.423Z","dateUpdated":"2026-11-22T11:09:02.427Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-20 06:17:49","lastModifiedDate":"2026-11-22 11:16:57","problem_types":[],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":5.9}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"99580","Ordinal":"1","Title":"mm/userfaultfd: only allocate anon_vma in CoW mappings","CVE":"CVE-2026-99580","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"99580","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/userfaultfd: only allocate anon_vma in CoW mappings\n\nfind_vma_and_prepare_anon() can end up allocating an anon_vma in VMAs that\nare not CoW mappings, which is wrong.\n\nIf we have a MAP_SHARED R/O file mapped, we lack VM_SHARED (but do have\nVM_MAYSHARE) and lack VM_MAYWRITE.\n\nWhile uffd later rejects such mappings (uffd registration requires\nVM_MAYWRITE, see comment in validate_dst_vma) find_vma_and_prepare_anon()\nstill wrongly allocates an anon vma before it validates the vma.\n\nThis in turn later confuses copy_page_range()->vma_needs_copy() such\nthat we end up calling copy_hugetlb_page_range() with ranges that\nactually do not contain *any* per-pagetable information that would\nrequire copying, which is the basis for PMD-table sharing in the first\nplace.\n\ncopy_hugetlb_page_range() should not have to worry about shared\nPMD tables at all: it doesn't make any sense to copy page tables that are\nshared, as they can be fully recreated later. Ending up in the function\nwith shareable page tables is the real issue.\n\nIf a destination PMD table is shared in copy_hugetlb_page_range(), it\nmight get concurrently unshared as we are not holding relevant\nlocks, resulting in us using a page table that is no longer mapped and\npossibly freed after calling:\n\n\tdst_pte = huge_pte_alloc(dst, dst_vma, addr, sz);\n\nTo fix it, do not allocate an anon_vma in non-CoW mappings and add a\nsafety guard to copy_hugetlb_page_range(), making sure that we never\nend up messing with shared PMD tables in there.\n\nBefore commit 867a43a34ff8a (\"userfaultfd: use per-vma locks in userfaultfd\noperations\") we would always validate the VMA before allocating an\nanon_vma, and consequently never wrongly allocate an anon_vma.\n\nAs uffd_lock_vma() is part of the same lookup machinery and\nalso contains a misleading VM_SHARED check, change that one as well\ndirectly for consistency.\n\nA follow-up cleanup will stop taking the hugetlb_vma_lock_read(src_vma)\nlock in copy_hugetlb_page_range() entirely. Further, the usage of\nVM_SHARED in userfaultfd code should be cleaned up later to focus on\nCoW vs. non-CoW mappings.","Type":"Description","Title":"mm/userfaultfd: only allocate anon_vma in CoW mappings"}]}}}