Skip to contentSkip to conversation

CVE-2026-99702: mm/vma: write lock source VMA before duplicating it in __split_vma()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Nov 20

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

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

In the Linux kernel, the following vulnerability has been resolved:

mm/vma: write lock source VMA before duplicating it in __split_vma()

__split_vma() duplicates the source VMA before taking its VMA write lock, and until the VMA is write-locked, a concurrent thread might set VMA_MAYBE_GUARD_BIT, resulting in the duplication missing the flag.

If this happens, then fork may fail to duplicate guard markers and, if a file-backed mapping, THP collapse may also discard the markers.

Resolve this by taking the VMA write lock before vm_area_dup() and, since all callers of vm_area_dup() now hold the VMA write lock, assert that this is the case there, and add a comment to explain why it's needed.

[[email protected]: add VMA write assert in vm_area_dup(), commit message touchup]

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

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

	Issue introduced in 6.19 with commit 2ab7f1bbafc927c69374d45578011c814c26ae2f and fixed in 7.3.5 with commit 2c1393ecc3dd399561557c98d7f2e5251bb5bf92
	Issue introduced in 6.19 with commit 2ab7f1bbafc927c69374d45578011c814c26ae2f and fixed in 7.4-rc2 with commit 769417e410dd19b2a438c6addb61b194b7a4c387

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-99702

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/vma.c
mm/vma_init.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/2c1393ecc3dd399561557c98d7f2e5251bb5bf92
	https://git.kernel.org/stable/c/769417e410dd19b2a438c6addb61b194b7a4c387