{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-49964","id":"CVE-2024-49964","title":"mm/hugetlb: fix memfd_pin_folios free_huge_pages leak","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/hugetlb: fix memfd_pin_folios free_huge_pages leak\n\nmemfd_pin_folios followed by unpin_folios fails to restore free_huge_pages\nif the pages were not already faulted in, because the folio refcount for\npages created by memfd_alloc_folio never goes to 0.  memfd_pin_folios\nneeds another folio_put to undo the folio_try_get below:\n\n","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/hugetlb: fix memfd_pin_folios free_huge_pages leak\n\nmemfd_pin_folios followed by unpin_folios fails to restore free_huge_pages\nif the pages were not already faulted in, because the folio refcount for\npages created by memfd_alloc_folio never goes to 0.  memfd_pin_folios\nneeds another folio_put to undo the folio_try_get below:\n\nmemfd_alloc_folio()\n  alloc_hugetlb_folio_nodemask()\n    dequeue_hugetlb_folio_nodemask()\n      dequeue_hugetlb_folio_node_exact()\n        folio_ref_unfreeze(folio, 1);    ; adds 1 refcount\n  folio_try_get()                        ; adds 1 refcount\n  hugetlb_add_to_page_cache()            ; adds 512 refcount (on x86)\n\nWith the fix, after memfd_pin_folios + unpin_folios, the refcount for the\n(unfaulted) page is 512, which is correct, as the refcount for a faulted\nunpinned page is 513.","published":"2024-10-21T18:02:15.755Z","updated":"2026-10-28T02:31:07.440295266Z","reserved":"2024-10-21T12:17:06.050Z","status":"Analyzed","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},"metrics":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"}],"rating":"medium","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"89c1905d9c140372b7f50ef48f42378cf85d9bc5","lessThan":"59e081ff2e91bbf19b8c1ecb75b031f778858383","status":"affected","versionType":"git"},{"version":"89c1905d9c140372b7f50ef48f42378cf85d9bc5","lessThan":"c56b6f3d801d7ec8965993342bdd9e2972b6cb8e","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.11","status":"affected"},{"version":"0","lessThan":"6.11","status":"unaffected","versionType":"semver"},{"version":"6.11.3","lessThanOrEqual":"6.11.*","status":"unaffected","versionType":"semver"},{"version":"6.12","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":[],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/59e081ff2e91bbf19b8c1ecb75b031f778858383","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/c56b6f3d801d7ec8965993342bdd9e2972b6cb8e","tags":["Patch","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/49xxx/CVE-2024-49964.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-49964","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00202,"epssPercentile":0.10199,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-49964","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-49964","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-49964","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-49964","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}