]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
lkdtm/usercopy: Moves the KERNEL_DS test to non-canonical
authorKees Cook <keescook@chromium.org>
Sat, 6 Apr 2019 15:52:11 +0000 (08:52 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Jun 2019 03:34:47 +0000 (11:34 +0800)
commit3656dca39b5367ceb51bfd0fa448d9bfc7012972
tree43fdbce45f517d6d0b153c22afd0178da9b144f6
parent226fe899656a6dddf35a336ac4df67d2224fdf91
lkdtm/usercopy: Moves the KERNEL_DS test to non-canonical

[ Upstream commit 2bf8496f6e9b7e9a557f65eb95eab16fea7958c7 ]

The prior implementation of the KERNEL_DS fault checking would work on
any unmapped kernel address, but this was narrowed to the non-canonical
range instead. This adjusts the LKDTM test to match.

Fixes: 00c42373d397 ("x86-64: add warning for non-canonical user access address dereferences")
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/misc/lkdtm/usercopy.c