From: David Safford <safford@watson.ibm.com>
To: James Morris <jmorris@namei.org>
Cc: John Johansen <jjohansen@suse.de>,
linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: AppArmor FAQ
Date: Tue, 17 Apr 2007 11:03:50 -0400 [thread overview]
Message-ID: <1176822230.3366.65.camel@localhost.localdomain> (raw)
In-Reply-To: <Line.LNX.4.64.0704161846110.13905@d.namei>
On Mon, 2007-04-16 at 20:20 -0400, James Morris wrote:
> On Mon, 16 Apr 2007, John Johansen wrote:
>
> > Label-based security (exemplified by SELinux, and its predecessors in
> > MLS systems) attaches security policy to the data. As the data flows
> > through the system, the label sticks to the data, and so security
> > policy with respect to this data stays intact. This is a good approach
> > for ensuring secrecy, the kind of problem that intelligence agencies have.
>
> Labels are also a good approach for ensuring integrity, which is one of
> the most fundamental aspects of the security model implemented by SELinux.
>
> Some may infer otherwise from your document.
In fact, I am not sure how you can provide integrity support without
labels. AppArmor confines a process, but does not effectively confine
its output files, precisely because the output files are not labeled.
Other processes are free to access the unlabeled, potentially malicious
output files without restriction.
> Imagine if you were re-inventing Unix and decided to implement pathname
> security for DAC instead of inode labeling. What you would have is a more
> generalized version of apparmor, with the DAC attributes of pathnames for
> the entire filesystem stored in a text database with an in-kernel regex
> engine performing path reconstruction and pattern matching on every file
> access. Sound like a good idea? I hope not.
Actually, this is pretty much how z/OS/RACF works. Labels and pathnames
for all files are stored in one database. There are advantages and
disadvantages to this design, but is does work, and does have an EAL4+
certification on a Labeled Security Protection Profile.
> And you can still use pathnames under SELinux to locate an object to
> label, just as you do with DAC. You just don't put a security label on
> the path itself.
SELinux _has_ to use pathnames to fix some ugly cases where new files
are created with the wrong label. It uses restorecond to fix the labels
for files such as resolv.conf, mtab, utab, and wtab, when they are
created. The restorecond policy file is textual, and separate from the
SELinux labels, which is somewhat inelegant.
RACF provides both labels and canonical paths for all files in one
location. There is no false dichotomy between path based and label
based security. I don't know how to do this in Linux, with namespaces,
mounts, and symlinks, but the concept is an interesting counterpoint
in the discussion.
dave
next prev parent reply other threads:[~2007-04-17 15:03 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-16 21:33 AppArmor FAQ John Johansen
2007-04-17 0:20 ` James Morris
2007-04-17 15:03 ` David Safford [this message]
2007-04-17 16:00 ` Karl MacMillan
2007-04-17 18:05 ` Andi Kleen
2007-04-17 17:47 ` James Morris
2007-04-17 18:10 ` Andi Kleen
2007-04-17 20:19 ` Casey Schaufler
2007-04-17 20:50 ` James Morris
2007-04-17 21:16 ` Andi Kleen
2007-04-17 21:41 ` Karl MacMillan
2007-04-17 22:12 ` Andi Kleen
2007-04-17 22:29 ` Karl MacMillan
2007-04-17 21:58 ` Alan Cox
2007-04-18 13:45 ` James Morris
2007-04-18 14:33 ` Shaya Potter
2007-04-18 19:41 ` Crispin Cowan
2007-04-18 20:03 ` Shaya Potter
2007-04-18 21:14 ` James Morris
2007-04-19 17:14 ` Stephen Smalley
2007-06-09 21:01 ` Pavel Machek
2007-06-09 21:28 ` david
2007-06-09 23:02 ` Pavel Machek
2007-06-10 0:06 ` david
2007-04-18 20:15 ` David Lang
2007-04-19 17:27 ` Stephen Smalley
2007-04-17 21:48 ` Karl MacMillan
2007-04-17 23:12 ` Casey Schaufler
2007-04-17 22:26 ` Karl MacMillan
2007-04-19 17:46 ` Stephen Smalley
2007-04-20 18:45 ` David Lang
2007-04-20 19:23 ` Karl MacMillan
2007-04-17 23:09 ` Crispin Cowan
2007-04-17 23:20 ` Karl MacMillan
2007-04-19 17:56 ` Stephen Smalley
2007-04-17 21:55 ` Karl MacMillan
2007-04-17 22:55 ` Crispin Cowan
2007-04-17 23:13 ` Karl MacMillan
2007-06-09 14:11 ` Pavel Machek
2007-04-18 7:21 ` Rob Meijer
2007-04-18 7:08 ` David Lang
2007-04-18 13:33 ` James Morris
2007-04-18 12:15 ` Joshua Brindle
2007-04-18 13:31 ` Casey Schaufler
2007-04-18 14:05 ` Rob Meijer
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=1176822230.3366.65.camel@localhost.localdomain \
--to=safford@watson.ibm.com \
--cc=jjohansen@suse.de \
--cc=jmorris@namei.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@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;
as well as URLs for NNTP newsgroup(s).