Skip to contentSkip to conversation

CVE-2026-98224: mm/vma: correctly unaccount on mmap_prepare() failure

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 6

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: correctly unaccount on mmap_prepare() failure

__mmap_setup() accounts memory for relevant mappings via:

security_vm_enough_memory_mm()
-> __vm_enough_memory()

    -> vm_acct_memory()

If __mmap_setup() fails, this indicates that this accounting did not take place, and thus it's appropriate for __mmap_region() to jump to abort_munmap.

However if call_mmap_prepare() fails, it also jumps there and any accounted memory is not correctly unaccounted.

Fix this by handling each error separately.

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

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

	Issue introduced in 6.16 with commit c84bf6dd2b836b49bb2662668ff1692350d28236 and fixed in 6.18.54 with commit fb5400bff669c8bad3d4ec09287d9b461e89e5f1
	Issue introduced in 6.16 with commit c84bf6dd2b836b49bb2662668ff1692350d28236 and fixed in 7.2.8 with commit 8fdc521d438fbf0d22c13d51d55d5dd82d7202b2
	Issue introduced in 6.16 with commit c84bf6dd2b836b49bb2662668ff1692350d28236 and fixed in 7.3-rc4 with commit 6cc27d82196385fe06853319f74312a7d8019726

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

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

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/fb5400bff669c8bad3d4ec09287d9b461e89e5f1
	https://git.kernel.org/stable/c/8fdc521d438fbf0d22c13d51d55d5dd82d7202b2
	https://git.kernel.org/stable/c/6cc27d82196385fe06853319f74312a7d8019726