PT-2026-163826
CVE-2026-139785
·
Published
2026-11-30
·
Updated
2026-11-30
Description by
Score
N/A
Not availableNo severity ratings or metrics are available. When they are, we'll update the corresponding info on the page.
In the Linux kernel, the following vulnerability has been resolved:
mm/vma: avoid losing atomic VMA flags when setting sticky VMA flags
vma merge existing range() merges an existing VMA (middle) when its
attributes have changed to match those of one or both adjacent VMAs.
Sticky flags are propagated if they are set in any of the merged VMAs. They
are initialised from vmg->vma flags, which is assumed to contain middle's
sticky flags when the function is invoked.
However, the VMA write lock is not held for middle when they are first
populated, so concurrent updates to atomic VMA flags may occur, which will
be lost upon merge.
This can result in fork failing to propagate guard region markers and (if
file-backed) THP collapse discarding them.
Resolve this by propagating the sticky flags after middle is locked.
Make life easier by factoring this into propagate sticky flags(), which
treats vmg->vma flags as its base (in case any sticky flags are set there),
updating it as sticky flags are accumulated from merged VMAs.
Also update vma expand() to use propagate sticky flags() so all merge paths
utilise it.
propagate sticky flags() also asserts that the VMA write lock is held for
the VMA whose sticky flags are being read, with a comment explaining why.
Another means by which atomic VMA flags can fail to be observed is when the
merge is finalised in commit merge().
rmap locks are dropped in vma complete() before the sticky flags are
written, meaning an rmap walker can observe the VMA without sticky flags
set, which can also result in retract page tables() discarding guard
markers.
Resolve this by assigning the sticky flags before dropping rmap locks,
factored into commit sticky flags() with a write assert on the VMA being
written to.
Also remove the vma set flags mask() invocation at the end of
vma merge existing range() as this was introduced by commit
64212ba02e66 ("mm: implement sticky VMA flags") to propagate sticky flags,
which is now redundant with the introduction of commit sticky flags().
The vma set flags mask() invocation at the end of vma expand() setting
sticky flags only is also removed for the same reason.
Also update vma merge existing range()'s comment to reflect the fact that
vmg->vma flags gets updated.
Finally, update the userland VMA tests to reflect a previously missed
const-ification in vma assert write locked() which would otherwise cause a
warning when building them.
Found an issue in the description? Have something to add? Feel free to write us 👾