Re: [PATCH v4 05/17] add support for Clang's Shadow Call Stack (SCS)

From: Miguel Ojeda
Date: Fri Nov 01 2019 - 18:36:20 EST


On Fri, Nov 1, 2019 at 11:12 PM Sami Tolvanen <samitolvanen@xxxxxxxxxx> wrote:
>
> This change adds generic support for Clang's Shadow Call Stack,
> which uses a shadow stack to protect return addresses from being
> overwritten by an attacker. Details are available here:
>
> https://clang.llvm.org/docs/ShadowCallStack.html
>
> Note that security guarantees in the kernel differ from the
> ones documented for user space. The kernel must store addresses
> of shadow stacks used by other tasks and interrupt handlers in
> memory, which means an attacker capable reading and writing
> arbitrary memory may be able to locate them and hijack control
> flow by modifying shadow stacks that are not currently in use.
>
> Signed-off-by: Sami Tolvanen <samitolvanen@xxxxxxxxxx>
> Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>

Reviewed-by: Miguel Ojeda <miguel.ojeda.sandonis@xxxxxxxxx>

Cheers,
Miguel