A virtual memory area carries a word of flags, and until recently the rule was that they could only change under the VMA write lock, so code that held the read lock could copy them, work, and write the copy back later. The kernel CNA record says that changed in 6.19: “since commit 2ab7f1bbafc9 (“mm/madvise: allow guard page install/remove under VMA lock”), VMA_MAYBE_GUARD_BIT can be set atomically under the VMA read lock. However, a number of places wrongly assume the flags are stable under the read lock, which can cause stale atomic VMA flags to overwrite existing valid ones.” The places are madvise_update_vma(), mlock_fixup(), mlock_vma_pages_range() and mprotect_fixup(), and the record calls the consequences “significant”: a lost guard bit “could result in page tables not being copied on fork” or “being overwritten on file-backed THP collapse”, and the stale comparison in mlock “can result in mm->locked_vm underflow”. Red Hat rates it Important at 7.8. On any machine running a 6.19, 7.0, 7.1, 7.2 or 7.3 kernel with untrusted local users, upgrade to 7.3.6 or later and reboot; long-term kernels are not affected.
CVE-2026-139798 at a glance.
| Component | Linux kernel, memory management (mm/madvise.c, mm/mlock.c, mm/mprotect.c and include/linux/mm.h), the VMA flag copy-and-write-back in madvise_update_vma(), mlock_fixup(), mlock_vma_pages_range() and mprotect_fixup(), and vma_flags_same_pair(); built in, no module |
| Affected versions | from 2ab7f1bbafc9, the 6.19 commit that allowed guard pages under the VMA read lock: 6.19, 7.0, 7.1, 7.2 and 7.3 before 7.3.6 and 7.4 before 7.4-rc2; 6.18 and every earlier series are not affected, and the 6.19 to 7.2 series are out of support with no fix |
| Fixed in | mainline 7.4-rc2 (commit 13fc99f4, “do not unintentionally overwrite atomic VMA flags”, the first of a four-patch hotfix series: the callers retain existing atomic flags when writing back, vma_flags_reset_once() becomes vma_overwrite_flags(), and vma_flags_same_pair() ignores the atomically settable bits, “VMA equality is the same as VMA mergeability”) and stable 7.3.6 (commit a336cd46) |
| Severity | Red Hat Important, CVSS 3.1 7.8 (AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H, draft, CWE-821 incorrect synchronisation), bug 2586637; the kernel CNA gives no score and NVD (Received, 30 November) carries none; Ubuntu could not be read on 2 December 2026 (client error), nor could SUSE |
| Exploited in the wild | Not on the CISA KEV catalogue (2026.11.30). EPSS 0.00344 (30th percentile) on 2 December 2026 |
| Who is exposed | Any machine on an affected kernel with a local user who can run their own code: the race is between two threads of one process calling madvise(MADV_GUARD_INSTALL) and mprotect(), mlock() or another madvise() on the same area, which needs no privilege at all. Red Hat’s statement: “an authenticated local user can induce memory corruption or trigger a kernel crash without requiring elevated privileges” and “in shared or multi-tenant environments, this flaw compromises host stability”; every RHEL kernel is not affected because none is newer than 6.12, and the same is true of every long-term distribution kernel |
| Published | CVE record 30 November 2026 (kernel CNA); this page built 2 December 2026, last updated 2 December 2026 |
What it is
Guard pages, installed with madvise(MADV_GUARD_INSTALL), mark ranges that fault on access without a mapping behind them, and 6.19 let that operation proceed under the VMA read lock for speed, setting a bit in the VMA’s flags with an atomic operation. The three system calls named in the record predate that and still follow the older pattern: take the read lock, copy the flags into a local, compute the new flags, then take the write lock and store the local. Between the copy and the store, a guard-page install on the same VMA sets its bit atomically, and the store puts the old word back without it.
The lost bit is not cosmetic. The record says vma_needs_copy() consults it to decide whether a child gets a copy of the page tables on fork(), and file_backed_vma_is_retractable() consults it to decide whether khugepaged may replace the page tables of a file-backed area when collapsing it to a huge page; with the bit gone the kernel makes the wrong decision in both, which is where the memory corruption lives. A second effect comes from reads: vma_flags_same_pair() compares two VMAs’ flags without the write lock, so a concurrent atomic change makes equal areas look different; for mprotect and madvise that is “a useless split”, but for mlock it can drive mm->locked_vm below zero, and the record also notes one case where VMA_SOFTDIRTY_BIT was overwritten the same way.
The fix is the first patch of a four-part hotfix series: writers go through a new vma_overwrite_flags() that preserves whatever atomic bits are set at the moment of the store, the comparison ignores the atomically settable bits on the grounds that merge logic already does, the redundant helpers go, and the userland VMA tests are updated. The change post-dates every long-term series, so 7.3 is the only stable backport and 6.19 through 7.2 simply have no fixed release. git.kernel.org refuses automated readers, so the diff is described from the CNA’s copy of the commit message.
Who is affected on Linux
Each row is what the distribution’s own security tracker said on 2 December 2026; the link in the row is the tracker page, which will be newer than this one. No enterprise or long-term distribution kernel is in range; this is a page for rolling releases and self-built kernels.
| Distribution | Status | Fixed package |
|---|---|---|
| Alpine | Not consulted for this page | — |
| Debian | bookworm (6.1.176-1) and trixie (6.12.117-1) not affected (“vulnerable code not present”); forky and sid (7.3.6-1) fixed; no DSA | unstable 7.3.6-1 |
| Ubuntu | Not consulted: ubuntu.com returned a client error to the automated reader on 2 December 2026 (NVD and Red Hat carry no Ubuntu status) | — |
| RHEL, Rocky, Alma, CentOS Stream | Important, 7.8 (bug 2586637, CWE-821); kernel and kernel-rt not affected in RHEL 6, 7, 8, 9 and 10 and in the OpenShift 4 and 5 images: no RHEL kernel carries the 6.19 change | — |
| openSUSE/SLE | Not consulted: suse.com refused the automated reader on 2 December 2026 (client error) | — |
| Fedora, Arch; self-built kernels | Not consulted; upstream stable versions apply | 7.3.6 or later (7.4-rc2 mainline); 6.19, 7.0, 7.1 and 7.2 have no fixed release |
How to check
Is the running kernel in the 6.19 to 7.3 range, and are there local users who can run code. There is no device or module to look for; the race is in the core memory manager and any process can run it.
# 1. the running kernel: affected from 6.19; fixed in 7.3.6 or later (7.4-rc2 mainline)
uname -r
# 2. does this kernel have the guard-page-under-read-lock change (the bit the race loses)
grep -c 'MADV_GUARD_INSTALL' /usr/include/asm-generic/mman-common.h 2>/dev/null
# 3. who else runs code here
who
loginctl list-sessions --no-legend 2>/dev/null
getent passwd | awk -F: '$7 !~ /nologin|false/ && $3 >= 1000 {print $1}'A kernel before 6.19 is not affected, which is every long-term kernel and every enterprise distribution; a 6.19 to 7.3 kernel before 7.3.6 is exposed to every account that can run a process, so step 3 is the attack surface. The header check in step 2 only shows that the madvise operation exists, which it has since 6.13; the atomic-under-read-lock change is what makes 6.19 the start of the range.
How to fix it
Install the fixed kernel and reboot; the memory manager is built in and nothing short of a new image changes it. A kernel from the 6.19 to 7.2 series should move to 7.3.6 rather than wait.
# Debian forky / sid (7.3.6-1) carry the fix; bookworm and trixie are not affected
apt update && apt install linux-image-amd64 && systemctl reboot# Arch, Fedora rawhide and other rolling kernels: take the 7.3.6 or later package when it lands
pacman -Syu linux && systemctl reboot# Self-built kernels: move to 7.3.6 or later
make olddefconfig && make -j"$(nproc)" && make modules_install install && systemctl rebootThere is no runtime switch: the guard-page fast path cannot be turned off and the three system calls cannot be denied to users without breaking ordinary programs. What not to do: do not block madvise with seccomp as a mitigation, since allocators call it constantly and the race is reachable through mlock and mprotect as well; and do not treat a 6.18 LTS kernel as needing this fix, because the record’s range starts at the 6.19 change and 6.18 is not in it.
Sources
- CVE-2026-139798 at CVE.org — the kernel CNA record: the 6.19 change that allowed atomic guard-page flags under the read lock, the four callers that copy and write back stale flags, the fork and THP consequences, the stale comparison and locked_vm underflow, the hotfix series, the version range (30 November 2026)
- Fix commit 13fc99f4 (mainline 7.4-rc2, the commit Debian cites) and the stable backport a336cd46; git.kernel.org refuses automated readers, so the change is described from the CNA record and the trackers
- NVD entry — Received on 30 November 2026; no CVSS metric, CWE or CPE on 2 December 2026
- Distribution trackers: Debian (bookworm and trixie not affected, unstable fixed in 7.3.6-1) · Red Hat (Important 7.8, bug 2586637, CWE-821; every RHEL not affected; the statement on multi-tenant hosts; package states read from the security-data API) · Ubuntu (client error on three attempts on 2 December 2026, not consulted) · SUSE (refused the automated reader on 2 December 2026)
- CISA KEV catalogue 2026.11.30, not listed · EPSS 0.00344 (percentile 0.299) on 2 December 2026
Related reading
- CVE-2026-99463: Linux kernel lazyfree THP anon VMA — the memory manager’s huge-page collapse from the first burst, the other side of file_backed_vma_is_retractable
- CVE-2026-99580: Linux kernel userfaultfd anon VMA — a VMA state change raced from userspace
- CVE-2026-99915: Linux kernel page VMA mapped huge PMD — page-table walking that assumed stable VMA state
- CVE-2026-99707: Linux kernel khugepaged stale TLB — the collapse path this flaw misleads
- CVE-2026-138867: Linux kernel generic_access_phys page boundary — the memory-management entry of the previous twelve
- The Kernel — what the VMA lock protects, why a copy taken under the read lock is stale by the time it is written back, and what a guard page is
This advisory page was assembled from the primary sources listed above on 2 December 2026 and is updated when they change. The facts are theirs; the checks and the ordering are ours. If a row in the distribution table is out of date, the tracker link in that row is the current word.

