# CVE-2026-99580: mm/userfaultfd: only allocate anon_vma in CoW mappings

Status: published. Published: 2026-11-20. Updated: 2026-11-22.

In the Linux kernel, the following vulnerability has been resolved:

mm/userfaultfd: only allocate anon_vma in CoW mappings

find_vma_and_prepare_anon() can end up allocating an anon_vma in VMAs that
are not CoW mappings, which is wrong.

If we have a MAP_SHARED R/O file mapped, we lack VM_SHARED (but do have
VM_MAYSHARE) and lack VM_MAYWRITE.

While uffd later rejects such mappings (uffd registration requires
VM_MAYWRITE, see comment in validate_dst_vma) find_vma_and_prepare_anon()
still wrongly allocates an anon vma before it validates the vma.

This in turn later confuses copy_page_range()->vma_needs_copy() such
that we end up calling copy_hugetlb_page_range() with ranges that
actually do not contain *any* per-pagetable information that would
require copying, which is the basis for PMD-table sharing in the first
place.

copy_hugetlb_page_range() should not have to worry about shared
PMD tables at all: it doesn't make any sense to copy page tables that are
shared, as they can be fully recreated later. Ending up in the function
with shareable page tables is the real issue.

If a destination PMD table is shared in copy_hugetlb_page_range(), it
might get concurrently unshared as we are not holding relevant
locks, resulting in us using a page table that is no longer mapped and
possibly freed after calling:

	dst_pte = huge_pte_alloc(dst, dst_vma, addr, sz);

To fix it, do not allocate an anon_vma in non-CoW mappings and add a
safety guard to copy_hugetlb_page_range(), making sure that we never
end up messing with shared PMD tables in there.

Before commit 867a43a34ff8a ("userfaultfd: use per-vma locks in userfaultfd
operations") we would always validate the VMA before allocating an
anon_vma, and consequently never wrongly allocate an anon_vma.

As uffd_lock_vma() is part of the same lookup machinery and
also contains a misleading VM_SHARED check, change that one as well
directly for consistency.

A follow-up cleanup will stop taking the hugetlb_vma_lock_read(src_vma)
lock in copy_hugetlb_page_range() entirely. Further, the usage of
VM_SHARED in userfaultfd code should be cleaned up later to focus on
CoW vs. non-CoW mappings.

## Remediation

No remediation reported in collected sources

## Affected products and versions

- Linux / Linux: ≥ 867a43a34ff8a38772212045262b2c9b77807ea3; < a90e7044b34f801fbafcb682e8ee827a6db26002 (affected, git); ≥ 867a43a34ff8a38772212045262b2c9b77807ea3; < 3bf446c8ce64938f86439906d730a2cd5c0b31e2 (affected, git); ≥ 867a43a34ff8a38772212045262b2c9b77807ea3; < 20704188d669ed74a624fd67dfa4711bcb1087b6 (affected, git); ≥ 867a43a34ff8a38772212045262b2c9b77807ea3; < 514c9247db305922591d806ec65d3c3fe420538d (affected, git). Source: CNA: Linux
- Linux / Linux: 6.9 (affected); ≥ 0; < 6.9 (unaffected, semver); ≥ 6.12.118; ≤ 6.12.* (unaffected, semver); ≥ 6.18.64; ≤ 6.18.* (unaffected, semver); ≥ 7.3.5; ≤ 7.3.* (unaffected, semver); ≥ 7.4-rc1; ≤ * (unaffected, original_commit_for_fix). Source: CNA: Linux

## Severity and prioritization

- CVSS 3.1: 7.8 (high); CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H; source: CNA: Linux

- CVSS 3.1: 7.8 (high); CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H; source: NVD: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

- CISA KEV: No listing in collected sources

- EPSS: 0.17% as of 2026-11-21; percentile 6.18%

- SSVC: Not available

- Weaknesses: Not reported

## Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

## References

- https://git.kernel.org/stable/c/a90e7044b34f801fbafcb682e8ee827a6db26002 (CNA: Linux)

- https://git.kernel.org/stable/c/3bf446c8ce64938f86439906d730a2cd5c0b31e2 (CNA: Linux)

- https://git.kernel.org/stable/c/20704188d669ed74a624fd67dfa4711bcb1087b6 (CNA: Linux)

- https://git.kernel.org/stable/c/514c9247db305922591d806ec65d3c3fe420538d (CNA: Linux)

- https://git.kernel.org/stable/c/20704188d669ed74a624fd67dfa4711bcb1087b6 (416baaa9-dc9f-4396-8d5f-8c081fb06d67)

- https://git.kernel.org/stable/c/3bf446c8ce64938f86439906d730a2cd5c0b31e2 (416baaa9-dc9f-4396-8d5f-8c081fb06d67)

- https://git.kernel.org/stable/c/514c9247db305922591d806ec65d3c3fe420538d (416baaa9-dc9f-4396-8d5f-8c081fb06d67)

- https://git.kernel.org/stable/c/a90e7044b34f801fbafcb682e8ee827a6db26002 (416baaa9-dc9f-4396-8d5f-8c081fb06d67)

## Provenance

- CNA: Linux: https://www.cve.org/CVERecord?id=CVE-2026-99580; retrieved 2026-11-22; source updated 2026-11-22

- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-99580; retrieved 2026-11-22; source updated 2026-11-22

- FIRST EPSS: https://api.first.org/data/v1/epss?cve=CVE-2026-99580; retrieved 2026-11-22; source updated Not reported

Revision: dc4ae5b709b3f8a8d723522e7eed1c1d9db573de13d1e99f908f44bba40e6bd1

Canonical: https://y2.dev/cve/CVE-2026-99580

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.