Commit 0c837ef
userfaultfd: check VM_MAYWRITE was set after verifying the uffd is registered
Calling UFFDIO_UNREGISTER on virtual ranges not yet registered in uffd
could trigger an harmless false positive WARN_ON. Check the vma is
already registered before checking VM_MAYWRITE to shut off the false
positive warning.
Link: http://lkml.kernel.org/r/[email protected]
Cc: <[email protected]>
Fixes: 29ec906 ("userfaultfd: shmem/hugetlbfs: only allow to register VM_MAYWRITE vmas")
Signed-off-by: Andrea Arcangeli <[email protected]>
Reported-by: [email protected]
Acked-by: Mike Rapoport <[email protected]>
Acked-by: Hugh Dickins <[email protected]>
Acked-by: Peter Xu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
(cherry picked from commit 01e881f)
Orabug: 29163742
CVE: CVE-2018-18397
Signed-off-by: Shan Hai <[email protected]>
Reviewed-by: Jack Vogel <[email protected]>1 parent 509b21e commit 0c837ef
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1567 | 1567 | | |
1568 | 1568 | | |
1569 | 1569 | | |
1570 | | - | |
1571 | 1570 | | |
1572 | 1571 | | |
1573 | 1572 | | |
| |||
1576 | 1575 | | |
1577 | 1576 | | |
1578 | 1577 | | |
| 1578 | + | |
| 1579 | + | |
1579 | 1580 | | |
1580 | 1581 | | |
1581 | 1582 | | |
| |||
0 commit comments