HIGH Introduced in 6.0
hugetlb Mremap OOB
CVE-2026-98373
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
01Description
In the Linux kernel, the following vulnerability has been resolved: mm/hugetlb: preserve mremap address delta when skipping page tables move_hugetlb_page_tables() optimizes mremap() by advancing to the last entry in the page table when the source page table does not exist, either initially or after unsharing a PMD table. The common loop increment then steps to the first entry in the next page table. However, the code advances both the source and destination addresses to the last entries in their respective page tables, which is wrong. The destination address must be advanced only by the same amount as the source address. If the source and destination offsets within their page tables differ, the destination address can be advanced too far, causing follow-up issues. Fix this by advancing the destination address by the source advance distance. With a reproducer, we were able to trigger a kernel panic on x86-64. With this fix in place, we can no longer reproduce the issue.
02KernelScan AI Analysis
Risk summary
A local unprivileged user can corrupt kernel page tables by remapping huge-page mappings whose source and destination sit at different page-table offsets, causing a kernel panic or potentially exploitable memory corruption. Systems that allow unprivileged users to access huge pages — including via user namespaces — are at risk. The confirmed impact is denial of service, with possible privilege escalation.
Vulnerability analysis
When the kernel moves a huge-page memory mapping to a new address, it skips over empty regions by jumping ahead in the page tables. A mistake in this skip logic advances the destination address too far when the source and destination start at different positions within their respective page tables. This causes later updates to land in the wrong place, corrupting page table data structures and destabilizing the kernel. The fix ensures the destination advances by exactly the same amount as the source, keeping the two in lockstep. Any local user who can create and remap huge-page mappings can trigger this; on systems where huge pages are available to unprivileged users or obtainable through a user namespace, no special root privileges are required.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.12 | 6.0 | 6.12.112 | 7a96b0f657c8 |
| 6.18 | 6.0 | 6.18.55 | 850cc4a84b36 |
| 7.2 | 6.0 | 7.2.9 | 480a39b0a12c |
| mainline | 6.0 | 7.3-rc5 | 9bdad082d44b |