mm/mremap: populate calculated fields in vrm state correctly
- State
- Published
- Severity
- Not Scored
- Published
- Nov 30, 2026
- Updated
- Nov 30, 2026
- Reserved
- Sep 25, 2026
Description
In the Linux kernel, the following vulnerability has been resolved:
mm/mremap: populate calculated fields in vrm state correctly
Commit d5c8aec0542e ("mm/mremap: initial refactor of move_vma()") introduced the vma_remap_struct helper to pass state sanely through mremap() logic.
Part of this state is vrm->delta - equal to the absolute difference between vrm->old_len and vrm->new_len (the old and new lengths of the VMA, respectively).
This value is used to correctly charge accounted VMAs.
When shrinking a VMA, mremap_to() sets vrm->old_len equal to vrm->new_len having performed the shrink of the VMA first, prior to any potential move (e.g. MREMAP_FIXED | MREMAP_MAYMOVE specified).
However it does not recalculate vrm->delta, which results in incorrectly overcharging the VMA when both moving and shrinking a VMA.
The charge leaks to Committed_AS globally, meaning a mischievous user can cause allocations to fail across the system in strict overcommit mode.
Resolve the issue by abstracting the update of vrm->delta to vrm_populate_calculated() and invoking this from mremap_to() when vrm->old_len is changed.
Additionally, update vrm->remap_type whose value depends on vrm->delta. The field is not read again after the shrink, but it is the logically correct thing to do and protects against future changes which break this.
| Product | Versions |
|---|---|
| Linux Linux | d5c8aec0542e2d79b64de9089b88fabdebe05c1e to before 38efa986446b83eaefde90558bc0ee7dbe903782 Affectedd5c8aec0542e2d79b64de9089b88fabdebe05c1e to before b6d9bee0f6b9d3bf46329ca6fb49be364d1adb9a Affectedd5c8aec0542e2d79b64de9089b88fabdebe05c1e to before 34e753f8d927069785f6b675f5769da5da4ef78e Affected |
| Linux Linux | 6.15 Affectedbefore 6.15 Not Affected6.18.63 through 6.18.* Not Affected7.3.4 through 7.3.* Not Affected7.4-rc1 and later Not Affected |
The record has no CVSS score.
Weaknesses
The record names no weakness.
References
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.