From: Daniel J Walsh <dwalsh@redhat.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Eric Paris <eparis@parisplace.org>,
"Christopher J. PeBenito" <cpebenito@tresys.com>,
selinux@tycho.nsa.gov, James Morris <jmorris@namei.org>,
"Serge E. Hallyn" <serue@us.ibm.com>,
Karl MacMillan <kmacmillan@mentalrootkit.com>
Subject: Re: [RFC][PATCH] selinux: enable authoritative granting of capabilities
Date: Wed, 13 Jun 2007 16:22:50 -0400 [thread overview]
Message-ID: <4670521A.2040804@redhat.com> (raw)
In-Reply-To: <1181764839.17547.518.camel@moss-spartans.epoch.ncsc.mil>
Stephen Smalley wrote:
> On Wed, 2007-06-13 at 15:50 -0400, Daniel J Walsh wrote:
>
>> Stephen Smalley wrote:
>>
>>> On Wed, 2007-06-13 at 15:10 -0400, Eric Paris wrote:
>>>
>>>
>>>> On 6/13/07, Stephen Smalley <sds@tycho.nsa.gov> wrote:
>>>>
>>>>
>>>>> On Wed, 2007-06-13 at 11:06 -0400, Christopher J. PeBenito wrote:
>>>>>
>>>>>
>>>>>> On Wed, 2007-06-13 at 10:31 -0400, Stephen Smalley wrote:
>>>>>>
>>>>>>
>>>>>>> Updated policy patch below, defines the new class and permissions,
>>>>>>> and introduces an interface for allowing the cap_override permissions
>>>>>>> that ensures that these domains are excluded from the set of domains
>>>>>>> that can be controlled by unconfined domains.
>>>>>>>
>>>>>>>
>>>>>> [...]
>>>>>>
>>>>>>
>>>>>>
>>>>>>> +interface(`domain_capoverride',`
>>>>>>>
>>>>>>>
>>>>>> I would probably call this domain_capability_override() or
>>>>>> domain_cap_override(), maybe even domain_authoritative_caps().
>>>>>>
>>>>>>
>>>>>>
>>>>>>> + gen_require(`
>>>>>>> + attribute capoverride_domain_type;
>>>>>>> + ')
>>>>>>> +
>>>>>>> + typeattribute $1 capoverride_domain_type;
>>>>>>> +
>>>>>>> + allow $1 self:cap_override $2;
>>>>>>>
>>>>>>>
>>>>>> I think it would be better to just have the allow rule in the TE file.
>>>>>> Then you can put your cap_override and capability allow rules next to
>>>>>> each other and see more clearly which ones are being overridden and
>>>>>> which aren't.
>>>>>>
>>>>>>
>>>>> Ok, so you'd prefer the patch below?
>>>>> BTW, one other issue that I noticed is that this has a side effect if I
>>>>> grant capoverride to any of the unconfined domains (not that one should
>>>>> do that, but still), because it seems that unconfined domains are
>>>>> implicitly picking up permissions to self through the allow
>>>>> unconfined_domain_type domain: rules. Seems like those should be
>>>>> separated?
>>>>>
>>>>> Index: refpolicy/policy/flask/security_classes
>>>>> ===================================================================
>>>>> --- refpolicy/policy/flask/security_classes (revision 2324)
>>>>> +++ refpolicy/policy/flask/security_classes (working copy)
>>>>> @@ -97,4 +97,8 @@
>>>>>
>>>>> class dccp_socket
>>>>>
>>>>> +class memprotect
>>>>> +
>>>>> +class cap_override
>>>>> +
>>>>> # FLASK
>>>>>
>>>>>
>>>> Looks good to me, thanks for putting in my classes and perms too, I'm
>>>> swamped still for a couple more days, I'm really sorry about that.....
>>>>
>>>>
>>> We'll need to introduce an interface for memprotect:mmap_zero as well to
>>> allow it when needed, along with a corresponding type attribute and
>>> neverallow rule to ensure that all such uses are flagged as such.
>>>
>>>
>>>
>> These changes prevent a domain transition on targeted policy from
>> initrc_t which is an unconfined_domain to a domain that has
>> cap_override, which might be unexpected.
>>
>
> I don't understand that - nothing in my patch alters transition rules
> (transition was already excluded from that rule via the set complement
> (~)). What permission was denied? Domain transitions from unconfined
> domains always have needed to be explicitly authorized.
>
Ok, nevermind, I thought I read this as a neverallow.
>
>> We might also want to add a
>>
>> dontaudit unconfined_domain capoverride_domain_type:process ptrace;
>>
>> Otherwise killall/pidof will generate avc messages.
>>
>
> Ok - note though that I renamed the attribute to
> cap_override_domain_type in the final version of the patch for
> consistency (cap_override rather than capoverride) throughout.
>
>
--
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-13 20:22 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
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 [this message]
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=4670521A.2040804@redhat.com \
--to=dwalsh@redhat.com \
--cc=cpebenito@tresys.com \
--cc=eparis@parisplace.org \
--cc=jmorris@namei.org \
--cc=kmacmillan@mentalrootkit.com \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
--cc=serue@us.ibm.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.