Linux: mm/hugetlb: initialize gigantic bootmem hugepage struct pages earlier
What fixes it
- 326de479ab5942fb4a4aa4f20c716045434fcd6bLinuxCVE List
- 09505232eced5f1c42902d8f28740f070c3fc6dcLinuxCVE List
- 29968bc7aefb3cf1e72aa7c5f52697a6b0527094LinuxCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
In the Linux kernel, the following vulnerability has been resolved:
mm/hugetlb: initialize gigantic bootmem hugepage struct pages earlier
Gigantic bootmem HugeTLB pages are currently initialized from hugetlb_init(), but page_alloc_init_late() runs earlier and walks pageblocks to determine zone contiguity.
If a bootmem HugeTLB region is marked noinit, set_zone_contiguous() can observe still-uninitialized struct pages through __pageblock_pfn_to_page(). This may not trigger an immediate failure, but it can make set_zone_contiguous() compute the wrong zone contiguity state. If extra poisoned-page checks are added in this path, such as PF_POISONED_CHECK() in page_zone_id(), it can also trigger an early boot panic.
Initialize gigantic bootmem HugeTLB struct pages from page_alloc_init_late(), before zone contiguity is evaluated, so later page allocator setup only sees valid struct page state. This also makes the initialization order more natural, as struct pages should be initialized before later code inspects them.
Text from CVE List
Affected versions 10
- Linuxaffected: fde1c4ecf91640e5a95ec36b71ec2e8ec379ce40 before 326de479ab5942fb4a4aa4f20c716045434fcd6bCVE List
- Linuxaffected: fde1c4ecf91640e5a95ec36b71ec2e8ec379ce40 before 09505232eced5f1c42902d8f28740f070c3fc6dcCVE List
- Linuxaffected: fde1c4ecf91640e5a95ec36b71ec2e8ec379ce40 before 29968bc7aefb3cf1e72aa7c5f52697a6b0527094CVE List
- Linuxaffected: fde1c4ecf91640e5a95ec36b71ec2e8ec379ce40 before b1b7c045e808c761b1cc8c19b3040fadedda3fefCVE List
- Linuxaffected: 6.7CVE List
- Linuxunaffected: all versions before 6.7CVE List
- Linuxunaffected: 6.12.114 through 6.12.*CVE List
- Linuxunaffected: 6.18.51 through 6.18.*CVE List
- Linuxunaffected: 7.2.4 through 7.2.*CVE List
- Linuxunaffected: 7.3CVE List
References 4
- git.kernel.org/stable/c/326de479ab5942fb4a4aa4f20c716045434fcd6bReferencevia CVE List
- git.kernel.org/stable/c/09505232eced5f1c42902d8f28740f070c3fc6dcReferencevia CVE List
- git.kernel.org/stable/c/29968bc7aefb3cf1e72aa7c5f52697a6b0527094Referencevia CVE List
- git.kernel.org/stable/c/b1b7c045e808c761b1cc8c19b3040fadedda3fefReferencevia CVE List