In the Linux kernel, the following vulnerability has been resolved: vfio/type1: prevent underflow of lockedvm via exec() When a vfio container is preserved across exec, the task does not change, but it gets a new mm with lockedvm=0, and loses the count from existing dma mappings. If the user later unmaps a dma mapping, lockedvm underflows to a large unsigned value, and a subsequent dma map request fails with ENOMEM in _accountlockedvm. To avoid underflow, grab and save the mm at the time a dma is mapped. Use that mm when adjusting lockedvm, rather than re-acquiring the saved task's mm, which may have changed. If the saved mm is dead, do nothing. lockedvm is incremented for existing mappings in a subsequent patch.