[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <73efb4f9-b2f8-703d-f1a0-eefc070bdefb@virtuozzo.com>
Date: Wed, 29 Aug 2018 11:33:36 +0300
From: Andrey Ryabinin <aryabinin@...tuozzo.com>
To: Jann Horn <jannh@...gle.com>, Andy Lutomirski <luto@...nel.org>,
the arch/x86 maintainers <x86@...nel.org>,
Dmitry Vyukov <dvyukov@...gle.com>
Cc: kernel list <linux-kernel@...r.kernel.org>,
kasan-dev@...glegroups.com,
Alexander Potapenko <glider@...gle.com>,
Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH v2] x86/entry/64: wipe KASAN stack shadow before
rewind_stack_do_exit()
On 08/28/2018 09:40 PM, Jann Horn wrote:
> 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 patch does not wipe exception stacks; if you oops on an exception
> stack, you might get random KASAN false-positives from other tasks
> afterwards. This is probably relatively uninteresting, since if you're
> oopsing on an exception stack, you likely have 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@...gle.com>
> ---
Acked-by: Andrey Ryabinin <aryabinin@...tuozzo.com>
Powered by blists - more mailing lists