CVE-2026-23077: mm/vma: fix anon_vma UAF on mremap() faulted, unfaulted merge
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---
Security readout for executives and security teams
Plain-English summary
A Linux kernel memory-management flaw can cause use-after-free when a local process remaps memory beside certain faulted and unfaulted anonymous regions. Successful exploitation could compromise confidentiality, integrity, and availability. The supplied CVSS score is 7.8, reflecting high impact but requiring local, low-privileged access.
Executive priority
Treat as a high-priority kernel update for systems permitting untrusted local execution. It is not documented as remotely exploitable or actively exploited, so prioritize by local code-execution exposure and operational criticality rather than assuming an internet-wide emergency.
Technical view
A regression introduced by commit 879bca0a2c4f mishandles anon_vma state during specific mremap() VMA merges. When copied, faulted memory is merged with adjacent unfaulted VMAs, missing duplication and fork-child checks can leave stale anon_vma references, producing a use-after-free. The cited stable commits contain corrections and regression self-tests.
Likely exposure
Exposure is limited to Linux kernels containing the identified regression without an applicable fix. The supplied affected-version data includes 6.16, 6.18.8, and 6.19, but its encoding is ambiguous. Confirm exposure using distribution advisories and commit ancestry rather than version strings alone.
Exploitation context
The CVSS vector describes a local, low-complexity attack requiring low privileges and no user interaction. The source reports syzbot discovery and KEV is false; it provides no evidence of active exploitation. Internet reachability alone does not satisfy the stated local attack requirement.
Researcher notes
The vulnerable edge cases involve mremap() merging a copied, faulted VMA with previous, next, or both adjacent unfaulted VMAs. The correction addresses anon_vma duplication and rejects unsafe fork-child merges. The bundle names two stable commits, but does not map each commit to specific release branches.
Mitigation direction
Install a vendor kernel containing the applicable cited stable fix or an equivalent backport.
Reboot into the updated kernel and confirm the running version.
Prioritize systems where untrusted users or workloads can execute local code.
Consult the Linux distribution vendor if commit or version applicability remains unclear.
Validation and detection
Record the running kernel version and distribution package build.
Check whether the kernel contains commit 879bca0a2c4f and lacks an applicable fix.
Verify the installed kernel includes the vendor backport or cited stable correction.
Confirm the corrected kernel is active after reboot.
Run vendor-supported regression or kernel self-tests where operationally safe.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2026-23077 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
0ADP providers
3Source links
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.