CVE-2026-138969 in Linux
Summary
by MITRE • 11/30/2026
In the Linux kernel, the following vulnerability has been resolved:
MIPS: mm: do not write a huge TLB entry when the probe misses
__update_tlb() probes for the 8K pair at the address it is given and, for a huge pmd, writes the huge entry with tlbwi at the probed index or with tlbwr when the probe misses. That works only if the caller passes the faulting address, so that the probe finds the 4K entry the refill handler loaded for the faulting page and the huge entry replaces it.
update_mmu_cache_pmd() is not called that way. do_set_pmd() has always passed the huge-aligned address, and since commit ebcfc63d6bca ("mm: abstract THP allocation") the anonymous THP fault path does too (map_anon_folio_pmd()). The probe then misses the stale 4K entry, which sits at the faulting page somewhere else in the 2 MB range, tlbwr adds a huge entry next to it, and the TLB holds two entries matching the faulting address. Octeon raises "Machine Check exception - caused by multiple matching entries in the TLB" on the next refill of that page; a process on a CN63XX board died this way within a second of start, on the first anonymous THP of its bss.
Skip the write when the probe misses. The refill and TLBL/TLBS handlers probe the faulting address themselves and rewrite the stale entry with the huge one (they also set the software young bit), so the entry is installed on the next access at the cost of one exception.
If you want to get best quality of vulnerability data, you may have to visit VulDB.
Analysis
by VulDB Data Team • 11/30/2026
The vulnerability described involves a critical logic error in the Linux kernel's MIPS memory management subsystem, specifically within the translation lookaside buffer handling routines for large pages. The core issue resides in the __update_tlb() function and its interaction with huge page directory entries during anonymous transparent huge page faults. Under normal operation, when a fault occurs on a 4K aligned address that is part of a larger memory region mapped by a huge page descriptor, the kernel must update the TLB to reflect this mapping. The intended behavior for __update_tlb() involves probing the TLB at the specific faulting address to locate an existing entry, typically one loaded by the initial refill handler for the 4K sub-page. Once located, the function is designed to replace that stale small entry with a new huge page entry using instructions like tlbwi or tlbwr. This mechanism relies heavily on the assumption that the probe will successfully find the pre-existing 4K entry at the exact address passed as an argument.
The flaw arises because certain code paths, particularly do_set_pmd() and the anonymous transparent huge page fault path introduced by commit ebcfc63d6bca which maps anonymous folios via map_anon_folio_pmd(), pass a huge-aligned base address rather than the specific faulting offset within that large page. When __update_tlb() receives this aligned address, it probes for an entry at that location. However, the stale 4K entry loaded by the refill handler is located at the actual faulting address, which resides elsewhere within the two-megabyte range of the huge page. Consequently, the probe fails to find a matching entry because it searches in the wrong physical slot relative to the TLB indexing logic for that specific architecture variant. Instead of replacing an existing entry as intended, the code proceeds to write a new huge entry using tlbwr at the probed index where no conflicting small entry exists.
This incorrect insertion results in two distinct TLB entries mapping the same virtual address space: one stale 4K entry and one newly inserted huge page entry. This duplication violates fundamental memory management principles and creates an ambiguous state within the hardware translation cache. On specific MIPS implementations, such as those found in Cavium Octeon processors like the CN63XX board, this condition triggers a severe hardware exception known as a Machine Check Exception due to multiple matching entries in the TLB during subsequent page refills. The operational impact is immediate and catastrophic for affected processes; they may terminate abruptly within seconds of startup, often failing on their first anonymous transparent huge page allocation in the BSS segment. This represents a denial of service condition that can destabilize systems relying on large pages for performance optimization.
From a technical classification perspective, this vulnerability aligns with CWE-824 Access of Uninitialized Pointer or more accurately CWE-367 Time-of-check Time-of-use (TOCTOU) race conditions in the context of state management, though it is fundamentally an improper input validation and logic error leading to resource corruption. In terms of MITRE ATT&CK mapping, this falls under T1499 Endpoint Denial of Service or potentially T1055 Process Injection if exploited for stability disruption, but primarily represents a system reliability failure due to software defect rather than malicious exploitation. The root cause is the mismatch between the address passed by the caller and the address expected by the TLB update logic, leading to incorrect hardware state modification.
To mitigate this vulnerability, the kernel developers implemented a fix that skips the write operation when the initial probe misses finding an existing entry at the specified address. This approach leverages the fact that subsequent page refill handlers and TLB load/store exception handlers already perform their own probes on the actual faulting address. These handlers are designed to rewrite the stale 4K entry with the correct huge page entry, thereby ensuring only one valid mapping exists for any given virtual address. While this solution introduces a minor performance overhead by allowing an additional hardware exception to occur before the TLB is correctly updated, it guarantees correctness and prevents the dangerous state of duplicate mappings. System administrators should ensure that kernel updates incorporating this fix are applied promptly on MIPS-based systems utilizing transparent huge pages to prevent unexpected process terminations and system instability caused by machine check exceptions.