{"id":"CVE-2024-39477","published":"2024-07-05T06:55:07Z","modified":"2026-08-05T11:33:30Z","title":"mm/hugetlb: do not call vma_add_reservation upon ENOMEM","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/hugetlb: do not call vma_add_reservation upon ENOMEM\n\nsysbot reported a splat [1] on __unmap_hugepage_range().  This is because\nvma_needs_reservation() can return -ENOMEM if\nallocate_file_region_entries() fails to allocate the file_region struct\nfor the reservation.\n\nCheck for that and do not call vma_add_reservation() if that is the case,\notherwise region_abort() and region_del() will see that we do not have any\nfile_regions.\n\nIf we detect that vma_needs_reservation() returned -ENOMEM, we clear the\nhugetlb_restore_reserve flag as if this reservation was still consumed, so\nfree_huge_folio() will not increment the resv count.\n\n[1] https://lore.kernel.org/linux-mm/0000000000004096100617c58d54@google.com/T/#ma5983bc1ab18a54910da83416b3f89f3c7ee43aa","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00189,"percentile":0.08764,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/aa998f9dcb34c28448f86e8f5490f20d5eb0eac7","tags":[]},{"url":"https://git.kernel.org/stable/c/8daf9c702ee7f825f0de8600abff764acfedea13","tags":[]}],"priority":{"score":7.2,"factors":[{"name":"EPSS percentile","points":1.75},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= df7a6d1f64056aec572162c5d35ed9ff86ece6f3, < aa998f9dcb34c28448f86e8f5490f20d5eb0eac7",">= df7a6d1f64056aec572162c5d35ed9ff86ece6f3, < 8daf9c702ee7f825f0de8600abff764acfedea13"]},{"vendor":"Linux","product":"Linux","versions":["6.9"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-09-10T17:07:38.781989Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2024-38002","exploited":false,"provenance":"source"}}