CVE-2026-139798
mm: do not unintentionally overwrite atomic VMA flags
CVE-2026-139798 affects Linux.
No known exploitation. No EPSS score yet. Fixed versions are out.
No public exploit knownFix1 product2 fixed builds listed below
No ready-made check. Neither Nuclei nor OpenVAS has one for this CVE yet.
What to do
Find your product and version, then upgrade to the build on the right.
- LinuxAffected: ≥ 2ab7f1bbafc927c69374d45578011c814c26ae2f, < a336cd46459c1a7608cc805ec04a59890e993baaUpgrade to: a336cd46459c1a7608cc805ec04a59890e993baaAffected: ≥ 2ab7f1bbafc927c69374d45578011c814c26ae2f, < 13fc99f46399c9d38d1b54ecf0a3f387ba04d05dUpgrade to: 13fc99f46399c9d38d1b54ecf0a3f387ba04d05dStated by: CVE record
Versions as the sources state them. Full version matrix after sign-in
What it is
From the CVE record
In the Linux kernel, the following vulnerability has been resolved: mm: do not unintentionally overwrite atomic VMA flags Patch series "mm: avoid losing atomic VMA flags", v1. 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. Additionally, one case in which VMA_SOFTDIRTY_BIT was overwritten is also addressed. This series addresses each of these, while keeping the logic inline with existing conventions. Each patch in this series is a hotfix. This patch (of 4): madvise, mlock and mprotect take a copy of a VMA's flags holding only the VMA read lock, later writing it back under the write lock (in madvise_update_vma(), mlock_fixup(), mlock_vma_pages_range() and mprotect_fixup()). This was done on the assumption that VMA flags cannot change with a read lock held. However this changed in commit 2ab7f1bbafc9 ("mm/madvise: allow guard page install/remove under VMA lock"), which allowed VM_ATOMIC_SET_ALLOWED flags (currently only VMA_MAYBE_GUARD_BIT) to be written concurrently under a VMA read lock. The actual write itself is safe as this is done under the VMA write lock at which point no further concurrent writes can occur, however at this point the stale flags mean that these callers can unintentionally overwrite atomic flags incorrectly. The consequences of this are significant - a missing VMA_MAYBE_GUARD_BIT could result in page tables not being copied on fork (the vma_needs_copy() check can return false) or being overwritten on file-backed THP collapse (the file_backed_vma_is_retractable() can return true). Resolve the issue by always taking care to retain existing atomic flags when overwriting VMA flags, replacing the inconsistently named vma_flags_reset_once() with vma_overwrite_flags() to do so, and always invoking it when flags are overwritten like this. Reads are a problem too - madvise, mlock and mprotect all compare VMA flags without a VMA write lock held via vma_flags_same_pair(). This has more serious impact, as concurrent changes to atomic VMA flags can cause two sets of VMA flags to be wrongly considered different. For mprotect and madvise this causes a useless split, but mlock is impacted more seriously as it can result in mm->locked_vm underflow. Fix this by updating vma_flags_same_pair() to disregard VM_ATOMIC_SET_ALLOWED VMAs - VMA equality is the same as VMA mergeability, and atomic VMA flags are disregarded when comparing VMA flags for merge - so this is justified semantically. Additionally, remove the redundant vma_flags_same_mask() and the unused vma_flags_same() as part of the change, and replace VM_ATOMIC_SET_ALLOWED with VMA_ATOMIC_SET_ALLOWED, using the new VMA flag API. Finally, update userland VMA tests to reflect the changes.
In plain language
No plain-language summary for this CVE yet.
Exploitation
Where each signal puts this CVE on the scale from published to confirmed exploited.
- CISA KEV
Not in the catalog. CISA has not confirmed exploitation.
- Public exploits
No public exploit or proof of concept found in the sources we track.
- EPSS
No EPSS score yet. New CVEs are usually scored within a few days.
Lifecycle
2 events over 0 days, from the signal feeds we watch.
- Publishedrecord updated
Affected products
Sources
Questions about CVE-2026-139798
- Which versions are affected by CVE-2026-139798?
- Linux: ≥ 2ab7f1bbafc927c69374d45578011c814c26ae2f, < a336cd46459c1a7608cc805ec04a59890e993baa; ≥ 2ab7f1bbafc927c69374d45578011c814c26ae2f, < 13fc99f46399c9d38d1b54ecf0a3f387ba04d05d.
- How do I fix or mitigate CVE-2026-139798?
- Upgrade to a fixed build for your product branch: a336cd46459c1a7608cc805ec04a59890e993baa, 13fc99f46399c9d38d1b54ecf0a3f387ba04d05d.
Last updated
Related articles
All articlesWatch the software you run.
My Stack ranks new CVEs for your products by real-world exploitation, so the next serious one reaches you without reading every advisory.
We'll flag the next CVE, public exploit or patch for Linux, not every advisory.
A free account adds
- The full version matrix and every affected product
- Exploit links, proofs of concept and Metasploit modules
- Email alerts for the products you watch
- The same data over REST API, MCP and CLI