CVE-2026-99580
mm/userfaultfd: only allocate anon_vma in CoW mappings
Check your servers for CVE-2026-99580
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-99580 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
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.
Severity (CVSS)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.16%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 3.10% of all scored CVEs. Scores of 29 Nov 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 867a43a34ff8a38772212045262b2c9b77807ea3, before a90e7044b34f801fbafcb682e8ee827a6db26002 affected from 867a43a34ff8a38772212045262b2c9b77807ea3, before 3bf446c8ce64938f86439906d730a2cd5c0b31e2 affected from 867a43a34ff8a38772212045262b2c9b77807ea3, before 20704188d669ed74a624fd67dfa4711bcb1087b6 affected from 867a43a34ff8a38772212045262b2c9b77807ea3, before 514c9247db305922591d806ec65d3c3fe420538d
Other versions: unaffected
|
| Linux |
affected 6.9 unaffected before 6.9 unaffected from 6.12.118 up to and including 6.12.* unaffected from 6.18.64 up to and including 6.18.* unaffected from 7.3.5 up to and including 7.3.* unaffected 7.4-rc1 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-99580 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-99580
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-99580
trivy image --scanners vuln IMAGE | grep CVE-2026-99580
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/a90e7044b34f801fbafcb682e8ee827a6db26002 git.kernel.org
- https://git.kernel.org/stable/c/3bf446c8ce64938f86439906d730a2cd5c0b31e2 git.kernel.org
- https://git.kernel.org/stable/c/20704188d669ed74a624fd67dfa4711bcb1087b6 git.kernel.org
- https://git.kernel.org/stable/c/514c9247db305922591d806ec65d3c3fe420538d git.kernel.org
Source: the record CVE-2026-99580 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse