CVE-2021-47214: hugetlb, userfaultfd: fix reservation restore on userfaultfd error
In the Linux kernel, the following vulnerability has been resolved:
hugetlb, userfaultfd: fix reservation restore on userfaultfd error
Currently in the is_continue case in hugetlb_mcopy_atomic_pte(), if we
bail out using "goto out_release_unlock;" in the cases where idx >=
size, or !huge_pte_none(), the code will detect that new_pagecache_page
== false, and so call restore_reserve_on_error(). In this case I see
restore_reserve_on_error() delete the reservation, and the following
call to remove_inode_hugepages() will increment h->resv_hugepages
causing a 100% reproducible leak.
We should treat the is_continue case similar to adding a page into the
pagecache and set new_pagecache_page to true, to indicate that there is
no reservation to restore on the error path, and we need not call
restore_reserve_on_error(). Rename new_pagecache_page to
page_in_pagecache to make that clear.
Security readout for executives and security teams
Plain-English summary
This Linux kernel flaw can mishandle huge-page reservation accounting when a userfaultfd operation errors. The described outcome is a reproducible reservation leak, which can affect host resource accounting and reliability rather than exposing data directly in the provided record.
Executive priority
Treat as a kernel reliability issue with incomplete severity data. Prioritize patching where affected kernels support critical workloads, virtualization, databases, or memory-heavy services.
Technical view
CVE-2021-47214 concerns hugetlb_mcopy_atomic_pte() in the hugetlb and userfaultfd path. In the is_continue case, error handling could call restore_reserve_on_error() even though no reservation should be restored, leading to incorrect h->resv_hugepages accounting. The kernel fix treats that path as page-in-pagecache behavior.
Likely exposure
Exposure appears limited to Linux systems running affected kernel versions listed in the CVE record and exercising hugetlb/userfaultfd paths. Distribution backports may change exposure, so kernel package advisory mapping is required.
Exploitation context
The source bundle does not report active exploitation, public exploit availability, or CISA KEV listing. It describes a reproducible leak in a kernel error path, but does not provide business-impact evidence beyond resource accounting failure.
Researcher notes
The record names no CWE, CVSS, or exploit status. Analysis should focus on confirming affected kernel lineage and whether the stable commits are present, not assuming privilege escalation or remote reachability.
Mitigation direction
Check vendor or distribution advisories for CVE-2021-47214 kernel fixes.
Update affected Linux kernels to versions containing the referenced stable fixes.
Prioritize hosts using huge pages, userfaultfd, or memory-intensive workloads.
Track this through standard kernel patch management if exposure is uncertain.
Validation and detection
Inventory Linux kernel versions across servers, containers hosts, and appliances.
Map distro kernel builds to the upstream stable commits in the references.
Review whether hugetlb and userfaultfd are used on exposed systems.
Confirm patched systems include the corrected hugetlb/userfaultfd reservation handling.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2021-47214 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.