Yuanzheng Song a5f4d9df1f 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 <songyuanzheng@huawei.com>
Fixes: 4e140f59d285 ("mm/usercopy: Check kmap addresses properly")
Fixes: 0aef499f3172 ("mm/usercopy: Detect vmalloc overruns")
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220505071037.4121100-1-songyuanzheng@huawei.com
2022-05-16 16:02:21 -07:00
..
2021-05-05 11:27:24 -07:00
2022-03-24 19:06:45 -07:00
2022-03-22 15:57:01 -07:00
2022-03-22 17:03:12 -07:00
2022-02-14 19:51:47 +01:00
2022-03-24 19:06:51 -07:00
2022-01-15 16:30:28 +02:00
2022-03-22 17:03:12 -07:00
2022-03-23 18:03:08 -07:00
2022-03-28 17:29:53 -07:00
2022-03-22 17:03:12 -07:00
2022-03-22 17:03:12 -07:00
2022-03-24 19:06:45 -07:00
2022-03-22 17:03:12 -07:00
2022-03-22 17:03:12 -07:00
2022-03-22 17:03:12 -07:00
2022-03-22 18:26:56 -07:00
2022-03-24 19:06:44 -07:00
2022-01-23 06:20:44 +02:00
2021-05-07 00:26:35 -07:00
2022-04-01 14:40:42 -04:00
2022-03-22 18:26:56 -07:00
2022-03-22 15:57:03 -07:00
2022-03-23 12:33:21 -07:00
2022-03-23 12:33:21 -07:00
2022-03-22 18:26:56 -07:00
2022-03-22 18:26:56 -07:00
2022-03-22 17:03:12 -07:00
2022-03-24 11:58:57 -07:00
2022-03-22 17:03:12 -07:00
2022-03-22 17:03:12 -07:00
2022-01-15 16:30:31 +02:00