Re: [AppArmor 01/41] Pass struct vfsmount to the inode_create LSM hook

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Kyle Moffett
Date: Sunday, May 27, 2007 - 6:35 am

On May 27, 2007, at 03:25:27, Toshiharu Harada wrote:

How is that argument not trivially circular?  "Foo has an assumption  
that foo-property is always properly defined and maintained."  That  
could be said about *anything*:
   *  Unix permissions have an assumption that mode bits are always  
properly defined and maintained
   *  Apache .htaccess security has an assumtion that .htaccess files  
are always properly defined and maintained.
   *  Functional email communication has an assumption that the email  
servers are always properly defined and maintained


So you said "(data labels) can not be easily achieved".  My question  
for you is: How do you manage secure UNIX systems without standard  
UNIX permission bits?  Also:  If you have problems with data labels  
then what makes pathname based labels "easier"?  If there is  
something that could be done to improve SELinux and make it more  
readily configurable then it should probably be done.


I know that I have the correct object labeling because:
   1) I rewrote/modified the default policy to be extremely strict on  
the system where I wanted the extra security and hassle.
   2) I ensured that the type transitions were in place for almost  
everything that needed to be done to administer the system.
   3) I wrote a file-contexts file and relabeled *once*
   4) I loaded the customized policy plus policy for restorecon and  
relabeled for the last time
   5) I reloaded the customized policy without restorecon privileges  
and without the ability to reload the policy again.
   6) I never reboot the system without enforcing mode.
   7) If there are unexpected errors or files have incorrect labels,  
I have to get the security auditor to log in on the affected system  
and relabel the problematic files manually (rare occurrence which  
requires excessive amounts of paperwork).


I would argue that pathname-based security breaks the "simplicity is  
the best virtue (of a security system)" paradigm, because it  
attributes multiple potentially-conflicting labels to the same piece  
of data.  It also cannot protect the secrecy of specific *data* as  
well as SELinux can.  For example:  In SELinux MLS a system could  
mark customer credit-card data as the "cust_private_info" category  
and it would be completely impossible for any program without the  
"cust_private_info" category to read that data, and even then it  
could only be written to files which also have "cust_private_info"  
set.  While a few privileged programs may have "mlsread" or  
"mlswrite" attributes allowing them to override such restrictions,  
it's a much stronger security guarantee than pathname-based security  
could ever provide.


I don't really use "ls -Z" or "ps -Z" when writing SELinux policy; I  
do that only when I actually think I mislabeled files.  Typically the  
SELinux-policy-development cycle is:
   1)  Modify and reload the policy
   2)  Relabel the affected files (either by hand or with some  
automated tool like restorecon)
   3)  Rerun the problem program or daemon
   4)  Examine the errors in the audit logs.  If there are no errors  
and it works then you're finished.
   5)  Go back to step 1 and fix your policy

Cheers,
Kyle Moffett

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [AppArmor 01/41] Pass struct vfsmount to the inode_cre ..., Andreas Gruenbacher, (Thu May 24, 11:10 am)
Re: [AppArmor 01/41] Pass struct vfsmount to the inode_cre ..., Andreas Gruenbacher, (Thu May 24, 2:56 pm)
Re: [AppArmor 01/41] Pass struct vfsmount to the inode_cre ..., Andreas Gruenbacher, (Thu May 24, 9:14 pm)
Re: [AppArmor 01/41] Pass struct vfsmount to the inode_cre ..., Jeremy Maitin-Shepard, (Thu May 24, 10:17 pm)
Re: [AppArmor 01/41] Pass struct vfsmount to the inode_cre ..., Jeremy Maitin-Shepard, (Fri May 25, 11:10 am)
Re: [AppArmor 01/41] Pass struct vfsmount to the inode_cre ..., Jeremy Maitin-Shepard, (Fri May 25, 11:13 am)
Re: [AppArmor 01/41] Pass struct vfsmount to the inode_cre ..., Andreas Gruenbacher, (Fri May 25, 1:00 pm)
Re: [AppArmor 01/41] Pass struct vfsmount to the inode_cre ..., Andreas Gruenbacher, (Sat May 26, 4:46 am)
Re: Pass struct vfsmount to the inode_create LSM hook, Tetsuo Handa, (Sat May 26, 5:09 am)
Re: [AppArmor 01/41] Pass struct vfsmount to the inode_cre ..., Andreas Gruenbacher, (Sat May 26, 5:10 am)
Re: Pass struct vfsmount to the inode_create LSM hook, Andreas Gruenbacher, (Sat May 26, 6:41 am)
Re: [AppArmor 01/41] Pass struct vfsmount to the inode_cre ..., Andreas Gruenbacher, (Sat May 26, 7:05 am)
Re: Pass struct vfsmount to the inode_create LSM hook, Tetsuo Handa, (Sat May 26, 7:44 am)
Re: Pass struct vfsmount to the inode_create LSM hook, Andreas Gruenbacher, (Sat May 26, 9:52 am)
Re: Pass struct vfsmount to the inode_create LSM hook, Kyle Moffett, (Sat May 26, 11:16 am)
Re: [AppArmor 01/41] Pass struct vfsmount to the inode_cre ..., Toshiharu Harada, (Sun May 27, 12:25 am)
Re: [AppArmor 01/41] Pass struct vfsmount to the inode_cre ..., Kyle Moffett, (Sun May 27, 6:35 am)