|| ||Alan Cox <alan-AT-lxorguk.ukuu.org.uk>|
|| ||Christoph Hellwig <hch-AT-infradead.org>|
|| ||Re: Out of tree module using LSM|
|| ||Thu, 29 Nov 2007 17:27:40 +0000|
|| ||Jan Engelhardt <jengelh-AT-computergmbh.de>, Greg KH <greg-AT-kroah.com>,
Jon Masters <jonathan-AT-jonmasters.org>, Valdis.Kletnieks-AT-vt.edu,
Christoph Hellwig <hch-AT-infradead.org>,
Al Viro <viro-AT-ftp.linux.org.uk>,
Casey Schaufler <casey-AT-schaufler-ca.com>,
"Tvrtko A. Ursulin" <tvrtko.ursulin-AT-sophos.com>,
> Can we please stop this useless discussion? Trying to check the content
> of files to see whether they might be malicious is inherently braindead,
> and no amounts of plugins in random places will fix this.
Actually it is quite effective especially for files whose content is
expected not to be executable material - there are some very distinct
For the purposes of figuring out what is needed you can consider a random
simple user case such as a system which protects you against the works of
Eric S Raymond. Replace the mathematical analysis and heuristics with a
user space tool which spots the various ESR papers and design it for that
if it makes you happier.
SELinux seems to be able to do most of the lifting around the problem as
it can relabel a file into eric_t and constrain further access to it.
The big problem to me is that this essentially boils down to revoke() on
ordinary files, which as we know is _hard_.
The simple case is
write cathedral and bazaar in some order
<trap close -> process -> label eric_t>
open (eric_t) - SELinux "no"
Anyone smart will then write it out of order and keep the file open, or
make sure someone else has it open. At that point close ceases to be a
point you can check the labelling. Open doesn't seem too helpful either
as the target may have the file open before it is modified into an ESR
Even if you can spot the surrepticious assembly of an ESR work on your
computer you then have to implement revocation in order to take the file
away from those with it open.
to post comments)