some random policy observations
We've taught a couple of classes on policy development, coupled with some of our own analysis, which resulted with the following observations. I haven't spent any time trying to validate these, but since others are crawling through the policy now perhaps someone can check these out. (There were other observations I haven't dug out of my notes yet!)
1. dpkg_t has load_policy access to security_t security object. Probably a legacy problem; seems like it should use the load_policy program, which is the only one that needs this access.
2. checkpolicy_t and load_policy_t try hard to prevent their domain from being able to read from random file types (to avoid possible threats of them being convinced to read the incorrect data files as policy source/binary files). Right now they both have read access to admin terminal devices; any reason why that access can't be changed to just write (e.g., for standard output/error only) to avoid potential of using stadin as their data source?
3. Related, we might want to change the compile option for some program (e.g., load_policy and checkpolicy) so they're statically linked. This not only removes the potential threat of intercepting their linking process, but also allows us to remove the shared libraries as another type of file that can be read.
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 3 lines · Frank Mayer
1.
dpkg_thasload_policyaccess tosecurity_tsecurity object. Probably a legacy problem; seems like it should use theload_policyprogram, which is the only one that needs this access.
Good point, I'll change that.
Quoted 5 lines
3. Related, we might want to change the compile option for some program (e.g.,
load_policyand checkpolicy) so they're statically linked. This not only removes the potential threat of intercepting their linking process, but also allows us to remove the shared libraries as another type of file that can be read.
Also if you make a mistake in labelling or policy such that you can't load shared objects it would be good to be able to run setfiles, load_policy, checkpolicy, etc. (yes I know such things should never happen - but I've seen it too many times).
Signature · 10 lines
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark http://www.coker.com.au/postal/ Postal SMTP/POP benchmark http://www.coker.com.au/~russell/ My home page -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.