# CVE-2024-39477: linux: In the Linux kernel, the following vulnerability has been resolved:  mm/hugetlb: do not call vma_add_reservation upon...

CVE-2024-39477 is fixed in linux on 1 platform, first by DEBIAN-CVE-2024-39477, released July 5, 2024. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2024-39477
- Priority: Routine
- CVSS: 5.5 (medium)
- EPSS: 0.0019
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Jul 5, 2024

## Description

In the Linux kernel, the following vulnerability has been resolved:  mm/hugetlb: do not call vma_add_reservation upon ENOMEM  sysbot reported a splat [1] on __unmap_hugepage_range().  This is because vma_needs_reservation() can return -ENOMEM if allocate_file_region_entries() fails to allocate the file_region struct for the reservation.  Check for that and do not call vma_add_reservation() if that is the case, otherwise region_abort() and region_del() will see that we do not have any file_regions.  If we detect that vma_needs_reservation() returned -ENOMEM, we clear the hugetlb_restore_reserve flag as if this reservation was still consumed, so free_huge_folio() will not increment the resv count.  [1] https://lore.kernel.org/linux-mm/0000000000004096100617c58d54@google.com/T/#ma5983bc1ab18a54910da83416b3f89f3c7ee43aa

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | linux Debian 13.5 (trixie) | 6.9.7-1 | [DEBIAN-CVE-2024-39477](https://patchblox.com/security/data/fix/linux/debian-cve-2024-39477.md) | Jul 5, 2024 |
| Linux | linux Debian 14 | 6.9.7-1 | [DEBIAN-CVE-2024-39477](https://patchblox.com/security/data/fix/linux/debian-cve-2024-39477.md) | Jul 5, 2024 |

---

Data as of 2026-11-08T06:59:42Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
