All of lore.kernel.org
 help / color / mirror / Atom feed
From: KaiGai Kohei <kaigai@kaigai.gr.jp>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: SELinux Mail List <selinux@tycho.nsa.gov>, kaigai@ak.jp.nec.com
Subject: Re: [RFC & PATCH] inherited type definition.
Date: Tue, 15 Mar 2005 20:50:27 +0900	[thread overview]
Message-ID: <4236CC03.5010104@kaigai.gr.jp> (raw)
In-Reply-To: <1110824712.21378.196.camel@moss-spartans.epoch.ncsc.mil>

Hi Stephen, Thanks for your comments.

>> This makes sense for unifying file types, as in the earlier multiple
>> contexts thread.  I'm not sure I see how it is useful for domains; any
>> permissions allowed to the child domain can be indirectly gained by the
>> parent domain (or any domain which can control the parent domain) and
>> any program executables that can be used to enter the parent domain can
>> be used to enter the child domain, so you might as well just directly
>> allow the permissions to the parent domain.  As a trivial example, if
>> you declare 'type user_ext_t extends user_t;', then user_t gets ptrace
>> permission to user_ext_t because it has ptrace permission to itself, so
>> any user_t process has full control over user_ext_t and can thus
>> exercise its permissions at will.

Does 'unifying file type' means as follows ?
e.g)
 /var             ... var_t
 /var/lib         ... var_lib_t extends var_t
 /var/log         ... var_log_t extends var_t
 /var/log/message ... var_log_message_t extends var_log_t
Of course, such a usage is also possible.

In user_t/user_ext_t example, user_ext_t is same as user_t without tiny difference.
Thus, it is strange, if user_t process which has a permission to user_t does not
have a same permission to user_ext_t.
Common part of user_t and user_ext_t should have a permission for each other, I think.
The outbounds part of user_ext_t from user_t should not have a permission
for each other, indeed.

>>>>I think definition of reductive permission child-type/domain is the next
>>>>action assignment. If child does not need a part of the parent's permissions,
>>>>those should be revoked by DENY statement for example.
>
>>
>>
>> Hmmm...given the way in which you are computing inheritance, it seems
>> that it could be very easy to miss something being implicitly allowed
>> and fail to define a corresponding deny statement.  Maintainability also
>> becomes a problem as you have to reassess the deny rules whenever a new
>> allow rule is added.  And we need to consider not only limiting the
>> child, but limiting the parent from controlling the child, if we are
>> going to allow more permissions to the child than the parent.

I want to reserve this matter once for a certain time.
Because there is a problem as you notice, and I noticed the amount of modification
with DENY implementation is so large.
Sorry, I want to concentrate the discussion for TYPE ... EXTENDS first.

>>>>When child_t inherit parent_t, "allow parent_t parent_t:process sigkill;"
>>>>is unrolled to "allow {parent_t child_t} {parent_t child_t}:process sigkill;"
>>>>The number of conbination is 4.
>>>>
>>>>"allow parent_t self:process sigkill;" is unrolled as follows:
>>>>  "allow parent_t parent_t:process sigkill;"
>>>>  "allow parent_t child_t:process  sigkill;"
>>>>  "allow child_t  child_t:process  sigkill;"
>
>>
>>
>> The latter is more in line with what I would expect, and regardless, I
>> think that they should be unrolled consistently regardless of whether
>> the allow rule was written with "self" or explicitly with the same
>> domain (or an attribute that included the domain); self was purely
>> intended as a convenience notation and a way to express the self
>> relationship when using an attribute/set for the source type.

I see.
But I thought it may be unnaturalness that child_t doesn't have a permission to parent_t.
What you say first is straightforward explanation.
It's natual "allow parent_t self:..." is unrolled to
"allow {parent_t child_t} {parent_t child_t}:...", and I'll fix it.

>> Typically, when creating a derived domain (e.g. for a program run by a
>> user domain), we don't want to inherit any of the transition rules of
>> the base user domain.  A template-based approach as suggested by Karl
>> seems necessary here, effectively turning the existing macro constructs
>> into a language feature.

In my implementation, derived domain inherit any of transition rules of
the own parent domain in default. If we don't want to apply same type
transition rules, we must define a different rules to derived domain
explicitly.
So, I can't decide whether this essence is advantage or disadvantage...

In addition, it's possible not to decide a transition type/domain
when a type has multiple parents. Should the number of parent
types/domains be limited to one ?

Thanks.
-- 
DO NOTHING IS THE WORST POLICY.
KaiGai Kohei <kaigai@kaigai.gr.jp>

--
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:[~2005-03-15 11:50 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-13 16:36 [RFC & PATCH] inherited type definition KaiGai Kohei
2005-03-14 13:17 ` KaiGai Kohei
2005-03-14 13:50 ` Stephen Smalley
2005-03-14 15:13   ` Luke Kenneth Casson Leighton
2005-03-14 15:22     ` Stephen Smalley
2005-03-14 16:01       ` Luke Kenneth Casson Leighton
2005-03-14 19:27         ` Valdis.Kletnieks
2005-03-14 20:10         ` Stephen Smalley
2005-03-14 17:26   ` KaiGai Kohei
2005-03-14 18:10     ` Luke Kenneth Casson Leighton
2005-03-14 18:25     ` Stephen Smalley
2005-03-15 11:50       ` KaiGai Kohei [this message]
2005-03-15 14:42         ` Stephen Smalley
2005-03-16  4:42           ` Kaigai Kohei
2005-03-16 10:00             ` Luke Kenneth Casson Leighton
2005-03-16 14:05             ` Stephen Smalley
2005-03-17  9:32               ` Kaigai Kohei
2005-03-17 13:55                 ` Stephen Smalley
2005-03-17 14:57                   ` KaiGai Kohei
2005-03-21 10:07                     ` KaiGai Kohei
2005-03-21 15:59                       ` Stephen Smalley
2005-03-23  8:17                         ` Kaigai Kohei
2005-03-23 13:56                           ` Stephen Smalley
2005-04-16  7:31                             ` KaiGai Kohei
2005-04-18 12:25                               ` Stephen Smalley
2005-04-18 16:57                                 ` KaiGai Kohei
2005-03-24 11:06                           ` Luke Kenneth Casson Leighton
2005-03-24 12:34                             ` Kaigai Kohei
2005-04-06 12:49         ` Russell Coker
2005-04-06 14:50           ` KaiGai Kohei
2005-04-06 15:30             ` Russell Coker
2005-04-06 18:23               ` Jim McCullough
2005-04-07  2:16               ` Kaigai Kohei
2005-04-06 17:55             ` Luke Kenneth Casson Leighton
2005-03-14 16:38 ` Karl MacMillan
2005-03-15 11:47   ` KaiGai Kohei
2005-03-15 14:00     ` Karl MacMillan
2005-03-16  4:35       ` Kaigai Kohei
2005-03-16 10:13         ` Luke Kenneth Casson Leighton
2005-03-16 21:46           ` Karl MacMillan
2005-03-16 21:31         ` Karl MacMillan
2005-03-17 13:05           ` Kaigai Kohei
2005-03-17 19:15             ` Karl MacMillan
2005-03-17 20:07               ` Stephen Smalley
2005-03-17 21:41                 ` Karl MacMillan
2005-03-18 13:13                   ` Stephen Smalley
2005-03-18 13:56                     ` Stephen Smalley
2005-03-18 22:28                     ` Karl MacMillan
2005-03-18 23:03                       ` Luke Kenneth Casson Leighton
2005-03-20 23:20                         ` Karl MacMillan
2005-03-21  0:17                           ` Luke Kenneth Casson Leighton
2005-03-21 13:39                             ` Karl MacMillan
2005-03-22  0:14                               ` Luke Kenneth Casson Leighton
2005-03-22 13:53                                 ` Karl MacMillan
2005-03-24 11:04                                   ` Luke Kenneth Casson Leighton
2005-03-24 12:31                                     ` Kaigai Kohei
2005-03-24 22:19                                       ` Luke Kenneth Casson Leighton
2005-03-24 22:27                                     ` Luke Kenneth Casson Leighton

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=4236CC03.5010104@kaigai.gr.jp \
    --to=kaigai@kaigai.gr.jp \
    --cc=kaigai@ak.jp.nec.com \
    --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.