From: Vivek Goyal <vgoyal@redhat.com>
To: Josh Boyer <jwboyer@gmail.com>
Cc: linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org, zohar@linux.vnet.ibm.com,
dmitry.kasatkin@intel.com, akpm@linux-foundation.org,
ebiederm@xmission.com
Subject: Re: [PATCH 4/4] binfmt_elf: Elf executable signature verification
Date: Mon, 18 Mar 2013 16:33:19 -0400 [thread overview]
Message-ID: <20130318203319.GM20743@redhat.com> (raw)
In-Reply-To: <CA+5PVA4fxN4EhKQJ5C4dLG__ZRzrYPKFqNnZuDgssXCYAjX2yQ@mail.gmail.com>
On Mon, Mar 18, 2013 at 04:23:11PM -0400, Josh Boyer wrote:
> On Fri, Mar 15, 2013 at 4:35 PM, Vivek Goyal <vgoyal@redhat.com> wrote:
> > Do elf executable signature verification (if one is present). If signature
> > is present, it should be valid. Validly signed files are given a capability
> > CAP_SIGNED.
> >
> > If file is unsigned, it can execute but it does not get the capability
> > CAP_SIGNED.
> >
> > This is work in progress. This patch is just an RFC to show how one
> > can go about making use of IMA APIs for executable signature
> > verification.
> >
> > Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
> > ---
> > fs/Kconfig.binfmt | 12 ++++++++++++
> > fs/binfmt_elf.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
> > 2 files changed, 56 insertions(+), 0 deletions(-)
> >
> > diff --git a/fs/Kconfig.binfmt b/fs/Kconfig.binfmt
> > index 0efd152..cbb1d4a 100644
> > --- a/fs/Kconfig.binfmt
> > +++ b/fs/Kconfig.binfmt
> > @@ -23,6 +23,18 @@ config BINFMT_ELF
> > ld.so (check the file <file:Documentation/Changes> for location and
> > latest version).
> >
> > +config BINFMT_ELF_SIG
> > + bool "ELF binary signature verification"
> > + depends on BINFMT_ELF
> > + select INTEGRITY
> > + select INTEGRITY_SIGNATURE
> > + select INTEGRITY_ASYMMETRIC_KEYS
> > + select IMA
> > + select IMA_APPRAISE
> > + default n
> > + ---help---
> > + Check ELF binary signature verfication.
> > +
>
> I haven't reviewed the whole patch set, but this caught my eye. There
> are a couple things wrong with it.
>
> 1) The help text isn't helpful. It could definitely be more verbose and
> should probably point to something in Documentation/ that describes what
> this whole thing is.
Sure, I will fix that. Actually this posting was more for getting the
IMA interfaces sorted out and just wanted to quickly show how new
interfaces will be used in ELF code.
>
> 2) The select mechanism is horrible. I would really like to see this
> option use "depends on" instead of select given that you're selecting in
> a whole subsystem that people probably aren't going to have already
> enabled.
I like "select" better in this context. If you want this feature, then you
need to select a bunch of other features which feature depends on.
Otherwise it is a configuration nightmare. How does one know what are
different parts which need to be enabled before elf binary signature
verification options becomes visible.
And it is very similar to module signing. It selects bunch of options
when user wants to enable modules signing (instead of depending on these
options).
config MODULE_SIG
bool "Module signature verification"
depends on MODULES
select KEYS
select CRYPTO
select ASYMMETRIC_KEY_TYPE
select ASYMMETRIC_PUBLIC_KEY_SUBTYPE
select PUBLIC_KEY_ALGO_RSA
select ASN1
select OID_REGISTRY
select X509_CERTIFICATE_PARSER
Thanks
Vivek
next prev parent reply other threads:[~2013-03-18 20:33 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-15 20:35 [RFC PATCH 0/4] IMA: Export functions for file integrity verification Vivek Goyal
2013-03-15 20:35 ` [PATCH 1/4] integrity: Identify asymmetric digital signature using new type Vivek Goyal
2013-03-15 20:35 ` [PATCH 2/4] ima: export new IMA functions for signature verification Vivek Goyal
2013-03-15 20:35 ` [PATCH 3/4] capability: Create a new capability CAP_SIGNED Vivek Goyal
2013-03-15 21:12 ` Casey Schaufler
2013-03-18 17:05 ` Vivek Goyal
2013-03-18 17:50 ` Casey Schaufler
2013-03-18 18:30 ` Vivek Goyal
2013-03-18 19:19 ` Casey Schaufler
2013-03-18 22:32 ` Eric W. Biederman
2013-03-19 21:01 ` Serge E. Hallyn
2013-03-20 5:07 ` James Morris
2013-03-20 14:41 ` Vivek Goyal
2013-03-20 14:50 ` Matthew Garrett
2013-03-15 20:35 ` [PATCH 4/4] binfmt_elf: Elf executable signature verification Vivek Goyal
2013-03-18 20:23 ` Josh Boyer
2013-03-18 20:33 ` Vivek Goyal [this message]
2013-03-19 14:39 ` Mimi Zohar
2013-03-20 15:21 ` Vivek Goyal
2013-03-20 17:41 ` Mimi Zohar
2013-03-20 18:39 ` Vivek Goyal
2013-03-20 15:59 ` Vivek Goyal
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=20130318203319.GM20743@redhat.com \
--to=vgoyal@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dmitry.kasatkin@intel.com \
--cc=ebiederm@xmission.com \
--cc=jwboyer@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=zohar@linux.vnet.ibm.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