kernel-hardening.lists.openwall.com archive mirror
 help / color / mirror / Atom feed
From: Joao Moreira <joao@overdrivepizza.com>
To: Kees Cook <keescook@chromium.org>
Cc: x86-64-abi@googlegroups.com, kernel-hardening@lists.openwall.com,
	samitolvanen@google.com, hjl.tools@gmail.com,
	linux-hardening@vger.kernel.org
Subject: Re: Fine-grained Forward CFI on top of Intel CET / IBT
Date: Fri, 19 Mar 2021 15:51:04 -0700	[thread overview]
Message-ID: <632c02ef-efef-c068-1228-1b869d395142@overdrivepizza.com> (raw)
In-Reply-To: <8e7dfa49-2c74-1349-017c-9a4700557519@overdrivepizza.com>


>> That is a good point about R11 availability. Have you examined kernel
>> images for unintended gadgets? It seems like it'd be rare to find an 
>> arbitrary R11 load
>> followed by an indirect call together, but stranger gadgets show up, and
>> before the BPF JIT obfuscation happened, it was possible for attackers
>> (with sufficient access) to construct a series of immediates that would
>> contain the needed gadgets. (And not all systems run with BPF JIT
>> hardening enabled.)
>
> I haven't. On a CET-enabled environment, these unintended gadgets 
> would need to be preceded with an endbr instruction, otherwise they 
> won't be reachable indirectly. I assume that these cases can still 
> exist (specially in the presence of things like vulnerable BPF JIT or 
> if you consider full non-fineibt-instrumented functions working as 
> gadgets), but that this is a raised bar. Besides that, there are 
> patches like this one (which unfortunately was abandoned) that could 
> come handy:
>
> https://reviews.llvm.org/D88194
>
Actually (as clear in the end of the patch review) this was replaced by 
a different patch, which got in :)

review: https://reviews.llvm.org/D89178

commit: https://reviews.llvm.org/rGf385823e04f300c92ec03dbd660d621cc618a271


o/

Joao


      reply	other threads:[~2021-03-19 22:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-11  5:51 Fine-grained Forward CFI on top of Intel CET / IBT Joao Moreira
2021-03-18 20:29 ` Kees Cook
2021-03-19 21:41   ` Joao Moreira
2021-03-19 22:51     ` Joao Moreira [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=632c02ef-efef-c068-1228-1b869d395142@overdrivepizza.com \
    --to=joao@overdrivepizza.com \
    --cc=hjl.tools@gmail.com \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-hardening@vger.kernel.org \
    --cc=samitolvanen@google.com \
    --cc=x86-64-abi@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).