CVE-2026-98373: mm/hugetlb: preserve mremap address delta when skipping page tables
In the Linux kernel, the following vulnerability has been resolved:
mm/hugetlb: preserve mremap address delta when skipping page tables
movehugetlbpagetables() 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Fix mm/hugetlb move_hugetlb_page_tables() so the destination address is advanced only by the same amount as the source distance when skipping page tables.
Event History
Frequently Asked Questions
What conditions are needed to trigger the issue?
The affected path involves mremap() of hugetlb mappings when the source page table is absent, either initially or after a PMD table is unshared. The source and destination addresses must have different offsets within their respective page tables.
What impact has been demonstrated?
A reproducer triggered a kernel panic on x86-64. After applying the fix, the issue could no longer be reproduced with that reproducer.
How can I identify the available fix?
The supplied stable-tree fix references are commits 7a96b0f657c8d799ea5b8e02fc9ec7cca0e6e7ff, 850cc4a84b36a0062dcd0391acd2450e20ab0767, and 480a39b0a12c977ed6e755f3d12a23424c57d11f.