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:	Fri, 14 Mar 2008 09:27:28 -0400
From:	Stephen Smalley <sds@...ch.ncsc.mil>
To:	James Morris <jmorris@...ei.org>
Cc:	"Serge E. Hallyn" <serue@...ibm.com>,
	lkml <linux-kernel@...r.kernel.org>,
	linux-security-module@...r.kernel.org,
	Linux Containers <containers@...ts.osdl.org>,
	Casey Schaufler <casey@...aufler-ca.com>,
	Greg KH <greg@...ah.com>, Pavel Emelianov <xemul@...nvz.org>
Subject: Re: [PATCH] cgroups: implement device whitelist lsm (v3)


On Fri, 2008-03-14 at 21:17 +1100, James Morris wrote:
> On Thu, 13 Mar 2008, Serge E. Hallyn wrote:
> 
> > Implement a cgroup using the LSM interface to enforce open and mknod
> > on device files.
> 
> Actually, I'm not sure that the LSM approach in general is best here.
> 
> The LSM model is that standard DAC logic lives in the core kernel, and 
> that extended security logic (e.g. MAC) is called after DAC via hooks.  
> cgroups has introduced new security logic of its own, which is arguably 
> "standard DAC" when cgroups is enabled.
> 
> I can understand Greg not wanting this security logic in the core kernel, 
> but it is specific to cgroups (which itself is security model agnostic) 
> and does not stand alone as a distinct security framework.
> 
> The fact that all existing LSMs need to invoke exactly the same code is an 
> indicator that it doesn't belong in LSM.
> 
> Moving this logic into LSM means that instead of the cgroups security 
> logic being called from one place in the main kernel (where cgroups 
> lives), it must be called identically from each LSM (none of which are 
> even aware of cgroups), which I think is pretty obviously the wrong 
> solution.
> 
> This is baggage which comes with cgroups -- please don't push it into LSM 
> to try and hide that.

I agree with the above, and would further note that I would expect the
SELinux solution to the problem would be done not by stacking with or
calling this device whitelist lsm but instead by introducing the ability
to bind security labels to devices within the kernel (independent of the
particular device node(s) in the filesystem used to access that device)
and applying permission checks on those device labels when processes
attempt to create or access those devices (again independent of the
particular device node used to access them).  That keeps the policy
integrated and analyzable and avoids an external dependency.

-- 
Stephen Smalley
National Security Agency

--
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