CVE-2024-49964: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: mm/hugetlb: fix memfd_pin_folios free_huge_pages leak memfd_pin_folios followed by unpin_folios fails to restore free_huge_pages if the pages were not already faulted in, because the folio refcount for pages created by memfd_alloc_folio never goes to 0. memfd_pin_folios needs another folio_put to undo the folio_try_get below: memfd_alloc_folio() alloc_hugetlb_folio_nodemask() dequeue_hugetlb_folio_nodemask() dequeue_hugetlb_folio_node_exact() folio_ref_unfreeze(folio, 1); ; adds 1 refcount folio_try_get() ; adds 1 refcount hugetlb_add_to_page_cache() ; adds 512 refcount (on x86) With the fix, after memfd_pin_folios + unpin_folios, the refcount for the (unfaulted) page is 512, which is correct, as the refcount for a faulted unpinned page is 513.
AI Analysis
Technical Summary
CVE-2024-49964 is a vulnerability identified in the Linux kernel's memory management subsystem, specifically within the huge page handling code (mm/hugetlb). The issue arises from an incorrect reference count management in the functions memfd_pin_folios and unpin_folios that handle huge pages allocated via memfd_alloc_folio. The vulnerability is due to a missing decrement of the folio reference count after memfd_pin_folios calls folio_try_get, which increments the reference count. Without this decrement, the reference count for certain huge pages never returns to the correct value, causing a leak of free huge pages. This leak occurs because the folio reference count for pages created by memfd_alloc_folio never reaches zero, preventing the system from reclaiming these pages properly. The fix involves adding an additional folio_put call to balance the earlier folio_try_get, ensuring that after pinning and unpinning, the reference count reflects the correct number of references (512 on x86 architectures for unfaulted pages). This vulnerability does not appear to have known exploits in the wild and does not have an assigned CVSS score yet. The root cause is a subtle memory management bug that could lead to resource exhaustion over time if exploited or triggered, potentially degrading system performance or causing denial of service due to depletion of huge pages. The affected versions are specific Linux kernel commits identified by their hashes, indicating this is a recent and targeted fix in the kernel source code.
Potential Impact
For European organizations, the impact of CVE-2024-49964 primarily concerns systems running Linux kernels with the affected versions, especially those heavily utilizing huge pages for performance optimization, such as in high-performance computing, database servers, or virtualization hosts. The leak of free huge pages can lead to gradual resource exhaustion, causing system instability, degraded performance, or denial of service conditions. This can disrupt critical services, particularly in sectors like finance, telecommunications, research institutions, and cloud service providers prevalent in Europe. Since huge pages are often used to optimize memory-intensive applications, the vulnerability could indirectly affect the availability and reliability of enterprise applications and infrastructure. Although no active exploitation is known, the vulnerability could be leveraged in multi-tenant environments or by malicious insiders to degrade system performance or cause outages. The impact on confidentiality and integrity is minimal as the vulnerability relates to resource management rather than direct code execution or privilege escalation. However, availability impact is significant in environments where huge pages are critical for workload performance.
Mitigation Recommendations
European organizations should prioritize updating their Linux kernels to the fixed versions that include the patch for CVE-2024-49964. Since the vulnerability is in the kernel memory management, applying vendor-provided kernel updates or patches is the most effective mitigation. For environments where immediate patching is not feasible, monitoring huge page usage and system memory metrics can help detect abnormal resource depletion early. Administrators should audit systems that use memfd-based huge page allocations and consider limiting or isolating workloads that heavily rely on huge pages until patched. Additionally, implementing strict access controls and monitoring for unusual memory management operations can reduce the risk of exploitation. Organizations using containerized or virtualized environments should ensure that host kernels are patched, as containerized workloads share the kernel. Finally, maintaining robust incident response plans to address potential denial of service scenarios caused by resource exhaustion is recommended.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain
CVE-2024-49964: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: mm/hugetlb: fix memfd_pin_folios free_huge_pages leak memfd_pin_folios followed by unpin_folios fails to restore free_huge_pages if the pages were not already faulted in, because the folio refcount for pages created by memfd_alloc_folio never goes to 0. memfd_pin_folios needs another folio_put to undo the folio_try_get below: memfd_alloc_folio() alloc_hugetlb_folio_nodemask() dequeue_hugetlb_folio_nodemask() dequeue_hugetlb_folio_node_exact() folio_ref_unfreeze(folio, 1); ; adds 1 refcount folio_try_get() ; adds 1 refcount hugetlb_add_to_page_cache() ; adds 512 refcount (on x86) With the fix, after memfd_pin_folios + unpin_folios, the refcount for the (unfaulted) page is 512, which is correct, as the refcount for a faulted unpinned page is 513.
AI-Powered Analysis
Technical Analysis
CVE-2024-49964 is a vulnerability identified in the Linux kernel's memory management subsystem, specifically within the huge page handling code (mm/hugetlb). The issue arises from an incorrect reference count management in the functions memfd_pin_folios and unpin_folios that handle huge pages allocated via memfd_alloc_folio. The vulnerability is due to a missing decrement of the folio reference count after memfd_pin_folios calls folio_try_get, which increments the reference count. Without this decrement, the reference count for certain huge pages never returns to the correct value, causing a leak of free huge pages. This leak occurs because the folio reference count for pages created by memfd_alloc_folio never reaches zero, preventing the system from reclaiming these pages properly. The fix involves adding an additional folio_put call to balance the earlier folio_try_get, ensuring that after pinning and unpinning, the reference count reflects the correct number of references (512 on x86 architectures for unfaulted pages). This vulnerability does not appear to have known exploits in the wild and does not have an assigned CVSS score yet. The root cause is a subtle memory management bug that could lead to resource exhaustion over time if exploited or triggered, potentially degrading system performance or causing denial of service due to depletion of huge pages. The affected versions are specific Linux kernel commits identified by their hashes, indicating this is a recent and targeted fix in the kernel source code.
Potential Impact
For European organizations, the impact of CVE-2024-49964 primarily concerns systems running Linux kernels with the affected versions, especially those heavily utilizing huge pages for performance optimization, such as in high-performance computing, database servers, or virtualization hosts. The leak of free huge pages can lead to gradual resource exhaustion, causing system instability, degraded performance, or denial of service conditions. This can disrupt critical services, particularly in sectors like finance, telecommunications, research institutions, and cloud service providers prevalent in Europe. Since huge pages are often used to optimize memory-intensive applications, the vulnerability could indirectly affect the availability and reliability of enterprise applications and infrastructure. Although no active exploitation is known, the vulnerability could be leveraged in multi-tenant environments or by malicious insiders to degrade system performance or cause outages. The impact on confidentiality and integrity is minimal as the vulnerability relates to resource management rather than direct code execution or privilege escalation. However, availability impact is significant in environments where huge pages are critical for workload performance.
Mitigation Recommendations
European organizations should prioritize updating their Linux kernels to the fixed versions that include the patch for CVE-2024-49964. Since the vulnerability is in the kernel memory management, applying vendor-provided kernel updates or patches is the most effective mitigation. For environments where immediate patching is not feasible, monitoring huge page usage and system memory metrics can help detect abnormal resource depletion early. Administrators should audit systems that use memfd-based huge page allocations and consider limiting or isolating workloads that heavily rely on huge pages until patched. Additionally, implementing strict access controls and monitoring for unusual memory management operations can reduce the risk of exploitation. Organizations using containerized or virtualized environments should ensure that host kernels are patched, as containerized workloads share the kernel. Finally, maintaining robust incident response plans to address potential denial of service scenarios caused by resource exhaustion is recommended.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-10-21T12:17:06.050Z
- Cisa Enriched
- true
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9824c4522896dcbdfb8b
Added to database: 5/21/2025, 9:08:52 AM
Last enriched: 6/28/2025, 3:40:53 PM
Last updated: 8/6/2025, 6:51:05 PM
Views: 17
Related Threats
CVE-2025-9047: SQL Injection in projectworlds Visitor Management System
MediumCVE-2025-9046: Stack-based Buffer Overflow in Tenda AC20
HighCVE-2025-9028: SQL Injection in code-projects Online Medicine Guide
MediumCVE-2025-26709: CWE-200 Exposure of Sensitive Information to an Unauthorized Actor in ZTE F50
MediumCVE-2025-9027: SQL Injection in code-projects Online Medicine Guide
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.