diff options
| author | Kees Cook <keescook@chromium.org> | 2017-03-24 10:51:25 -0700 |
|---|---|---|
| committer | Satya Tangirala <satyat@google.com> | 2018-09-21 14:51:28 -0700 |
| commit | 4bc04315211c053502cf84e81d78af41af66c581 (patch) | |
| tree | d506b878f25ecf41bca2ded9cd135baa8292c32f /arch/x86/entry/common.c | |
| parent | a3772a806a04164f2fc9a956bb997c4b8c8179e9 (diff) | |
BACKPORT: lkdtm: add bad USER_DS test
(cherry-picked from e22aa9d781a27a961581c57442911309fb86a48e)
This adds CORRUPT_USER_DS to check that the get_fs() test on syscall
return (via __VERIFY_PRE_USERMODE_STATE) still sees USER_DS. Since
trying to deal with values other than USER_DS and KERNEL_DS across all
architectures in a safe way is not sensible, this sets KERNEL_DS, but
since that could be extremely dangerous if the protection is not present,
it also raises SIGKILL for current, so that no matter what, the process
will die. A successful test will be visible with a BUG(), like all the
other LKDTM tests.
Change-Id: I1d2585de65032f0f6b9baea2a71f92bfc296c94b
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Satya Tangirala <satyat@google.com>
Diffstat (limited to 'arch/x86/entry/common.c')
0 files changed, 0 insertions, 0 deletions
