Vulnerability record
mm/vma: avoid broken uffd merge on mremap
In the Linux kernel, the following vulnerability has been resolved:
mm/vma: avoid broken uffd merge on mremap
Userfaultfd often causes unexpected interactions within mm, and does so at the intersection of uffd, mremap() and VMA merging.
When an mremap of a VMA occurs, copy_vma_and_data() calls mremap_userfaultfd_prep() to notify uffd of this.
However, mremap_userfaultfd_prep() simply drops the UFFD context for the VMA if the user did not register it for remap, i.e. didn't specify the UFFD_FEATURE_EVENT_REMAP flag.
This is OK for the VMA itself, as upon page table move, move_ptes() clears…
Remediation
No fixed version has been published for this vulnerability yet. Check the references below for vendor advisories, workarounds and mitigation guidance.
Sources