x86/mm: Don't apply va_align to hugetlb mappings on AMD F15h
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.18.567.2.107.3In the Linux kernel, the following vulnerability has been resolved:
x86/mm: Don't apply va_align to hugetlb mappings on AMD F15h
get_align_mask() returns huge_page_mask_align() for hugetlbfs, but get_align_bits() adds va_align.bits regardless, so vm_unmapped_area() returns an address off the huge page boundary and __unmap_hugepage_range() hits BUG_ON(start & ~huge_page_mask(h)) at teardown.
This can be triggered on Carrizo and FX-8370E, both hstates.
Pass the file to get_align_bits() and skip the randomisation for hugetlbfs.
[ bp: Massage commit message. ]
From the CVE record · Linux
On AMD F15h systems, the Linux kernel can place hugetlbfs mappings off a huge-page boundary. Tearing down such a mapping triggers a kernel BUG; the issue has been triggered on Carrizo and FX-8370E. The input does not specify network access, authentication requirements, or user interaction.
Engineers running Linux kernels on AMD F15h systems, including Carrizo and FX-8370E, should check their kernel versions; affected versions are not specified.