[lkml]   [2021]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] static_call,x86: Robustify trampoline patching
On Sun, 31 Oct 2021 at 21:45, Peter Zijlstra <> wrote:
> On Sun, Oct 31, 2021 at 09:21:56PM +0100, Ard Biesheuvel wrote:
> > That means we can support static calls on arm64 now without breaking
> > Clang CFI, and work on a solution for the redundant jumps on a more
> > relaxed schedule.
> Yes, arm64 has a 'problem' with having already merged the clang-cfi
> stuff :/
> I'm hoping the x86 solution can be an alternative CFI scheme, I'm
> starting to really hate this one. And I'm not at all convinced the
> proposed scheme is the best possible scheme given the constraints of
> kernel code. AFAICT it's a compromise made in userspace.

Your scheme only works with IBT: the value of %r11 is under the
adversary's control so it could just point it at 'foo+0x10' if it
wants to call foo indirectly, and circumvent the check. So without IBT
(or BTI), I think the check fundamentally belongs in the caller, not
in the callee.

 \ /
  Last update: 2021-11-01 00:37    [W:0.122 / U:0.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site