CVE-2024-39477: mm/hugetlb: do not call vma_add_reservation upon ENOMEM
In the Linux kernel, the following vulnerability has been resolved:
mm/hugetlb: do not call vma_add_reservation upon ENOMEM
sysbot reported a splat [1] on __unmap_hugepage_range(). This is because
vma_needs_reservation() can return -ENOMEM if
allocate_file_region_entries() fails to allocate the file_region struct
for the reservation.
Check for that and do not call vma_add_reservation() if that is the case,
otherwise region_abort() and region_del() will see that we do not have any
file_regions.
If we detect that vma_needs_reservation() returned -ENOMEM, we clear the
hugetlb_restore_reserve flag as if this reservation was still consumed, so
free_huge_folio() will not increment the resv count.
[1] https://lore.kernel.org/linux-mm/0000000000004096100617c58d54@google.com/T/#ma5983bc1ab18a54910da83416b3f89f3c7ee43aa
Security readout for executives and security teams
Plain-English summary
A Linux huge-page memory management flaw can corrupt reservation bookkeeping when memory allocation fails. A local, low-privileged user may be able to trigger serious confidentiality, integrity, or availability impact. The supplied evidence does not establish remote reachability or real-world exploitation.
Executive priority
Prioritize internet-facing multi-user systems, shared compute platforms, and hosts permitting untrusted local code. Patch through normal emergency kernel processes after compatibility testing. Lower priority may be reasonable where local execution is tightly controlled, but the high potential impact warrants prompt exposure confirmation.
Technical view
When vma_needs_reservation() returns -ENOMEM because a file_region allocation fails, vulnerable code still calls vma_add_reservation(). Later reservation cleanup encounters missing file-region records, producing an unmap failure. The kernel fix skips that call and clears hugetlb_restore_reserve so reservation counts remain consistent.
Likely exposure
Exposure requires a vulnerable Linux kernel and local authenticated access, with the affected hugetlb reservation path reachable. The bundle identifies the 6.9 development line through 6.10-related version data, but its exact range encoding is ambiguous. Confirm applicability through kernel or distribution guidance.
Exploitation context
The CVSS vector rates exploitation as local, low complexity, requiring low privileges, without user interaction. Potential confidentiality, integrity, and availability impacts are high. CISA KEV status is false, and the supplied sources provide no evidence of active exploitation.
Researcher notes
The issue was reported by syzbot as a failure in __unmap_hugepage_range(). The relevant error path begins when allocate_file_region_entries() cannot allocate a file_region structure. No CWE, proof of concept, confirmed exploit, or complete distribution-specific fixed-version matrix is supplied.
Mitigation direction
Apply the appropriate vendor or distribution kernel update containing the referenced fix.
Check vendor advisories because the supplied affected-version range is ambiguous.
Restrict untrusted local access until affected kernels are updated.
Follow vendor guidance for any temporary hugetlb-specific mitigation.
Validation and detection
Inventory running kernel versions across hosts, containers, and virtual-machine images.
Compare each kernel build against its distribution's CVE-2024-39477 advisory.
Verify the installed kernel includes the applicable referenced stable fix.
Reboot updated systems and confirm the running kernel matches the patched package.
Review kernel logs for hugetlb reservation or unmap failures.
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-2024-39477 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.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.