All of lore.kernel.org
 help / color / mirror / Atom feed
* CVE-2026-99654: mm: fix unmap_mapping_range() beyond 4 GiB on 32-bit
@ 2026-11-20  5:50 Greg Kroah-Hartman
  0 siblings, 0 replies; only message in thread
From: Greg Kroah-Hartman @ 2026-11-20  5:50 UTC (permalink / raw)
  To: linux-cve-announce; +Cc: Greg Kroah-Hartman

From: Greg Kroah-Hartman <gregkh@kernel.org>

Description
===========

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.

The Linux kernel CVE team has assigned CVE-2026-99654 to this issue.


Affected and fixed versions
===========================

	Issue introduced in 6.7 with commit 9eab0421fa94a3dde0d1f7e36ab3294fc306c99d and fixed in 6.12.118 with commit cbf6c66a2ef46433092b41b87176755de32bf65b
	Issue introduced in 6.7 with commit 9eab0421fa94a3dde0d1f7e36ab3294fc306c99d and fixed in 6.18.64 with commit 0cf8d3fdd869fe079e55f8e621e45397a819d93c
	Issue introduced in 6.7 with commit 9eab0421fa94a3dde0d1f7e36ab3294fc306c99d and fixed in 7.3.5 with commit 67e6d5468a7d693a00176713d44267e5360d63c3
	Issue introduced in 6.7 with commit 9eab0421fa94a3dde0d1f7e36ab3294fc306c99d and fixed in 7.4-rc2 with commit 7a81bc23dade8082187be6d9cc36e4be4b7207e2
	Issue introduced in 4.19.305 with commit 2db1c46c3913b8bc92fed235a344de2671fe9d8d
	Issue introduced in 5.4.267 with commit 77359c4973056ba33a5627d5c04aea494eb76bc9
	Issue introduced in 5.10.208 with commit 73704c6b35c7682fd22f97992a68b0e8451c7a52
	Issue introduced in 5.15.147 with commit 91432aebce514cab49f63324c98b4eccb80532c5
	Issue introduced in 6.1.72 with commit dafdeb7b91f1597983693a418c496b6702ea34b5
	Issue introduced in 6.6.11 with commit 2247df454c7bb4b13939794fe6fae8510868d241

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-99654
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/memory.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/cbf6c66a2ef46433092b41b87176755de32bf65b
	https://git.kernel.org/stable/c/0cf8d3fdd869fe079e55f8e621e45397a819d93c
	https://git.kernel.org/stable/c/67e6d5468a7d693a00176713d44267e5360d63c3
	https://git.kernel.org/stable/c/7a81bc23dade8082187be6d9cc36e4be4b7207e2

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-20  5:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-20  5:50 CVE-2026-99654: mm: fix unmap_mapping_range() beyond 4 GiB on 32-bit Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.