# CVE-2026-23077: mm/vma: fix anon\_vma UAF on mremap() faulted, unfaulted merge

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.23% (percentile 8, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2026-02-04T16:08:02.274Z
- **Modified:** 2026-08-05T12:20:13.107Z

## Who should check

- Anyone running Linux \>= 879bca0a2c4f40b08d09a95a2a0c3c6513060b5c, \< a4d9dbfc1bab16e25fefd34b5e537a46bed8fc96; \>= 879bca0a2c4f40b08d09a95a2a0c3c6513060b5c, \< 61f67c230a5e7c741c352349ea80147fbe65bfae
- Anyone running Linux 6.16

## Description

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

mm/vma: fix anon\_vma UAF on mremap() faulted, unfaulted merge

Patch series "mm/vma: fix anon\_vma UAF on mremap() faulted, unfaulted
merge", v2.

Commit 879bca0a2c4f ("mm/vma: fix incorrectly disallowed anonymous VMA
merges") introduced the ability to merge previously unavailable VMA merge
scenarios.

However, it is handling merges incorrectly when it comes to mremap() of a
faulted VMA adjacent to an unfaulted VMA.  The issues arise in three
cases:

1. Previous VMA unfaulted:

              copied -----\|
                          v
	\|-----------\|.............\|
	\| unfaulted \|(faulted VMA)\|
	\|-----------\|.............\|
	     prev

2. Next VMA unfaulted:

              copied -----\|
                          v
	            \|.............\|-----------\|
	            \|(faulted VMA)\| unfaulted \|
                    \|.............\|-----------\|
		                      next

3. Both adjacent VMAs unfaulted:

              copied -----\|
                          v
	\|-----------\|.............\|-----------\|
	\| unfaulted \|(faulted VMA)\| unfaulted \|
	\|-----------\|.............\|-----------\|
	     prev                      next

This series fixes each of these cases, and introduces self tests to assert
that the issues are corrected.

I also test a further case which was already handled, to assert that my
changes continues to correctly handle it:

4. prev unfaulted, next faulted:

              copied -----\|
                          v
	\|-----------\|.............\|-----------\|
	\| unfaulted \|(faulted VMA)\|  faulted  \|
	\|-----------\|.............\|-----------\|
	     prev                      next

This bug was discovered via a syzbot report, linked to in the first patch
in the series, I confirmed that this series fixes the bug.

I also discovered that we are failing to check that the faulted VMA was
not forked when merging a copied VMA in cases 1-3 above, an issue this
series also addresses.

I also added self tests to assert that this is resolved (and confirmed
that the tests failed prior to this).

I also cleaned up vma\_expand() as part of this work, renamed
vma\_had\_uncowed\_parents() to vma\_is\_fork\_child() as the previous name was
unduly confusing, and simplified the comments around this function.


This patch (of 4):

Commit 879bca0a2c4f ("mm/vma: fix incorrectly disallowed anonymous VMA
merges") introduced the ability to merge previously unavailable VMA merge
scenarios.

The key piece of logic introduced was the ability to merge a faulted VMA
immediately next to an unfaulted VMA, which relies upon dup\_anon\_vma() to
correctly handle anon\_vma state.

In the case of the merge of an existing VMA (that is changing properties
of a VMA and then merging if those properties are shared by adjacent
VMAs), dup\_anon\_vma() is invoked correctly.

However in the case of the merge of a new VMA, a corner case peculiar to
mremap() was missed.

The issue is that vma\_expand() only performs dup\_anon\_vma() if the target
(the VMA that will ultimately become the merged VMA): is not the next VMA,
i.e.  the one that appears after the range in which the new VMA is to be
established.

A key insight here is that in all other cases other than mremap(), a new
VMA merge either expands an existing VMA, meaning that the target VMA will
be that VMA, or would have anon\_vma be NULL.

Specifically:

\* \_\_mmap\_region() - no anon\_vma in place, initial mapping.
\* do\_brk\_flags() - expanding an existing VMA.
\* vma\_merge\_extend() - expanding an existing VMA.
\* relocate\_vma\_down() - no anon\_vma in place, initial mapping.

In addition, we are in the unique situation of needing to duplicate
anon\_vma state from a VMA that is neither the previous or next VMA being
merged with.

dup\_anon\_vma() deals exclusively with the target=unfaulted, src=faulted
case.  This leaves four possibilities, in each case where the copied VMA
is faulted:

1. Previous VMA unfaulted:

              copied -----\|
                       
---truncated---

## Affected and fixed versions

- Linux: \>= 879bca0a2c4f40b08d09a95a2a0c3c6513060b5c, \< a4d9dbfc1bab16e25fefd34b5e537a46bed8fc96; \>= 879bca0a2c4f40b08d09a95a2a0c3c6513060b5c, \< 61f67c230a5e7c741c352349ea80147fbe65bfae (cvelist)
- Linux: 6.16 (cvelist)

## Mitigation

- Upgrade Linux to 61f67c230a5e7c741c352349ea80147fbe65bfae or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-23077. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-23077.md
Affected: Linux >= 879bca0a2c4f40b08d09a95a2a0c3c6513060b5c, < a4d9dbfc1bab16e25fefd34b5e537a46bed8fc96; >= 879bca0a2c4f40b08d09a95a2a0c3c6513060b5c, < 61f67c230a5e7c741c352349ea80147fbe65bfae; Linux 6.16
Fixed in: Linux 61f67c230a5e7c741c352349ea80147fbe65bfae

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-23077 being exploited?

There is no confirmed exploitation: CVE-2026-23077 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.23% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-23077?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-23077?

Linux \>= 879bca0a2c4f40b08d09a95a2a0c3c6513060b5c, \< a4d9dbfc1bab16e25fefd34b5e537a46bed8fc96; \>= 879bca0a2c4f40b08d09a95a2a0c3c6513060b5c, \< 61f67c230a5e7c741c352349ea80147fbe65bfae; Linux 6.16.

### Is there a fix for CVE-2026-23077?

Yes. Fixed in Linux 61f67c230a5e7c741c352349ea80147fbe65bfae. Upgrade Linux to 61f67c230a5e7c741c352349ea80147fbe65bfae or later.

### How do I check if I'm affected by CVE-2026-23077?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/a4d9dbfc1bab16e25fefd34b5e537a46bed8fc96>
- patch: <https://git.kernel.org/stable/c/61f67c230a5e7c741c352349ea80147fbe65bfae>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-23077>

HTML: <https://flawdb.com/CVE-2026-23077> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-23077>
