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:	Tue, 3 Feb 2015 20:27:32 -0600 (CST)
From:	Christoph Lameter <cl@...ux.com>
To:	Andy Lutomirski <luto@...capital.net>
cc:	Casey Schaufler <casey@...aufler-ca.com>,
	"Serge E. Hallyn" <serge@...lyn.com>,
	Serge Hallyn <serge.hallyn@...ntu.com>,
	Serge Hallyn <serge.hallyn@...onical.com>,
	Jonathan Corbet <corbet@....net>,
	Aaron Jones <aaronmdjones@...il.com>, Ted Ts'o <tytso@....edu>,
	LSM List <linux-security-module@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...uxfoundation.org>
Subject: Re: [capabilities] Allow normal inheritance for a configurable set
 of capabilities

On Tue, 3 Feb 2015, Andy Lutomirski wrote:

> >> Is there a clear reason why no non-permitted bits can be inheritable?
> >> If not, then I think this should be (ambient & inheritable &
> >> permitted).
> >
> > Inherited caps via ambient are always be permitted. Otherwise the pass
> > through is not working.
>
> Sure, but what about inheritable caps before exec?  Suppose I drop
> some cap from the permitted set but leave it in the inheritable set.
> I shouldn't get it back by calling execve.

You should get it back because there may be executables invoked by that
binary that need it.


> > Well how would the ambient mask to be set? The other options are adding a
> > new syscall and having to go through an interation of the capabilities
> > tools and/or kernel syscall API changes.
>
> prctl?

Hmmmm... Ok did not think about that so far.

> >> Here's a slight variant that might be more clearly safe: add an
> >> inherited per-process bit that causes all files to act as though fI is
> >> the full set.  Only allow setting that bit if no_new_privs is set.
> >
> > CAP_INHERIT_ALL ?
> >
>
> Sure.  Would this approach work for your use case?  It would work for
> mine, and it avoids needing to think about how this new kind of
> inheritance would interact with setuid, setgid, and file caps (i.e. it
> wouldn't, because you have to turn on off to get the other).
>
> Opt-in should work fine as long as the opt-in is inherited.

Well then its no longer an optin but automatic.

Sure that would work. The patch also should not be too difficult to do.


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