Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mm: usercopy: move the virt_addr_valid() below the is_vmalloc_addr()
The is_kmap_addr() and the is_vmalloc_addr() in the check_heap_object() will not work, because the virt_addr_valid() will exclude the kmap and vmalloc regions. So let's move the virt_addr_valid() below the is_vmalloc_addr(). Signed-off-by: Yuanzheng Song <[email protected]> Fixes: 4e140f5 ("mm/usercopy: Check kmap addresses properly") Fixes: 0aef499 ("mm/usercopy: Detect vmalloc overruns") Cc: Matthew Wilcox (Oracle) <[email protected]> Signed-off-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected]
- Loading branch information