public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Kazuki Omo(Company)" <k-omo@sios.com>
To: "Serge E. Hallyn" <serge@hallyn.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
	Kyle Moffett <mrmacman_g4@mac.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Bill Davidsen <davidsen@tmr.com>,
	Stephen Smalley <sds@tycho.nsa.gov>,
	James Morris <jmorris@namei.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	casey@schaufler-ca.com, linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Version 3 (2.6.23-rc8) Smack: Simplified Mandatory	Access Control Kernel
Date: Tue, 30 Oct 2007 13:01:48 +0900	[thread overview]
Message-ID: <4726ACAC.7060609@sios.com> (raw)
In-Reply-To: <20071008180038.GC7106@vino.hallyn.com>

Dear, Folks,

Now we are planning to submit LIDS to mainline.
(As you know, it already written for supporing LSM for several years.)

When we will finish to re-write documentation and some FAQ, then
we will be able to submit the patch.

Sincerely,

OMO

Serge E. Hallyn wrote: (2007/10/09 03:00):
> Quoting Eric W. Biederman (ebiederm@xmission.com):
>> "Serge E. Hallyn" <serge@hallyn.com> writes:
>> Also I'm thinking towards what do we have to do isolate the security
>> module stuff in the context of a namespace.  So that a person in
>> a container can setup their own rules that further restrict the
>> system.
> 
> In the selinux example I plan to do set up soon, that will be done
> using the '.' namespace separator.
> 
> Every object/subject in vserver1 will have a type 'vserver1.whatever'.
> 'vserver1.root_t', 'vserver1.etc_t', etc.
> 
> I don't know how far the policy tools have gotten, but they are
> *supposed* to implement constraints at policy compile time such that
> every type which is a child of 'vserver1' would have no more access than
> what is granted to type 'vserver1'.  So this provides a pretty nice
> conceptual way to set up security for a vserver.
> 
> Then using the userspace policy server and metapolicy (this would be a
> step or two beyond my first example) the policy could define rules about
> what sort of policy could be added by a process of type
> 'vserver1.root_t'.  So we can allow the container admin to introduce
> policy changes affecting only his own container, and subject to all
> constraints placed by the host admin on vserver1.
> 
>> So far I'm not ready to do anything yet but I'm keeping a weather eye
>> on the situation so I have a clue what I'm go.
>>
>>> If 1, an selinux policy should cover you.  So you can then skip to 3.
>>> Or, alternatively, I do plan - as soon as my free time clears up a bit -
>>> on demonstrating how to write some selinux policy to create a secure
>>> container based on current -mm + your experimental network namespace
>>> patches.
>> Thanks that sounds interesting.
>>
>>> If 3, then selinux policy modules may actually help you, else either
>>> a new LSM (maybe like LIDS) or a userspace tool which is a front-end to
>>> selinux policy, emulating the iptables rules formats, may be what you
>>> want?
>> I don't want to have to choose my LSM at compile time.  I want to
>> add support into the kernel at compile time and be able to configure
>> it before I go multi-user.  I know this kind of architecture is
>> achievable because iptables allows it.
>>
>> When I conceive as the security modules as just a firewall between
>> applications on my own box I think, oh yeah this is no big deal,
>> I might want to limit something that way some time.  These are just
>> some additional rules on when to return -EPERM.  So I ask myself why
>> is this situation much less flexible and much harder to use then our
>> network firewall code?
> 
> It actually used to be far more flexible than it is now.  The consensus
> appears to be that it's just too hard - at times impossible - to
> properly label every object or subject at some point after they've all
> been created (processes created, inodes read from disk, etc).  Two
> examples:
> 
> 	1. you've got pid 777.  How was it created?  Can you trust it's
> 	history?  In my DTE module I solved this by keeping track of the
> 	*full* invocation history until a policy was loaded.  I think
> 	tomoyo may do something similar.  But it's really not
> 	sufficient, especially since you don't even want a LSM loaded
> 	at all.  So you can't reduce it to 'boot_t executd init_t
> 	executed login_t executed shell_t', you have to keep track of
> 	every inode executed
> 
> 	2. how do you reliably re-evaluate, for some file, what label
> 	to assign to it?  Do you guess at a pathname?  Do you trust that
> 	the inodes have been pre-labeled for every LSM, so when you load
> 	the LSM you can grab the xattrs?
> 
> So it's a valid question - do we address these sorts of concerns in
> order to add flexibility, or do we keep things as simple as possible
> and say that it's up to the distro, for instance, or a site local
> security administrator, to define policy, so that flexibility really
> is of very limited use?
> 
>>>> My impression is that selinux is one monolithic blob that doesn't
>>>> allow me to incrementally add matching or action features that I
>>>> find interesting.
>>> Actually with policy modules it gets much much better.  I have in fact
>>> been able to pretty easily write a short policy module to, say, create
>>> an selinux user which ran as root and had full access to the system to
>>> do system setup for automated testing.  There is a learning curve in
>>> having to look at existing modules for maybe a few days to get started,
>>> but once you get started the policy modules do make it very easy to
>>> add to current policy.
>> Ok. Interesting.  Are these kernel modules?
> 
> Policy modules, loaded through selinuxfs at any time using 'semodule'.
> 
>> Still while I get the general impression that selinux seems to be
>> very close to a generic solution, and that selinux more or less has
>> the architecture we might want.  I don't get the impression that
>> selinux does this at a level that is open to other people doing
>> interesting things.
>>
>> So I still ask the question can we move this functionality down to
>> the LSM in a way that will solve the composition problem between
>> multiple security modules?
> 
> I've tried :)  At a less semantic and more purely technical level, using
> the stacker module.  After a few years it was finally decided (at
> ksummit 2006) that it simply wasn't useful.
> 
> Now perhaps the problem was that I didn't address semantic issues.
> But it does sound to me like what you want is a particular flexible LSM.
> Be it LIDS or SELinux, or something new.
> 
>> It really seems to me that the LSM as currently structured creates
>> a large barrier to entry for people who have just this little thing
>> they want to do that is not possible with any existing security
>> module.
> 
> Yes and it's been made increasingly so far particularly because of the
> perceived potential for 'abuse'.  So to be curt, allowing people like
> you describe to do something small and interesting is deemed far less
> important than making sure that the small thing they want to do fits
> within the LSM mandate and is not a non-upstream module.
> 
> So that is the concern you would need to address before any other.
> 
> Still, I do think that selinux policy modules may do just what you want.
> The main obstacle appears to be that the 'base' policy is so huge that
> it's tough to get started to do something small.
> 
> You also might want to check out LIDS, as its rules are set up pretty
> much the way you seem to want.
> 
> -serge
> -
> To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


-- 
Kazuki Omo: k-omo@sios.com
Group Manager, OSS Technology Center
Diary: http://omok.livejournal.com

  parent reply	other threads:[~2007-10-30  4:35 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-30  0:20 [PATCH] Version 3 (2.6.23-rc8) Smack: Simplified Mandatory Access Control Kernel Casey Schaufler
2007-09-30  8:16 ` Andrew Morton
2007-09-30  8:42   ` Andi Kleen
2007-09-30 17:14     ` Casey Schaufler
2007-09-30 17:34       ` Andi Kleen
2007-09-30 23:24         ` david
2007-09-30 17:29     ` Joshua Brindle
2007-09-30 17:39       ` Andi Kleen
2007-09-30 19:07         ` Theodore Tso
2007-09-30 20:05           ` Andi Kleen
2007-09-30 20:22             ` Theodore Tso
2007-10-01 20:28             ` Casey Schaufler
2007-09-30 20:18           ` Paul Moore
2007-09-30  9:53   ` Christoph Hellwig
2007-09-30 17:19     ` Casey Schaufler
2007-10-02  8:36     ` Thomas Bleher
2007-09-30 17:02   ` Casey Schaufler
2007-09-30 20:30   ` Paul Moore
2007-10-01 11:33   ` James Morris
2007-10-01 15:07     ` Linus Torvalds
2007-10-01 15:40       ` Stephen Smalley
2007-10-01 16:04         ` Linus Torvalds
2007-10-01 17:54           ` Olivier Galibert
2007-10-02 21:02           ` Bill Davidsen
2007-10-02 21:20             ` Linus Torvalds
2007-10-02 23:25               ` Linus Torvalds
2007-10-03  0:12                 ` Alan Cox
2007-10-04 22:56                   ` Derek Fawcus
2007-10-04 23:18                     ` Chuck Ebbert
2007-10-04 23:44                       ` Derek Fawcus
2007-10-03  5:32                 ` Crispin Cowan
2007-10-03  3:54               ` Bill Davidsen
2007-10-03  4:52                 ` Linus Torvalds
2007-10-05  1:44                   ` Eric W. Biederman
2007-10-05  3:04                     ` Kyle Moffett
2007-10-05  4:45                       ` Eric W. Biederman
2007-10-05  5:48                         ` Kyle Moffett
2007-10-05 16:27                           ` Casey Schaufler
2007-10-05 18:42                             ` Stephen Smalley
2007-10-05 20:08                               ` Casey Schaufler
2007-10-05 20:11                               ` Eric W. Biederman
2007-10-08 17:50                                 ` Casey Schaufler
2007-10-08 18:47                                   ` Eric W. Biederman
2007-10-08 18:53                                     ` Serge E. Hallyn
2007-10-08 21:05                                     ` Casey Schaufler
2007-10-08 16:18                             ` Serge E. Hallyn
2007-10-08 17:31                               ` Casey Schaufler
2007-10-09 13:52                                 ` Stephen Smalley
2007-10-09 16:02                                   ` Casey Schaufler
2007-10-08 23:24                               ` Bill Davidsen
2007-10-08 16:06                         ` Serge E. Hallyn
2007-10-08 17:20                           ` Eric W. Biederman
2007-10-08 18:00                             ` Serge E. Hallyn
2007-10-08 19:29                               ` Eric W. Biederman
2007-10-08 19:50                               ` Eric W. Biederman
2007-10-08 20:39                                 ` Casey Schaufler
2007-10-08 21:02                                   ` Eric W. Biederman
2007-10-08 21:20                                 ` Alan Cox
2007-10-10 13:48                                   ` Eric W. Biederman
2007-10-10 15:45                                     ` Stephen Smalley
2007-10-10 17:57                                       ` Casey Schaufler
2007-10-11 10:46                                         ` Kyle Moffett
2007-10-11 15:41                                           ` Casey Schaufler
2007-10-11 18:53                                             ` Kyle Moffett
2007-10-11 20:09                                               ` Alan Cox
2007-10-08 21:51                                 ` Crispin Cowan
2007-10-30  4:01                               ` Kazuki Omo(Company) [this message]
2007-10-30 15:07                                 ` Casey Schaufler
2007-10-08 20:25                             ` Casey Schaufler
2007-10-08 20:57                               ` Eric W. Biederman
2007-10-06 19:14                       ` Bill Davidsen
2007-10-03  0:10             ` Alan Cox
2007-10-03  0:18               ` Linus Torvalds
2007-10-01 16:39         ` Casey Schaufler
2007-10-01 19:00         ` Theodore Tso
2007-10-01 15:38     ` Casey Schaufler
2007-10-01 20:49   ` Jan Engelhardt
2007-10-01  3:47 ` Serge E. Hallyn
2007-10-01  4:15   ` Casey Schaufler

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=4726ACAC.7060609@sios.com \
    --to=k-omo@sios.com \
    --cc=akpm@linux-foundation.org \
    --cc=casey@schaufler-ca.com \
    --cc=davidsen@tmr.com \
    --cc=ebiederm@xmission.com \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mrmacman_g4@mac.com \
    --cc=sds@tycho.nsa.gov \
    --cc=serge@hallyn.com \
    --cc=torvalds@linux-foundation.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