On Tue, 08 Jan 2008 22:50:43 +0900, Tetsuo Handa said:
Good summary - probably should add that to the patch, drop it into
Documentation/syaoran-config.txt or similar...
Modification while reading *is* an issue, but can probably be worked around
with some clever locking. The race condition I was thinking of was if you
had the mount and the policy load be 2 separate events, you could see:
(a) issue mount request
(b) do something malicious in /dev while..
(c) load the policy that would have prevented (b).
This is partly why SELinux has init load the policy *very* early on, before
any other userspace have had a chance to run and do things that would have
been prevented by policy.
Which basically ends up meaning that anybody who can trick the mount into
happening can reset the permitted list and create (for example) a mode 666
entry for a hard drive, and go scribbling around at will. Note that you
don't seem to do any sanity checking on the path (for instance, that each
component is owned by root, and not world-writable) - so anybody who finds
a way to get the mount to happen can supply their own list in /home/joeuser/blat
or /tmp/surprise-mount-list or wherever.
OK, I can live with WARNING. You just want to be sure it's above INFO...