CVE-2024-39477

Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
05/07/2024
Last modified:
08/07/2024

Description

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

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.9 (including) 6.9.5 (excluding)
cpe:2.3:o:linux:linux_kernel:6.10.0:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.10.0:rc2:*:*:*:*:*:*