CVE-2026-138970

MIPS: mm: align hugetlb mappings in arch_get_unmapped_area()

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

MIPS: mm: align hugetlb mappings in arch_get_unmapped_area()

Since hugetlb mappings were made to go through the architecture's
arch_get_unmapped_area{,_topdown}(), every architecture that implements
those has to align hugetlb files itself. The generic implementation and
loongarch do it with huge_page_mask_align(); MIPS was left out.

A non-MAP_FIXED mmap() of a hugetlbfs file therefore returns an address
that is only SHMLBA aligned, and the kernel then installs 2 MB PMDs for
a VMA that starts in the middle of a PMD. The consequences on an
Octeon (CN63XX) board running a process that links libhugetlbfs with
HUGETLB_ELFMAP=R and HUGETLB_MORECORE=yes, all within a minute of
start: the neighbouring 4 KB page table is clobbered, the TLB ends up
with overlapping entries ("Caught Machine Check exception - caused by
multiple matching entries in the TLB"), process exit trips
BUG_ON(start & ~huge_page_mask(h)) in __unmap_hugepage_range(), and
freed pages leak into unrelated kernel structures (oopses in the irq
maple tree, in pte_offset_map, ...).

Do what loongarch does in commit 3109d5ff484b ("LoongArch: Set hugetlb
mmap base address aligned with pmd size"): when the file is a hugetlb
file, use its page mask as the search alignment instead of the cache
colour mask.

Analysis

AI-generated

Technical impact

A bug in the Linux kernel’s MIPS architecture caused hugetlbfs mmap() requests that are not MAP_FIXED to return addresses that are only SHMLBA aligned. When the kernel installs 2 MB page‑management descriptors for a VMA that starts in the middle of a PMD, page‑table entries in the neighboring 4 KB page are overwritten. This leads to TLB entries that overlap, kernel BUG_ON failures during unmap, and leaked pages that corrupt unrelated kernel structures.

Affected Systems

All Linux distributions running a MIPS‑based kernel, including Octeon (CN63XX) boards, are vulnerable. The issue exists across MIPS variants that lack the alignment logic defined in newer commits. No specific kernel version range is listed, but any MIPS kernel compiled before the fix in commit 3109d5ff is potentially affected.

Risk and Exploitability

The vulnerability can crash the kernel or corrupt kernel memory when a local process performs a standard mmap() of a hugetlbfs file. Although the EPSS score is not available and the CVE is not listed in the CISA KEV catalog, the impact on kernel stability and the possibility of privilege escalation through a crash suggest a high severity. The attack vector is inferred to be a local user who can load libs that use libhugetlbfs or directly mmap() huge pages, since no network or elevated privileges are required to trigger the fault. The absence of an EPSS score indicates low public evidence of exploitation, but the underlying mechanism warrants prompt remediating action.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply a Linux kernel update that includes commit 3109d5ff (the patch that aligns hugetlb mappings for MIPS).
  • Reconfigure any services or applications that use libhugetlbfs or hugetlbfs (for example by disabling HUGETLB_ELFMAP or HUGETLB_MORECORE) until the kernel is updated, to avoid the fault condition.
  • If an immediate kernel upgrade is not possible, enforce explicit alignment for all huge‑page mmap() calls (use MAP_FIXED with addresses aligned to the architecture’s PMD size) or temporarily disable hugetlbfs support until the patch is applied.

Generated by OpenCVE AI on November 30, 2026 at 17:52 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-119
CWE-665
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: MIPS: mm: align hugetlb mappings in arch_get_unmapped_area() Since hugetlb mappings were made to go through the architecture's arch_get_unmapped_area{,_topdown}(), every architecture that implements those has to align hugetlb files itself. The generic implementation and loongarch do it with huge_page_mask_align(); MIPS was left out. A non-MAP_FIXED mmap() of a hugetlbfs file therefore returns an address that is only SHMLBA aligned, and the kernel then installs 2 MB PMDs for a VMA that starts in the middle of a PMD. The consequences on an Octeon (CN63XX) board running a process that links libhugetlbfs with HUGETLB_ELFMAP=R and HUGETLB_MORECORE=yes, all within a minute of start: the neighbouring 4 KB page table is clobbered, the TLB ends up with overlapping entries ("Caught Machine Check exception - caused by multiple matching entries in the TLB"), process exit trips BUG_ON(start & ~huge_page_mask(h)) in __unmap_hugepage_range(), and freed pages leak into unrelated kernel structures (oopses in the irq maple tree, in pte_offset_map, ...). Do what loongarch does in commit 3109d5ff484b ("LoongArch: Set hugetlb mmap base address aligned with pmd size"): when the file is a hugetlb file, use its page mask as the search alignment instead of the cache colour mask.
Title MIPS: mm: align hugetlb mappings in arch_get_unmapped_area()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-119

    Improper Restriction of Operations within the Bounds of a Memory Buffer

  • CWE-665

    Improper Initialization

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:26 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:17 PM
Modified
Nov 30, 2026, 2:17 PM