summaryrefslogtreecommitdiff
path: root/arch/s390
diff options
context:
space:
mode:
authorJann Horn <jannh@google.com>2018-08-28 21:40:33 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-05 10:26:40 +0300
commitbbcbaf56ff4b677974d8bb3dd67a134f61055dd1 (patch)
tree61022bbefed48ba00d38f10ef422d0c1510e3e1f /arch/s390
parentcf9fcdd6c2a258b817361967b66b5aba5b7376f2 (diff)
downloadlinux-bbcbaf56ff4b677974d8bb3dd67a134f61055dd1.tar.xz
x86/entry/64: Wipe KASAN stack shadow before rewind_stack_do_exit()
commit f12d11c5c184626b4befdee3d573ec8237405a33 upstream. Reset the KASAN shadow state of the task stack before rewinding RSP. Without this, a kernel oops will leave parts of the stack poisoned, and code running under do_exit() can trip over such poisoned regions and cause nonsensical false-positive KASAN reports about stack-out-of-bounds bugs. This does not wipe the exception stacks; if an oops happens on an exception stack, it might result in random KASAN false-positives from other tasks afterwards. This is probably relatively uninteresting, since if the kernel oopses on an exception stack, there are most likely bigger things to worry about. It'd be more interesting if vmapped stacks and KASAN were compatible, since then handle_stack_overflow() would oops from exception stack context. Fixes: 2deb4be28077 ("x86/dumpstack: When OOPSing, rewind the stack before do_exit()") Signed-off-by: Jann Horn <jannh@google.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Alexander Potapenko <glider@google.com> Cc: Kees Cook <keescook@chromium.org> Cc: kasan-dev@googlegroups.com Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20180828184033.93712-1-jannh@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/s390')
0 files changed, 0 insertions, 0 deletions