CVE-2026-90391: lib/test_hmm: fail dmirror_fault() when the mirrored mm is gone
In the Linux kernel, the following vulnerability has been resolved:
lib/testhmm: fail dmirrorfault() when the mirrored mm is gone
dmirrorfault() is called from the dmirrorread() and dmirrorwrite() retry loops after dmirrordoread() or dmirrordowrite() finds a missing device page table entry.
If the mirrored mm has already exited, mmgetnotzero() fails. The current code returns 0 in that case, which tells the caller that faulting succeeded even though no page was faulted and no device page table entry was installed. The caller then retries the same address, hits -ENOENT again, and can loop forever without making progress.
Return -EFAULT instead, so the ioctl fails when the mirrored mm is no longer faultable.
Event History
Frequently Asked Questions
What condition triggers the non-terminating retry behavior?
It occurs when dmirror_read() or dmirror_write() encounters a missing device page-table entry after the mirrored memory-management context has exited. In that state, mmget_not_zero() fails, but the previous behavior reported the fault as successful and caused retries of the same address.
What is the practical impact of the fix?
The affected ioctl now fails with -EFAULT when the mirrored mm can no longer be faulted. This prevents repeated -ENOENT retries that could otherwise loop indefinitely without installing a device page-table entry.
How can an affected system be identified from runtime behavior?
A relevant symptom is a dmirror read or write ioctl repeatedly retrying the same address after a missing device page-table entry is reported, with no forward progress. The condition specifically requires that the associated mirrored mm has already exited.