CVE-2026-139786

HighCVSS 7.0/10Last modified Dec 1, 2026

Description

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

mm/vma: avoid spurious write locks when mm->mm_lock_seq overflows

So far the assumption has been that mm->mm_lock_seq overflow is benign, resulting only in readers spuriously falling back to the mmap lock, however it turns out that this was an unsafe assumption.

If a VMA can be spuriously considered write locked that means read lock exclusion does not take place, and thus a VMA can end up write-locked with concurrent readers.

Since overflow only occurs every 2^31 write lock/unlock cycles, resolve the issue by resetting every VMA's vma->vm_lock_seq each time such an overflow occurs.

This is done in vma_end_write_all(), which is called when the mmap write lock is released, i.e. in mmap_write_unlock() and mmap_write_downgrade().

Care must be taken, as resetting the sequence count at overflow means changing the seqcount of VMAs which are already attached and observable.

The mm's seqcount is guaranteed to be odd when a write lock is held, and thus any write locked VMA will have an odd seqcount assigned.

Therefore resetting to an even value prevents spurious write locks, since these can only occur with the mmap write lock held, at which point the mmap seqcount will be odd.

However, vma_start_read() also checks vma->vm_lock_seq == mm->mm_lock_seq, bailing if so (indicating a write lock).

This would cause any even reset value chosen to prevent VMA read locks from being taken - avoid this by also checking whether the VMA seqcount is odd before bailing on the read lock.

So far, vma->vm_lock_seq has defaulted to UINT_MAX, but this has been unnecessary since commit e5e7fb278e59 ("mm: convert mm_lock_seq to a proper seqcount"), since this is assigned when the VMA is still detached, and cannot be observed.

Therefore perform both reset and initialisation of vma->vm_lock_seq by simply setting vma->vm_lock_seq to zero.

The reset, performed in __mm_reset_vma_seqcounts(), only needs to WRITE_ONCE() the value.

However the read of vma->vm_lock_seq in vma_start_read() needs to have acquire semantics to pair with the smp_wmb() in do_raw_write_seqcount_end() so a reader reading a reset value also observes VMA modifications made under the write lock.

Since all VMA write locks were just released and the mmap write lock is still held, there are no concurrent VMA writers.

Concurrent VMA readers are unaffected. New VMA readers observe either zero, never a write lock, or the prior seqcount, behaving as before the reset.

Since this only occurs every 2^31 write lock/unlock cycles, the time taken to update all VMAs is considered to be acceptable.

Also update comments, documentation and VMA userland tests to reflect the change.

User facing effects are - dangerous races that could cause memory corruption or NULL pointer derefences (especially on page table traversal) are avoided.

Metrics

CVSS 3.1 7.0/10CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected software

Source: the vendor's advisory (CNA). NVD analysis pending.

No affected versions have been published.

Timeline

Published
Nov 30, 2026
Last modified
Dec 1, 2026
NVD status
Received

Related CVEs from 2026

CVE-2026-139787In the Linux kernel, the following vulnerability has been resolved: nvme-tcp: fix use-after-free in nvme_tcp_free_ctrl() nvme_tcp_free_ctrCVE-2026-1397887.0In the Linux kernel, the following vulnerability has been resolved: cipso: stop modifying live ip_options_rcu cipso_v4_delopt() operates oCVE-2026-139789In the Linux kernel, the following vulnerability has been resolved: hugetlbfs: enforce F_SEAL_EXEC in setattr F_SEAL_EXEC is enforced by sCVE-2026-139794.3Inappropriate implementation in Paint in Google Chrome prior to 150.0.7871.47 allowed a remote attacker to perform UI spoofing via a craftedCVE-2026-139790In the Linux kernel, the following vulnerability has been resolved: drm/amdgpu: cancel idle work in hw_init failure paths for vcn/uvd/vce/jCVE-2026-139791In the Linux kernel, the following vulnerability has been resolved: net: Use a dedicated flag to track disabled napi instances Trying to dCVE-2026-1397927.0In the Linux kernel, the following vulnerability has been resolved: ALSA: pcm: Prevent O_APPEND open on OSS streams ALSA PCM core accepts CVE-2026-139793In the Linux kernel, the following vulnerability has been resolved: inet: frags: bound the wmem charge of the socket completing a reassemblCVE-2026-139794In the Linux kernel, the following vulnerability has been resolved: f2fs: fix to fetch ino via ino_of_node() under cache lock In f2fs_writCVE-2026-139795In the Linux kernel, the following vulnerability has been resolved: net: mana: Add support to process throttled EQEs When an event queue nCVE-2026-139796In the Linux kernel, the following vulnerability has been resolved: ocfs2/heartbeat: serialize concurrent writes to a region's dev attributCVE-2026-139797In the Linux kernel, the following vulnerability has been resolved: ocfs2/cluster: hold a reference on the heartbeat thread Since commit 6
CVE-2026-139786: High severity, CVSS 7.0 | Vulnix