CVE-2024-49964

mm/hugetlb: fix memfd_pin_folios free_huge_pages leak

MEDIUM
5.5
CVSS Score
Published: October 21, 2024 at 06:02 PM UTC
Updated: June 17, 2026 at 08:00 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

6.11 ≤ v < 6.11.36.11 ≤ v < 6.126.1189c1905d9c140372b7f50ef48f42378cf85d9bc5
Vendor states this is fixed in 59e081ff2e91bbf19b8c1ecb75b031f778858383 (fixed)
Vendor states this is fixed in c56b6f3d801d7ec8965993342bdd9e2972b6cb8e (fixed)
Vendor states this is fixed in 6.11 (unaffected)
Vendor states this is fixed in 6.11.3 (unaffected)
Vendor states this is fixed in 6.12 (unaffected)

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (2)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/59e081ff2e91bbf19b8c1ecb75b031f778858383
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/c56b6f3d801d7ec8965993342bdd9e2972b6cb8e

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
NVD-CWE-Other

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card