lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 29 Nov 2007 17:27:40 +0000
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Christoph Hellwig <hch@...radead.org>
Cc:	Jan Engelhardt <jengelh@...putergmbh.de>, Greg KH <greg@...ah.com>,
	Jon Masters <jonathan@...masters.org>, Valdis.Kletnieks@...edu,
	Christoph Hellwig <hch@...radead.org>,
	Al Viro <viro@....linux.org.uk>,
	Casey Schaufler <casey@...aufler-ca.com>,
	"Tvrtko A. Ursulin" <tvrtko.ursulin@...hos.com>,
	linux-kernel@...r.kernel.org
Subject: Re: Out of tree module using LSM

> 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
mathematical signatures.

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
	open
	write cathedral and bazaar in some order
	close
	<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
work.

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.

Alan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ