From: Joshua Brindle <method@manicmethod.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: russell@coker.com.au, selinux@tycho.nsa.gov,
Karl MacMillan <kmacmillan@mentalrootkit.com>
Subject: Re: [RFC][PATCH] selinux: enable authoritative granting of capabilities
Date: Thu, 14 Jun 2007 10:54:04 -0400 [thread overview]
Message-ID: <4671568C.2090404@manicmethod.com> (raw)
In-Reply-To: <1181832650.17547.619.camel@moss-spartans.epoch.ncsc.mil>
Stephen Smalley wrote:
> On Thu, 2007-06-14 at 07:03 -0400, Stephen Smalley wrote:
>
>> On Thu, 2007-06-14 at 19:44 +1000, Russell Coker wrote:
>>
>>> On Wednesday 13 June 2007 22:31, Stephen Smalley <sds@tycho.nsa.gov> wrote:
>>>
>>>> On Wed, 2007-06-13 at 21:16 +1000, Russell Coker wrote:
>>>>
>>>>> On Wednesday 13 June 2007 01:57, Stephen Smalley <sds@tycho.nsa.gov>
>>>>>
>>> wrote:
>>>
>>>>>> Well, first, no script should be allowed a capability that is not given
>>>>>> to its caller directly ;)
>>>>>>
>>>>> Why not? Isn't that the entire point of this authoritative granting of
>>>>> capabilities patch?
>>>>>
>>>> _script_, not program.
>>>>
>>> OK, that's a bit of a topic change.
>>>
>>> I've been thinking about the script issue. It seems to me that a problem we
>>> face is the replacement of executables by scripts (which often happens in
>>> distributions and sometimes happens with programs that are relevant to system
>>> integrity).
>>>
>>> We could write a policy that correctly allows a domain transition on executing
>>> an ELF binary only to find that the next version of the distribution replaces
>>> it with a BASH or Perl script then there is the potential for an exploit.
>>>
>>> Apart from initrc_exec_t are we relying on domain transitions on execution of
>>> shell scripts for anything?
>>>
>> It isn't just "shells", but any interpreter. cgi-bin scripts?
>> semanage? etc.
>>
>> Solaris solution was to have the kernel create a fd to the script file
>> and pass /dev/fd/<n> as the first argument to the interpreter so that
>> there is no separate lookup when dealing with suid scripts. Naturally,
>> that doesn't address environmental contamination issues (and AT_SECURE
>> doesn't do enough cleansing to protect scripts), and it can yield
>> confusing results for scripts that aren't expecting their argv[0] to be
>> like that.
>>
>
> There was some discussion of introducing a binary wrapper for the python
> scripts in policycoreutils to address this issue for them; python has a
> template for such a binary wrapper in its source distribution.
>
>
Yes, CLIP has the wrapper on oss.tresys.com, I'll bug them to send it to
the list for inclusion into policycoreutils.
>>> Currently common shells have special-case code to deal with the case of
>>> uid!=euid and gid!=egid. I think that this could be considered precedent for
>>> having the shell check whether it is run in a different domain to it's parent
>>> process, and if so whether the parent domain is permitted to execute
>>> shell_exec_t in the current domain.
>>>
--
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.
next prev parent reply other threads:[~2007-06-14 14:54 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-11 19:55 [RFC][PATCH] selinux: enable authoritative granting of capabilities Stephen Smalley
2007-06-11 20:39 ` James Morris
2007-06-11 20:43 ` Serge E. Hallyn
2007-06-11 21:43 ` Casey Schaufler
2007-06-11 22:20 ` James Morris
2007-06-12 0:00 ` Casey Schaufler
2007-06-12 11:46 ` Stephen Smalley
2007-06-11 22:24 ` Serge E. Hallyn
2007-06-12 9:20 ` Russell Coker
2007-06-12 15:44 ` Serge E. Hallyn
2007-06-12 15:57 ` Stephen Smalley
2007-06-13 11:16 ` Russell Coker
2007-06-13 12:31 ` Stephen Smalley
2007-06-14 9:44 ` Russell Coker
2007-06-14 11:03 ` Stephen Smalley
2007-06-14 14:50 ` Stephen Smalley
2007-06-14 14:54 ` Joshua Brindle [this message]
2007-06-14 13:54 ` Casey Schaufler
2007-06-14 14:50 ` Joshua Brindle
2007-06-14 15:05 ` Stephen Smalley
2007-06-12 11:43 ` Stephen Smalley
2007-06-12 11:31 ` Stephen Smalley
2007-06-12 9:27 ` Russell Coker
2007-06-12 12:09 ` Stephen Smalley
2007-06-12 12:50 ` Stephen Smalley
2007-06-12 15:08 ` Casey Schaufler
2007-06-12 15:33 ` Stephen Smalley
2007-06-12 16:38 ` Casey Schaufler
2007-06-12 17:49 ` James Morris
2007-06-12 19:56 ` Casey Schaufler
2007-06-12 16:03 ` Serge E. Hallyn
2007-06-12 13:24 ` Stephen Smalley
2007-06-12 20:50 ` Stephen Smalley
2007-06-12 21:12 ` Stephen Smalley
2007-06-13 14:31 ` Stephen Smalley
2007-06-13 15:06 ` Christopher J. PeBenito
2007-06-13 15:28 ` Stephen Smalley
2007-06-13 18:46 ` Christopher J. PeBenito
2007-06-13 19:20 ` Stephen Smalley
2007-06-14 19:19 ` Christopher J. PeBenito
2007-06-15 11:50 ` Stephen Smalley
2007-06-13 19:10 ` Eric Paris
2007-06-13 19:22 ` Stephen Smalley
2007-06-13 19:50 ` Daniel J Walsh
2007-06-13 20:00 ` Stephen Smalley
2007-06-13 20:22 ` Daniel J Walsh
2007-06-12 13:32 ` Stephen Smalley
2007-06-14 15:40 ` Chad Sellers
2007-06-14 15:55 ` Stephen Smalley
2007-06-14 16:03 ` Stephen Smalley
2007-06-14 16:13 ` Karl MacMillan
2007-06-14 16:52 ` James Morris
2007-06-14 17:28 ` Chad Sellers
2007-06-14 17:35 ` James Morris
2007-06-14 17:43 ` Chad Sellers
2007-06-14 17:47 ` Stephen Smalley
2007-06-14 20:02 ` Casey Schaufler
2007-06-14 17:46 ` Stephen Smalley
2007-06-14 18:18 ` James Morris
2007-06-14 15:55 ` Karl MacMillan
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=4671568C.2090404@manicmethod.com \
--to=method@manicmethod.com \
--cc=kmacmillan@mentalrootkit.com \
--cc=russell@coker.com.au \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
/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.