Vulnerability · Published Oct 18, 2026 · Assigned by Linux
CVE-2026-98507mm/rmap: fix missing barrier between anon_vma init and vma->anon_vma publish
High 7.8
In plain English
A high-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 6% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | no fix listed | DEBIAN-CVE-2026-98507 |
| Debian:13 | linux | 6.12.113-1 | DEBIAN-CVE-2026-98507 |
| Debian:14 | linux | 7.2.9-1 | DEBIAN-CVE-2026-98507 |
| Debian:12 | linux-6.12 | 6.12.113-1~deb12u1 | DEBIAN-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:26.04:LTS | linux | 7.0.0-42.42 | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-aws | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-aws | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:26.04:LTS | linux-aws | 7.0.0-1016.17 | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-aws-6.14 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-aws-6.17 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-aws-7.0 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-azure | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-azure | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:26.04:LTS | linux-azure | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-azure-6.14 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-azure-6.17 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-azure-7.0 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-azure-fde | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-azure-fde | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:26.04:LTS | linux-azure-fde | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-azure-fde-6.14 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-azure-fde-6.17 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.8 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-azure-fde-7.0 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-azure-nvidia-6.14 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-gcp | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-gcp | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:26.04:LTS | linux-gcp | 7.0.0-1016.18 | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-gcp-6.14 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-gcp-6.17 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-gcp-7.0 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-gke | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-gke | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:26.04:LTS | linux-gke | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-gkeop | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-gkeop | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-hwe-6.14 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-hwe-6.17 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-hwe-7.0 | 7.0.0-42.42~24.04.1 | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-ibm | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-ibm | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:26.04:LTS | linux-ibm | 7.0.0-1017.17 | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-intel-iotg | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-kvm | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-lowlatency | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-lowlatency | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-lowlatency-hwe-6.11 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-nvidia | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-nvidia | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:26.04:LTS | linux-nvidia | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-nvidia-6.17 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-nvidia-7.0 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:26.04:LTS | linux-nvidia-bos | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-oem-6.14 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-oem-6.17 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:26.04:LTS | linux-oem-7.0 | 7.0.0-1017.17 | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-oracle | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-oracle | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:26.04:LTS | linux-oracle | 7.0.0-1015.16 | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-oracle-6.14 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-oracle-6.17 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-oracle-7.0 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-raspi | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-raspi | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:26.04:LTS | linux-raspi | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:26.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:26.04:LTS | linux-riscv | 7.0.0-42.42.1 | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-riscv-6.14 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-riscv-6.17 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-riscv-7.0 | 7.0.0-42.42.1~24.04.1 | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-vmware | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:24.04:LTS | linux-xilinx | no fix listed | UBUNTU-CVE-2026-98507 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | no fix listed | UBUNTU-CVE-2026-98507 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1 – before badedec499f6320742368c73fa77cd63dcf8ca555c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1 – before aef0f69b515af1c8a4147f68a46b6b81854f46f75c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1 – before 7d103fc7b836084af585d9d3471334624354cf265c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1 – before 465e222815c8839445d09028fa4c77e70f7f1c7d5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1 – before a500df43cde075f6ea4b8bae495d89f2c35b3e165c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1 – before 4cef512a955e4008ae4436a4fc97726976df1fdf5c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1 – before d348a715380bfcc6a611bdf722169d53fd01e7355c341ee1dfc8fe69d66b1c8b19e463c6d7201ae1 – before b6ac0b3f6013c168f22cad97e79967accacb08e1 |
| Linux | Linux | 2.6.36 |
References
- https://git.kernel.org/stable/c/badedec499f6320742368c73fa77cd63dcf8ca55
- https://git.kernel.org/stable/c/aef0f69b515af1c8a4147f68a46b6b81854f46f7
- https://git.kernel.org/stable/c/7d103fc7b836084af585d9d3471334624354cf26
- https://git.kernel.org/stable/c/465e222815c8839445d09028fa4c77e70f7f1c7d
- https://git.kernel.org/stable/c/a500df43cde075f6ea4b8bae495d89f2c35b3e16
- https://git.kernel.org/stable/c/4cef512a955e4008ae4436a4fc97726976df1fdf
- https://git.kernel.org/stable/c/d348a715380bfcc6a611bdf722169d53fd01e735
- https://git.kernel.org/stable/c/b6ac0b3f6013c168f22cad97e79967accacb08e1