mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Ulrich Drepper <drepper@gmail.com>
Cc: Axelle Apvrille <axelle_apvrille@yahoo.fr>,
	Nix <nix@esperi.org.uk>, Arjan van de Ven <arjan@infradead.org>,
	linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	disec-devel@lists.sourceforge.net
Subject: Re: [ANNOUNCE] Release Digsig 1.5: kernel module for run-timeauthentication of binaries
Date: Fri, 28 Apr 2006 11:09:14 -0500	[thread overview]
Message-ID: <20060428160914.GA31473@sergelap.austin.ibm.com> (raw)
In-Reply-To: <a36005b50604280833k5a811384r5f3a6f92dd707256@mail.gmail.com>

Quoting Ulrich Drepper (drepper@gmail.com):
> On 4/25/06, Axelle Apvrille <axelle_apvrille@yahoo.fr> wrote:
> >1- "does this also prevent people writing their own
> >elf loader in a bit of perl and just mmap the code"
> >
> >I'm not sure to exactly understand what you mean:
> >
> >- if you mean writing an application able to read &
> >'interpret' an ELF executable: again, I think DigSig
> >will prevent this, because when you mmap the code,
> >this calls (at kernel level) do_mmap which triggers an
> >LSM hook called file_mmap. And we implement checks in
> >that hook...
> >
> >- if you mean modifying the ELF loader so that do_mmap
> >/ file_mmap aren't called, well you'll need to hack
> >the kernel, won't you ?
> >
> >- finally, note you also have choice not to sign this
> >elf loader of yours. If it isn't signed, it won't ever
> >run ;-)
> 
> No, there no problem writing a loader.  All you need is to create
> anonymous mappings.  Via mmap, maybe on the stack, some heaps are
> still executable.  Then you load the code, fix it up for the address,
> and be done.  The kernel cannot and will not prevent a read(2) call on
> the binary.  That's all that's needed.  And without the SELinux
> support in place you cannot prevent non-exec memory creation and even

BS - you can stack another LSM to prevent that.

Or, stack it with SELinux.  I've tested that combination before with no
problems.

> then, some people need it (jvms, OpenGL libs, etc) to generate code on
> the fly.  So it's never completely ruled out.  Again, look at the code
> in http://people.redhat.com/drepper/selinux-mem.html.
> 
> Given you have executable anonymous memory it is a one-time small
> effort to write a loader and you're done.  Nothing your signature

A one time effort to write it *and sign it*.

You could just as well write it and give it it's own domain with {
execheap execmem execstack execmod } permissions.

> detection code can do about it.  This is snake oil.

-serge

  reply	other threads:[~2006-04-28 16:09 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-24 16:27 Makan Pourzandi (QB/EMC)
2006-04-24 16:47 ` Arjan van de Ven
2006-04-24 20:32   ` Nix
2006-04-24 20:45     ` Arjan van de Ven
2006-04-24 23:35       ` Nix
2006-04-25  6:30         ` Arjan van de Ven
2006-04-25  7:16           ` Nix
2006-04-25 16:11             ` Axelle Apvrille
2006-04-25 16:56               ` Arjan van de Ven
2006-04-25 18:57                 ` Nix
2006-04-25 19:37                   ` Arjan van de Ven
2006-04-25 19:52                     ` Valdis.Kletnieks
2006-04-26  4:43                       ` Kyle Moffett
2006-04-25 19:01               ` Chris Boot
2006-04-25 19:09                 ` Valdis.Kletnieks
2006-04-25 20:00                 ` Serge E. Hallyn
2006-04-28 15:33               ` Ulrich Drepper
2006-04-28 16:09                 ` Serge E. Hallyn [this message]
2006-04-28 16:11                   ` Arjan van de Ven
2006-04-28 16:29                     ` Serge E. Hallyn
2006-04-28 17:53                       ` Arjan van de Ven
2006-04-28 20:48                       ` Michael Tokarev
2006-04-28 18:16                   ` Christoph Hellwig
2006-04-28 19:22                     ` Serge E. Hallyn
2006-04-25 13:00           ` Geert Uytterhoeven

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=20060428160914.GA31473@sergelap.austin.ibm.com \
    --to=serue@us.ibm.com \
    --cc=arjan@infradead.org \
    --cc=axelle_apvrille@yahoo.fr \
    --cc=disec-devel@lists.sourceforge.net \
    --cc=drepper@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=nix@esperi.org.uk \
    /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®