All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael C Thompson <thompsmc@us.ibm.com>
To: Michael C Thompson <thompsmc@us.ibm.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>,
	Karl MacMillan <kmacmillan@mentalrootkit.com>,
	Joshua Brindle <jbrindle@tresys.com>,
	Darrel Goeddel <dgoeddel@TrustedCS.com>,
	Steve Grubb <sgrubb@redhat.com>, SE Linux <selinux@tycho.nsa.gov>
Subject: Re: newrole - adding capabilities for polyinstantiation
Date: Fri, 29 Sep 2006 14:42:23 -0500	[thread overview]
Message-ID: <451D771F.5080905@us.ibm.com> (raw)
In-Reply-To: <451C3A37.8080509@us.ibm.com>

Michael C Thompson wrote:
> Stephen Smalley wrote:
>> On Wed, 2006-09-27 at 16:25 -0500, Michael C Thompson wrote:
<snip>
>>> After reading the thread, it seems like Janak's patches were getting 
>>> close, but quite a few ideas were thrown out there, namely:
>>>
>>> 1) Have newrole be non-suid by default, and require the LSPP 
>>> configuration package to enable its suid status (which would then 
>>> enable the capabilities)
>>>
>>> 2) Have newrole be suid all of the time.
>>>
>>> 3) Have newrole determine if namespace is used for the configuration, 
>>> which would then determine if the caps need to be loaded or not.
>>>
>>> Do you know if there was any decision on the path to take that I am 
>>> unable to find on the mailing list?
>>
>> I think (2) is unacceptable (the real issue is not whether it is suid
>> per se, but whether it retains powerful capabilities like CAP_SYS_ADMIN
>> - it is already suid for the earlier audit support, but drops everything
>> but CAP_AUDIT_WRITE and reverts to the caller's uid upon startup).
> 
> With Janak's patch, there is no differentiation between the capabilities 
> needed to polyinstantiate and the capabilities to audit. Is there a 
> desire to audit outside of an LSPP environment? If so, then I will 
> address this issue in the patch (I see AUDIT being a requirement of 
> LSPP, so there is a clear dependence chain).
> 
> There is also the issue which Russel Coker brought up which is that 
> pam_namespace is valuable to people outside an LSPP environment. Should 
> this future work take that into account?

I think it would be acceptable to have AUDIT_PRIV and NAMESPACE_PRIV, 
based on my suggestion below.

>> I don't know how to do (3) cleanly, as it seems to violate PAM
>> encapsulation.
>>
>> (1) addresses the concern for non-LSPP users, but doesn't fully address
>> my concerns about the additional risk to LSPP users.  One obvious issue
>> is that drop_capabilities() currently also resets to the caller's uid,
>> which Janak's patches do not change.  Which I think means that any
>> directories and files created by pam_namespace will initially be
>> assigned the caller's uid, and potentially exposed to tampering by
>> processes in the caller's uid.  SELinux policy might prevent such
>> tampering, but it bears investigating.  Likewise, this means that the
>> newrole process itself runs in the caller's uid and might be exposed to
>> interference by the caller in some forms, although I would expect that
>> SELinux would block that as long as newrole is running in a different
>> domain.
> 
> I will take some time and look at this further.

After some discussion with some people in my department, I would like to 
suggest the following proposal for newrole, which I believe would 
address the need for polyinstantiation in the LSPP environment.

I propose we fork newrole into a two separate processes in the LSPP 
environment. One process would retain only the CAP_AUDIT_WRITE 
capability, and be responsible for handling the bulk of newrole 
operation. The other process, which would only be forked when compiled 
for the LSPP environment, would retain all capabilities required for the 
polyinstantiation operation.

This second, more privilaged, process's scope would be limited to 
handling the pam_session requests. This would allow this separate 
process to remain suid for its lifetime (hopefully alleviating Stephen 
Smalley's concerns) and split it from the more vulnerable code.

Interactions between the less-secure and more-secure processes would be 
handled through a restricted IPC mechanism.

What do people think of this idea?

Thanks,
Mike


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

  reply	other threads:[~2006-09-29 19:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <451AEC39.2090409@us.ibm.com>
     [not found] ` <1159450384.11489.5.camel@moss-spartans.epoch.ncsc.mil>
2006-09-28 21:10   ` newrole - adding capabilities for polyinstantiation Michael C Thompson
2006-09-29 19:42     ` Michael C Thompson [this message]
2006-09-29 20:51       ` Stephen Smalley
2006-10-03 22:40     ` Michael C Thompson
2006-10-03 23:52       ` Russell Coker
2006-10-04 16:19         ` Michael C Thompson
2006-10-04 18:53           ` Stephen Smalley
2006-10-04 16:22         ` Stephen Smalley
2006-10-04 20:20         ` Klaus Weidner
2006-10-05  0:45           ` Russell Coker
2006-10-05 16:08             ` Klaus Weidner
2006-10-05 19:04               ` MLS login (Was: Re: newrole - adding capabilities for polyinstantiation) Stephen Smalley
2006-10-05 22:02                 ` Klaus Weidner
2006-10-04 14:52       ` newrole - adding capabilities for polyinstantiation Stephen Smalley
2006-10-04 16:31         ` Michael C Thompson
2006-10-04 16:52           ` Stephen Smalley
2006-10-04 22:39             ` Michael C Thompson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=451D771F.5080905@us.ibm.com \
    --to=thompsmc@us.ibm.com \
    --cc=dgoeddel@TrustedCS.com \
    --cc=jbrindle@tresys.com \
    --cc=kmacmillan@mentalrootkit.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    --cc=sgrubb@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.