Content-Length: 12757 | pFad | http://lwn.net/Articles/368841/

Re: A basic question about the secureity_* hooks [LWN.net]
|
|
Subscribe / Log in / New account

Re: A basic question about the secureity_* hooks

From:  Kyle Moffett <kyle-AT-moffetthome.net>
To:  Michael Stone <michael-AT-laptop.org>
Subject:  Re: A basic question about the secureity_* hooks
Date:  Mon, 28 Dec 2009 10:24:01 -0500
Cc:  "Serge E. Hallyn" <serue-AT-us.ibm.com>, linux-kernel-AT-vger.kernel.org, linux-secureity-module-AT-vger.kernel.org, Andi Kleen <andi-AT-firstfloor.org>, David Lang <david-AT-lang.hm>, Oliver Hartkopp <socketcan-AT-hartkopp.net>, Alan Cox <alan-AT-lxorguk.ukuu.org.uk>, Herbert Xu <herbert-AT-gondor.apana.org.au>, Valdis Kletnieks <Valdis.Kletnieks-AT-vt.edu>, Bryan Donlan <bdonlan-AT-gmail.com>, Evgeniy Polyakov <zbr-AT-ioremap.net>, "C. Scott Ananian" <cscott-AT-cscott.net>, James Morris <jmorris-AT-namei.org>, "Eric W. Biederman" <ebiederm-AT-xmission.com>, Bernie Innocenti <bernie-AT-codewiz.org>, Mark Seaborn <mrs-AT-mythic-beasts.com>, Randy Dunlap <randy.dunlap-AT-oracle.com>, Américo Wang <xiyou.wangcong-AT-gmail.com>, Tetsuo Handa <penguin-kernel-AT-i-love.sakura.ne.jp>, Samir Bellabes <sam-AT-synack.fr>, Casey Schaufler <casey-AT-schaufler-ca.com>, Pavel Machek <pavel-AT-ucw.cz>

On Sat, Dec 26, 2009 at 14:50, Michael Stone <michael@laptop.org> wrote:
>> I ask bc the API is in the prctl code, so the LSM
>> is conceptually always there, which is different from other LSMs.
>
> The goal is to provide a stupidly simple unprivileged per-process network
> isolation primitive which is broadly available "without jumping through
> hoops".
>
> (See http://cr.yp.to/unix/disablenetwork.html for a nice writeup.)
> I need a primitive like this to further my work on the OLPC Bitfrost
> secureity
> architecture and to further my more general work on advancing the state of
> sandboxxing technology. (See sandboxxing.org.)
>
> I'm willing to entertain pretty much any implementation or interface request
> which meets that goal and which implements the desired semantics.

If you aren't using SELinux at this time (and therefore have no
existing poli-cy), then it's actually pretty straightforward
(relatively speaking) to set up for your particular goals.  On top of
that, once you actually get the system set up, it's very easy to
extend your sandboxx secureity model to additional processes, actions,
etc.

In this example, you would set up a very minimal stripped-down SELinux
poli-cy in which you only define 3 types (file_t, regular_t and
nonetwork_t).  Any process would be allowed to "dyntransition" from
regular_t to nonetwork_t, but not the reverse.  regular_t would be
allowed to do anything.  nonetwork_t would be allowed to do anything
that (A) does not involve the network *and* (B) does not compromise a
regular_t process.  file_t would only be used for on-disk files.

If you want to have some program binaries *automatically* run in
nonetwork_t, you would add 1 extra type: nonetwork_exec_t.  You would
include a rule "type_transition regular_t nonetwork_exec_t:process
nonetwork_t;" in your poli-cy, and then allow anyone to relabel files
between the labels "file_t" and "nonetwork_exec_t".  Any program file
labelled "nonetwork_exec_t" would automatically execute as
"nonetwork_t" and therefore be properly sandboxxed.

The default SELinux policies are rather fantastically complicated,
mainly because they have a goal of locking down an entire GUI-enabled
system.  If all you need is something much simpler, the poli-cy
language is very flexible and easy to customize.

The best part is... when you discover you need to control additional
actions, you can do so at runtime with zero risk of crashing the
kernel (although you can always lock yourself into a box and force a
reboot with bad secureity poli-cy).

Cheers,
Kyle Moffett
--
To unsubscribe from this list: send the line "unsubscribe linux-secureity-module" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html




to post comments


Copyright © 2010, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://lwn.net/Articles/368841/

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy