CVE-2024-49964: mm/hugetlb: fix memfd_pin_folios free_huge_pages leak

Published Oct 21, 2024
·
Updated

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

mm/hugetlb: fix memfdpinfolios freehugepages leak

memfdpinfolios followed by unpinfolios fails to restore freehugepages if the pages were not already faulted in, because the folio refcount for pages created by memfdallocfolio never goes to 0. memfdpinfolios needs another folioput to undo the foliotryget below:

memfdallocfolio() allochugetlbfolionodemask() dequeuehugetlbfolionodemask() dequeuehugetlbfolionodeexact() foliorefunfreeze(folio, 1); ; adds 1 refcount foliotryget() ; adds 1 refcount hugetlbaddtopagecache() ; adds 512 refcount (on x86)

With the fix, after memfdpinfolios + unpinfolios, the refcount for the (unfaulted) page is 512, which is correct, as the refcount for a faulted unpinned page is 513.

Other sources

This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.

Launchpad

Affected Software

2 affected componentsFixes available
Linux Linux kernel>=6.11<6.11.3
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.22-16.12.25-1

Event History

Oct 21, 2024
CVE Published
via MITRE·06:02 PM
Data Sourced
via MITRE·06:02 PM
Description
Feb 20, 2025
Data Sourced
via Launchpad·12:47 AM
Description
Apr 1, 2025
Data Sourced
via Ubuntu·12:55 AM
RemedyDescriptionSeverityAffected Software
Apr 17, 2025
Data Sourced
via Debian·01:01 AM
DescriptionAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-49964?

CVE-2024-49964 is categorized as a medium severity vulnerability due to its potential impact on memory management within the Linux kernel.

2

How do I fix CVE-2024-49964?

To fix CVE-2024-49964, update your Linux kernel to a version that includes the patch, typically 6.11.3 or newer.

3

Which versions of the Linux kernel are affected by CVE-2024-49964?

CVE-2024-49964 affects Linux kernel versions from 6.11.0 to 6.11.2.

4

Is CVE-2024-49964 a remote vulnerability?

CVE-2024-49964 is not classified as a remote vulnerability, as it pertains to local memory management issues.

5

What systems are impacted by CVE-2024-49964?

CVE-2024-49964 impacts systems running affected versions of the Linux kernel, particularly those using Debian-based distributions.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203