{"id":"DEBIAN-CVE-2024-49964","details":"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.","modified":"2026-09-15T09:03:13.133844610Z","published":"2024-10-21T18:15:17.510Z","upstream":["CVE-2024-49964"],"references":[{"type":"ADVISORY","url":"https://security-tracker.debian.org/tracker/CVE-2024-49964"}],"affected":[{"package":{"name":"linux","ecosystem":"Debian:13","purl":"pkg:deb/debian/linux?arch=source&distro=trixie"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.11.4-1"}]}],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2024-49964.json"}},{"package":{"name":"linux","ecosystem":"Debian:14","purl":"pkg:deb/debian/linux?arch=source&distro=forky"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.11.4-1"}]}],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2024-49964.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"}]}