CVE-2026-99654
mm: fix unmap_mapping_range() beyond 4 GiB on 32-bit
What happened?
In the Linux kernel, the following vulnerability has been resolved:
mm: fix unmap_mapping_range() beyond 4 GiB on 32-bit
Commit 9eab0421fa94 ("mm: fix unmap_mapping_range high bits shift bug") made holebegin and holelen unsigned before they are shifted, by casting them to pgoff_t. That is an unsigned long: on a 32-bit kernel the cast cuts off the upper half of the two loff_t values, so a hole which begins at 4 GiB or beyond is taken for one in the first 4 GiB of the file.
truncate_pagecache() passes the new size of the file and asks for private COWed pages to be unmapped as well. If a file of 6 GiB is truncated to 5 GiB, everything from 1 GiB on is unmapped, and what a process has written to a private mapping of the range between 1 GiB and 5 GiB is lost: it reads the contents of the file again.
Where the range has an end, the wrong range is unmapped instead of the right one. The page cache copes with that, as it unmaps every folio that it removes. The callers which only have unmap_mapping_range() to get rid of user mappings do not, for example drm_vma_node_unmap(), whose fake offsets reach beyond 4 GiB on 32-bit, and revoke_iomem() with physical addresses of more than 32 bits.
Cast to u64 instead. Nothing changes for 64-bit kernels.
Fix generated by an LLM and sent by Josef Bacik in private.
Affected software and versions
| Software | Version information | Fixed version |
|---|---|---|
| LinuxLinux | affected: 73704c6b35c7682fd22f97992a68b0e8451c7a52 to < aeaa0d4e301c5d2d97ba40603f899abe4e118572; affected: 91432aebce514cab49f63324c98b4eccb80532c5 to < 273121718c4c79ac0dd044d5f7998f21854b7cd6; affected: dafdeb7b91f1597983693a418c496b6702ea34b5 to < aff28bb139a69437922311e4078f77dc92d54831; affected: 2247df454c7bb4b13939794fe6fae8510868d241 to < 119bb87a630d25d61ed77738c73a4ba743f8e410; affected: 9eab0421fa94a3dde0d1f7e36ab3294fc306c99d to < cbf6c66a2ef46433092b41b87176755de32bf65b; affected: 9eab0421fa94a3dde0d1f7e36ab3294fc306c99d to < 0cf8d3fdd869fe079e55f8e621e45397a819d93c; affected: 9eab0421fa94a3dde0d1f7e36ab3294fc306c99d to < 67e6d5468a7d693a00176713d44267e5360d63c3; affected: 9eab0421fa94a3dde0d1f7e36ab3294fc306c99d to < 7a81bc23dade8082187be6d9cc36e4be4b7207e2; affected: 2db1c46c3913b8bc92fed235a344de2671fe9d8d; affected: 77359c4973056ba33a5627d5c04aea494eb76bc9; affected: 5.10.208 to < 5.10.275; affected: 5.15.147 to < 5.15.226; affected: 6.1.72 to < 6.1.193; affected: 6.6.11 to < 6.6.163; affected: 4.19.305 to < 4.20; affected: 5.4.267 to < 5.5 | See vendor advisory |
| LinuxLinux | affected: 6.7; unaffected: 0 to < 6.7; unaffected: 5.10.275 to ≤ 5.10.*; unaffected: 5.15.226 to ≤ 5.15.*; unaffected: 6.1.193 to ≤ 6.1.*; unaffected: 6.6.163 to ≤ 6.6.*; unaffected: 6.12.118 to ≤ 6.12.*; unaffected: 6.18.64 to ≤ 6.18.*; unaffected: 7.3.5 to ≤ 7.3.*; unaffected: 7.4-rc2 to ≤ * | See vendor advisory |
Version information comes from the source record and can include unaffected products and exceptions. Distribution packages may contain backported fixes: an older upstream version alone does not prove a server is affected.
Is it being exploited?
This CVE was not listed in the CISA catalogue at our last retrieval. This does not establish that exploitation is absent.
How to respond
- Confirm the product, installed package version, and any configuration requirements in the vendor advisory.
- Follow the vendor’s remediation or workaround guidance in the references below. Structured fixed-version data is unavailable here; the publisher’s description may include a fix or workaround.
- Restart affected services if required, then verify the running version. Known exploitation may warrant investigation as well as patching.
Sources and remediation references
- https://www.cve.org/CVERecord?id=CVE-2026-99654
- https://git.kernel.org/stable/c/aeaa0d4e301c5d2d97ba40603f899abe4e118572
- https://git.kernel.org/stable/c/273121718c4c79ac0dd044d5f7998f21854b7cd6
- https://git.kernel.org/stable/c/aff28bb139a69437922311e4078f77dc92d54831
- https://git.kernel.org/stable/c/119bb87a630d25d61ed77738c73a4ba743f8e410
- https://git.kernel.org/stable/c/cbf6c66a2ef46433092b41b87176755de32bf65b
- https://git.kernel.org/stable/c/0cf8d3fdd869fe079e55f8e621e45397a819d93c
- https://git.kernel.org/stable/c/67e6d5468a7d693a00176713d44267e5360d63c3
- https://git.kernel.org/stable/c/7a81bc23dade8082187be6d9cc36e4be4b7207e2