# CVE-2026-98507: mm/rmap: fix missing barrier between anon\_vma init and vma-\>anon\_vma publish

> 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.18% (percentile 4, 2026-11-26)
- **Published:** 2026-10-18T15:17:13.767Z
- **Modified:** 2026-10-30T13:21:15.317Z

## Who should check

- Anyone running Linux \>= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, \< badedec499f6320742368c73fa77cd63dcf8ca55; \>= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, \< aef0f69b515af1c8a4147f68a46b6b81854f46f7; \>= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, \< 7d103fc7b836084af585d9d3471334624354cf26; \>= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, \< 465e222815c8839445d09028fa4c77e70f7f1c7d; \>= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, \< a500df43cde075f6ea4b8bae495d89f2c35b3e16; \>= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, \< 4cef512a955e4008ae4436a4fc97726976df1fdf; \>= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, \< d348a715380bfcc6a611bdf722169d53fd01e735; \>= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, \< b6ac0b3f6013c168f22cad97e79967accacb08e1
- Anyone running Linux 2.6.36

## Description

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

mm/rmap: fix missing barrier between anon\_vma init and vma-\>anon\_vma publish

On arm64 server, we find that a task trying to grab the anon\_vma lock
triggers hungtask.

INFO: task main:2354726 blocked for more than 120 seconds.
      Tainted: G            E     5.10.0-0021.aarch64 \#1
"echo 0 \> /proc/sys/kernel/hung\_task\_timeout\_secs" disables this message.
task:main            state:D stack:    0 pid:2354726 ppid:2350673 flags:0x00000a01
Call trace:
 \_\_switch\_to+0x7c/0xbc
 \_\_schedule+0x3b4/0x8a0
 schedule+0x50/0xe0
 rwsem\_down\_write\_slowpath+0x3cc/0x6cc
 down\_write+0x60/0x260
 \_\_anon\_vma\_prepare+0x6c/0x210
 do\_anonymous\_page+0x258/0x660
 handle\_pte\_fault+0x188/0x214
 \_\_handle\_mm\_fault+0x1b0/0x380
 handle\_mm\_fault+0xf4/0x284
 do\_page\_fault+0x19c/0x494
 do\_translation\_fault+0xcc/0xf8
 do\_mem\_abort+0x48/0xac
 el0\_da+0x44/0x80
 el0\_sync\_handler+0x88/0xb4
 el0\_sync+0x160/0x180

After analyzing the vmcore, we found the anon\_vma-\>root-\>rwsem.count is
-1.  There is another anon\_vma whose anon\_vma-\>root-\>rwsem.count is 1, the
anon\_vma-\>root-\>rwsem.owner shows the lock is held, but the stack of the
task shows the task doesn't hold the anon\_vma lock.

After adding more debugging info, we found \_\_anon\_vma\_prepare() reuses
anon\_vma and triggers the UAF of anon\_vma-\>root due to missing memory
barrier, leading to locking and unlocking two different anon\_vma-\>root,
thus leading to an anon\_vma will never be unlocked, and another anon\_vma
couldn't be locked anymore.

This race requires two adjacent VMAs that are not merged but are
anon\_vma-compatible (e.g., they differ in VMA\_ACCESS\_FLAGS that can be
changed by mprotect()).  Two threads fault on each VMA concurrently, both
calling \_\_anon\_vma\_prepare() with only mmap\_lock held for reading.

    THREAD A                             THREAD B
\_\_anon\_vma\_prepare                \_\_anon\_vma\_prepare
 find\_mergeable\_anon\_vma() -\> NULL
 anon\_vma = anon\_vma\_alloc();
   anon\_vma-\>root = anon\_vma;
 // the two stores may be reordered
 vma-\>anon\_vma = anon\_vma;
                                   // finds A's anon\_vma
                                   anon\_vma = find\_mergeable\_anon\_vma(vma);
                                   anon\_vma\_lock\_write(anon\_vma);
                                     // may still see the old root
                                     down\_write(&anon\_vma-\>root-\>rwsem);
                                   anon\_vma\_unlock\_write(anon\_vma);
                                     // see the new root, never unlock old
                                     up\_write(&anon\_vma-\>root-\>rwsem);

thread A triggers page fault and calls \_\_anon\_vma\_prepare() to prepare
anon\_vma for the faulting vma.  \_\_anon\_vma\_prepare() allocates and
initializes a new anon\_vma, and then publishes it to the vma with a plain
store.  anon\_vma\_prepare() only requires the mmap\_lock to be held for
reading, so two threads can fault on adjacent VMAs at the same time. 
While thread A publishes a new anon\_vma, thread B could find the anon\_vma
via find\_mergeable\_anon\_vma() and then locks anon\_vma-\>root-\>rwsem.

The store to anon\_vma-\>root in anon\_vma\_alloc() and the store to
vma-\>anon\_vma can be reordered.  The anon\_vma\_lock\_write() and spin\_lock()
only provide acquire semantics, which do not prevent prior stores from
being reordered after them.  The release semantics of the corresponding
spin\_unlock() and anon\_vma\_unlock\_write() come too late, the store to
vma-\>anon\_vma is already published before they take effect.  As a result,
thread B can observe the following order:

    vma-\>anon\_vma = anon\_vma;
    anon\_vma-\>root = anon\_vma;

The anon\_vma slab is SLAB\_TYPESAFE\_BY\_RCU, so a newly allocated anon\_vma
may reuse memory from a previously freed one.  The constructor
(anon\_vma\_ctor) does not reset anon\_vma-\>root, and \_\_put\_anon\_vma()
doesn't clear it either, so the old root value persists until
anon\_vma\_alloc() overwrites it.  If that store isn't v
---truncated---

## Affected and fixed versions

- Linux: \>= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, \< badedec499f6320742368c73fa77cd63dcf8ca55; \>= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, \< aef0f69b515af1c8a4147f68a46b6b81854f46f7; \>= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, \< 7d103fc7b836084af585d9d3471334624354cf26; \>= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, \< 465e222815c8839445d09028fa4c77e70f7f1c7d; \>= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, \< a500df43cde075f6ea4b8bae495d89f2c35b3e16; \>= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, \< 4cef512a955e4008ae4436a4fc97726976df1fdf; \>= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, \< d348a715380bfcc6a611bdf722169d53fd01e735; \>= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, \< b6ac0b3f6013c168f22cad97e79967accacb08e1 (cvelist)
- Linux: 2.6.36 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2026-98507.md
Affected: Linux >= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, < badedec499f6320742368c73fa77cd63dcf8ca55; >= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, < aef0f69b515af1c8a4147f68a46b6b81854f46f7; >= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, < 7d103fc7b836084af585d9d3471334624354cf26; >= 5c341ee1dfc8fe69d66b1c8…
Fixed in: Linux 7d103fc7b836084af585d9d3471334624354cf26, Linux 465e222815c8839445d09028fa4c77e70f7f1c7d, Linux 4cef512a955e4008ae4436a4fc97726976df1fdf

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-98507 being exploited?

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

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

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

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

Linux \>= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, \< badedec499f6320742368c73fa77cd63dcf8ca55; \>= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, \< aef0f69b515af1c8a4147f68a46b6b81854f46f7; \>= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, \< 7d103fc7b836084af585d9d3471334624354cf26; \>= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, \< 465e222815c8839445d09028fa4c77e70f7f1c7d; \>= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, \< a500df43cde075f6ea4b8bae495d89f2c35b3e16; \>= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, \< 4cef512a955e4008ae4436a4fc97726976df1fdf; \>= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, \< d348a715380bfcc6a611bdf722169d53fd01e735; \>= 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1, \< b6ac0b3f6013c168f22cad97e79967accacb08e1; Linux 2.6.36.

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

Yes. Fixed in Linux 7d103fc7b836084af585d9d3471334624354cf26, Linux 465e222815c8839445d09028fa4c77e70f7f1c7d, Linux 4cef512a955e4008ae4436a4fc97726976df1fdf. No fix listed yet: follow the vendor advisory.

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

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

- other: <https://git.kernel.org/stable/c/badedec499f6320742368c73fa77cd63dcf8ca55>
- other: <https://git.kernel.org/stable/c/aef0f69b515af1c8a4147f68a46b6b81854f46f7>
- other: <https://git.kernel.org/stable/c/7d103fc7b836084af585d9d3471334624354cf26>
- other: <https://git.kernel.org/stable/c/465e222815c8839445d09028fa4c77e70f7f1c7d>
- other: <https://git.kernel.org/stable/c/a500df43cde075f6ea4b8bae495d89f2c35b3e16>
- other: <https://git.kernel.org/stable/c/4cef512a955e4008ae4436a4fc97726976df1fdf>
- other: <https://git.kernel.org/stable/c/d348a715380bfcc6a611bdf722169d53fd01e735>
- other: <https://git.kernel.org/stable/c/b6ac0b3f6013c168f22cad97e79967accacb08e1>

## 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-98507>

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