mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Paris <eparis@redhat.com>
To: linux-kernel@vger.kernel.org
Subject: Introducing SELinux sandbox, confining untrusted binaries
Date: Tue, 26 May 2009 12:54:03 -0400	[thread overview]
Message-ID: <1243356843.2800.23.camel@localhost.localdomain> (raw)

Dan and I (mostly Dan) have started to play with using SELinux to
confine random untrusted binaries.  The program is called 'sandbox.'

http://danwalsh.livejournal.com/28545.html

The idea is to allow administrators to lock down tightly untrusted
applications in a sandbox where they can not use the network and
open/create any file that is not handed to the process.  Can be used to
protect a system while allowing it to run some untrusted binary.

A quick dirty example of this sandbox would be to confine the 'cut'
binary.  If I wanted to create a file of users on my system from
the /etc/passwd file, I could try

> sandbox cut -d: -f1 /etc/passwd > /tmp/users
/bin/cut: /etc/passwd: Permission denied

Which shows the sandbox domain is not allowed to open /etc/passwd

But I can execute
> cat /etc/passwd | sandbox cut -d: -f1 > /tmp/users

And it works just fine.

Inside the sandbox cut wasn't allowed to get to /etc/passwd.  But in the
second example since /etc/passwd was opened by the shell and handed to
cut inside the sandbox it works.

I'd love to hear feedback, suggestions, problems, enhancements,
thoughts, complaints, things of that nature!

Check it out, SELinux confinement made easy.

-Eric


                 reply	other threads:[~2009-05-26 16:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1243356843.2800.23.camel@localhost.localdomain \
    --to=eparis@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /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®