login
Header Space

 
 

Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO.

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Serge E. Hallyn <serue@...>
Cc: Matthew Wilcox <matthew@...>, Tetsuo Handa <penguin-kernel@...>, <paul.moore@...>, <akpm@...>, <linux-kernel@...>, <linux-security-module@...>, <takedakn@...>, <linux-fsdevel@...>, <netdev@...>
Date: Sunday, April 13, 2008 - 10:05 pm

Serge E. Hallyn wrote:
As I just posted, a rule of "no mods to /some/pathname" is broken, which 
is why AppArmor has no such construct.

Things that pathname-based access control is good at:

    * *System Integrity:* Many of the vital components of a UNIX system
      are stored in files with Well Known Names such as /etc/shadow,
      /var/www/htdocs/index.html and /home/crispin/.ssh/known_hosts. The
      contents of the actual data blocks is less important than the
      integrity of what some random process gets when it asks for these
      resources by name. Preserving the integrity of what responds to
      the Well Known Name is thus easier if you restrict access based on
      the name.
    * *Dynamic Access Control:* A special case of the above pertains to
      files that may or may not exist. If you don't *have* a /etc/hosts
      file, it is still important to have a rule that controls whether
      it can be created. This is hard to do in label-based systems,
      because the file does not exist to put a label on, so you have to
      kludge it by either creating the file with zero length and
      labeling it, or by creating more complex policy for the parent
      /etc directory, and that's hard given the number of uses for /etc
      such as /etc/motd. In a name based scheme, you simply don't
      provide write permission to "/etc/hosts" unless you mean it, and
      it can be enforced even if such a file does not exist.
    * *Ad Hoc Generalization:* Label-based access control generalizes
      policy in that the policy treats all files and resources that
      share a label the same. If you want to make a new generalization
      that encompasses *part* of the files that share a label, but *not
      all* of those files, then you have to "split the label", relabel
      the file system, and revise the policy accordingly. Name-based
      access control lets you create ad hoc generalizations, so that
      *my* policy can grant access to "/var/www/*.pl" without regard to
      whatever labels or rules some other policy has applied to the same
      directory tree.
    * *Familiar Interface:* Administrators are accustomed to
      administering the box in terms of the names of the files that
      matter. A name-based policy is therefore somewhat more familiar
      than a policy with label abstractions, where they then have to go
      look at the restorecon file to discover what files will/should
      have what labels.
    * *Practical Concerns:* Not all file systems support labels, and so
      label-based schemes become coarse grained when they run into them.
      Name based schemes remain granular when specifying access down
      into the internals of such file systems. Legacy Linux file systems
      like ext2 don't matter much any more, but persistent file systems
      that will never have label support include NFSv3 file systems
      (nearly every Network Appliance NAS server out there) and FAT32
      file system (most every USB storage device).

A lot of what's going on is the duality of the one:many relationships 
between labels and names:

    * Labels: one label represents many files
          o this property is why ad hoc generalization fails in label
            based systems
    * Names: many names can represent a single file
          o This property is why deny rules fail in name based systems

Therefore, I am not claiming name-based access controls to be the 
ultimate. Rather, there are duals for all of the above that induce 
circumstances where label-based systems are superior. Each class of 
system has strengths and weaknesses. These are name-based strengths.

Crispin

-- 
Crispin Cowan, Ph.D.               http://crispincowan.com/~crispin
The Olympic Games: Symbolizing oppression and corruption for over a hundred years

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Tetsuo Handa, (Fri Apr 4, 8:23 am)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Paul Moore, (Mon Apr 7, 11:40 am)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Toshiharu Harada, (Wed Apr 9, 4:37 am)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Serge E. Hallyn, (Wed Apr 9, 9:22 am)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Toshiharu Harada, (Thu Apr 10, 11:57 pm)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Matthew Wilcox, (Wed Apr 9, 9:11 am)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Tetsuo Handa, (Fri Apr 11, 10:12 am)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Matthew Wilcox, (Fri Apr 11, 10:30 am)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Crispin Cowan, (Sun Apr 13, 9:41 pm)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Matthew Wilcox, (Mon Apr 14, 9:48 am)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Crispin Cowan, (Mon Apr 14, 11:21 pm)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Serge E. Hallyn, (Sun Apr 13, 12:36 pm)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Crispin Cowan, (Sun Apr 13, 10:05 pm)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Toshiharu Harada, (Tue Apr 15, 9:00 am)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Stephen Smalley, (Mon Apr 14, 10:17 am)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Crispin Cowan, (Tue Apr 15, 12:59 am)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Stephen Smalley, (Wed Apr 16, 12:31 pm)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Crispin Cowan, (Thu Apr 17, 3:49 am)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Stephen Smalley, (Thu Apr 17, 8:42 am)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Jamie Lokier, (Thu Apr 17, 4:45 am)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Casey Schaufler, (Mon Apr 14, 1:05 pm)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Tetsuo Handa, (Sat Apr 12, 7:33 am)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Stephen Smalley, (Wed Apr 9, 9:26 am)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Stephen Smalley, (Wed Apr 9, 8:49 am)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Toshiharu Harada, (Thu Apr 10, 1:57 am)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Stephen Smalley, (Thu Apr 10, 8:51 am)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Toshiharu Harada, (Fri Apr 11, 7:48 am)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Casey Schaufler, (Mon Apr 7, 6:57 pm)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Daniel Walker, (Fri Apr 4, 12:29 pm)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Tetsuo Handa, (Mon Apr 7, 9:56 am)
Re: [TOMOYO #7 30/30] Hooks for SAKURA and TOMOYO., Daniel Walker, (Mon Apr 7, 11:39 am)
speck-geostationary