[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b9686477-4673-f977-bfb6-3ec4cc9e63fa@overdrivepizza.com>
Date: Mon, 19 Apr 2021 09:45:48 -0700
From: Joao Moreira <joao@...rdrivepizza.com>
To: Rasmus Villemoes <linux@...musvillemoes.dk>,
Kees Cook <keescook@...omium.org>,
Andy Lutomirski <luto@...nel.org>
Cc: Borislav Petkov <bp@...en8.de>,
Sami Tolvanen <samitolvanen@...gle.com>,
X86 ML <x86@...nel.org>, Josh Poimboeuf <jpoimboe@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Sedat Dilek <sedat.dilek@...il.com>,
linux-hardening@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>,
clang-built-linux <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH 05/15] x86: Implement function_nocfi
> Why not? In particular, I'd really like somebody to answer the question
> "why not just store a cookie before each address-taken or
> external-linkage function?".
>
FWIIW, this was done before (at least twice): First with grsecurity/PaX
RAP (https://grsecurity.net/rap_faq) then with kCFI
(https://www.blackhat.com/docs/asia-17/materials/asia-17-Moreira-Drop-The-Rop-Fine-Grained-Control-Flow-Integrity-For-The-Linux-Kernel-wp.pdf,
https://github.com/kcfi/kcfi - which is no longer maintained).
At the time I worked on kCFI someone raised a concern regarding this
cookie-based design being mutually exclusive to execute-only memories
(XOM), what, if XOM is really relevant to someone, should be a valid
concern.
Since design is being questioned, an x86/CET-specific third design for
CFI was recently discussed here:
https://www.openwall.com/lists/kernel-hardening/2021/02/11/1 -- I assume
that, arch-dependency considered, this should be easier to integrate
when compared to clang-cfi. Also, given that it is based on CET, this
also has the benefit of constraining mispeculations (which is a nice
side-effect).
Tks, Joao
Powered by blists - more mailing lists