CVE-2026-98373: mm/hugetlb: preserve mremap address delta when skipping page tables
From: Greg Kroah-Hartman <[email protected]>
Description
===========
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.
The Linux kernel CVE team has assigned CVE-2026-98373 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.0 with commit e95a9851787bbb3cd4deb40fe8bab03f731852d1 and fixed in 6.12.112 with commit 7a96b0f657c8d799ea5b8e02fc9ec7cca0e6e7ff Issue introduced in 6.0 with commit e95a9851787bbb3cd4deb40fe8bab03f731852d1 and fixed in 6.18.55 with commit 850cc4a84b36a0062dcd0391acd2450e20ab0767 Issue introduced in 6.0 with commit e95a9851787bbb3cd4deb40fe8bab03f731852d1 and fixed in 7.2.9 with commit 480a39b0a12c977ed6e755f3d12a23424c57d11f Issue introduced in 6.0 with commit e95a9851787bbb3cd4deb40fe8bab03f731852d1 and fixed in 7.3-rc5 with commit 9bdad082d44bdcf93716973dcba6be77e8a06e7b
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-98373
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
mm/hugetlb.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/7a96b0f657c8d799ea5b8e02fc9ec7cca0e6e7ff https://git.kernel.org/stable/c/850cc4a84b36a0062dcd0391acd2450e20ab0767 https://git.kernel.org/stable/c/480a39b0a12c977ed6e755f3d12a23424c57d11f https://git.kernel.org/stable/c/9bdad082d44bdcf93716973dcba6be77e8a06e7b