mm/vma: fix anon_vma UAF on mremap() faulted, unfaulted merge
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
mm/vma: fix anon_vma UAF on mremap() faulted, unfaulted merge
Patch series "mm/vma: fix anon_vma UAF on mremap() faulted, unfaulted merge", v2.
Commit 879bca0a2c4f ("mm/vma: fix incorrectly disallowed anonymous VMA merges") introduced the ability to merge previously unavailable VMA merge scenarios.
However, it is handling merges incorrectly when it comes to mremap() of a faulted VMA adjacent to an unfaulted VMA. The issues arise in three cases:
1. Previous VMA unfaulted:
copied -----| v |-----------|.............| | unfaulted |(faulted VMA)| |-----------|.............| prev
2. Next VMA unfaulted:
From the CVE record · Linux
The Linux kernel has an anon_vma use-after-free bug in its VMA merge logic. A local process can trigger the affected merge by using mremap() on a faulted VMA adjacent to an unfaulted VMA. No user interaction is described.
Administrators running Linux kernels that include commit 879bca0a2c4f should check their exposure.