mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Satyam Sharma" <satyam.sharma@gmail.com>
To: "Alexander Wuerstlein" <snalwuer@cip.informatik.uni-erlangen.de>
Cc: "Alexander Wuerstlein" <arw@arw.name>,
	linux-kernel@vger.kernel.org,
	"Johannes Schlumberger"
	<spjsschl@stud.informatik.uni-erlangen.de>,
	linux-crypto@vger.kernel.org
Subject: Re: [PATCH] Check files' signatures before doing suid/sgid [2/4]
Date: Tue, 26 Jun 2007 07:43:34 +0530	[thread overview]
Message-ID: <a781481a0706251913x73a5680ej33a0e2ac61bad418@mail.gmail.com> (raw)
In-Reply-To: <20070626002659.GM9741@cip.informatik.uni-erlangen.de>

On 6/26/07, Alexander Wuerstlein
<snalwuer@cip.informatik.uni-erlangen.de> wrote:
> [...]
> Nope. I unluckily wrote 'userspace' where I should have said something else:
> Chain-of-trust is handled in what I would label 'Adminspace' (Where we do the
> signing as in points 1 and 2). There is a very small number of signatures (in
> our example one) known to the kernel and only those are trusted, and those are
> applied to the binaries by the administrator in your point 2. The kernel does
> and should never rely on userspace to tell it which signatures are trustworthy.
> Only the administrator may do so by means of the signatures directly compiled
> into the kernel.
>
> So in short: Chain-of-trust is handled by the administrator in his secure
> central location.

Ok, so the "trust chain" you're talking about is simply the decision of the
admin to compile-in the (verified and trusted) public keys of known trusted
entities into the kernel at build time. That is not really scalable, but I guess
you might just as well impose such a restriction for sake of simplicity.

[ I initially thought a scenario where a given binary is signed by an
entity whose
corresponding public key is _not_ present in the kernel, but who does possess
a signature -- over its name, id and public key -- by another entity whose
corresponding public key _is_ built into the kernel). Then at the time of
verification there's really no other alternative to *build* the entire
chain at the
_point of verification_ (in-kernel) itself ... but this obviously
introduces huge and
ugly complexities that you'd have a hard time bringing into the kernel :-) That
"signature over name, id and public key" could be a _certificate_ (if you care
about following standards), and building their chains in-kernel ... well. But if
you really want to differentiate between kernel and userspace from security
perspective, and want to give such functionality, I don't see any easy
way out. ]

> >> So far for the initial idea. Perhaps it would be useful to have more than
> >> one
> >> key or some more complex scheme for obtaining the keys and checking their
> >> validity.  But as all of this would need to be part of the kernel we
> >> decided to
> >> rather keep it as simple as possible, anything complex is better and more
> >> flexibly done in userspace.
> >
> > Well, if you're trusting (privileged) userspace already, I'm suddenly not so
> > sure as to what new is this patchset bringing to the table in the first place
> > ...
>
> We do not trust any userspace application, see above.
>
> > could you also describe the attack vectors / threats that you had in mind
> > that get blocked with the proposed scheme?
>
> We focus on attacks where an attacker may alter some executable file, for
> example by altering a mounted nfs-share, manipulating disk-content by simply
> pulling a disk, mounting it and writing to it, etc.
>
> This relies on the kernel beeing trustworthy of course, so one would need to
> take special measures to protect the kernel-image from beeing similarly
> altered. One (somewhat not-so-secure method) would be supplying kernel images
> by PXE and forbidding local booting, another measure would be using a TPM
> and an appropriate bootloader to check the kernel for unwanted modifications.

Kernel-userspace differentiation from security perspective is always tricky
(so this is why I pointed you to the discussions whenever such stuff, such
as asymmetric crypto and modsign etc are proposed to be merged). It's
definitely not impossible to compromise a _running_ kernel from privileged
userspace, if it really wanted to do so ...

Satyam

  reply	other threads:[~2007-06-26  2:13 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-21 15:55 [PATCH] signed binaries support [0/4] Johannes Schlumberger
2007-06-21 16:17 ` Adrian Bunk
2007-06-21 16:29   ` Alexander Wuerstlein
2007-06-21 17:23     ` Adrian Bunk
2007-06-21 17:34       ` Alexander Wuerstlein
2007-06-21 18:05         ` Adrian Bunk
2007-06-21 18:21           ` Johannes Schlumberger
2007-06-22 18:25 ` [PATCH] export xattr_resolve_name_sns [1/4] Alexander Wuerstlein
2007-06-22 18:25 ` [PATCH] Check files' signatures before doing suid/sgid [2/4] Alexander Wuerstlein
2007-06-22 19:36   ` Satyam Sharma
2007-06-24 22:58     ` Alexander Wuerstlein
2007-06-25 23:53       ` Satyam Sharma
2007-06-26  0:27         ` Alexander Wuerstlein
2007-06-26  2:13           ` Satyam Sharma [this message]
2007-06-23 17:54   ` Jan Engelhardt
2007-06-22 18:25 ` [PATCH] sns: check related executable memory of binaries [3/4] Alexander Wuerstlein
2007-06-22 18:25 ` [PATCH] sns: add syscall to check signed state of a process [4/4] Alexander Wuerstlein
2007-06-21 16:02 [PATCH] Check files' signatures before doing suid/sgid [2/4] Alexander Wuerstlein
2007-06-21 17:17 ` Arjan van de Ven
2007-06-21 17:25   ` Alexander Wuerstlein
2007-06-21 17:29     ` Arjan van de Ven
2007-06-21 17:46       ` Alexander Wuerstlein
2007-06-21 18:49         ` Arjan van de Ven
2007-06-21 21:40           ` Johannes Schlumberger
2007-06-23 18:01         ` Jan Engelhardt
2007-06-25 10:54           ` Johannes Schlumberger

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=a781481a0706251913x73a5680ej33a0e2ac61bad418@mail.gmail.com \
    --to=satyam.sharma@gmail.com \
    --cc=arw@arw.name \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=snalwuer@cip.informatik.uni-erlangen.de \
    --cc=spjsschl@stud.informatik.uni-erlangen.de \
    /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

all inboxes | Powered by JetHome®