Skip to contentSkip to conversation

concerns about object-inheritance wrt files/directories

DISCUSSION Luke Kenneth Casson Leighton 2 participants 3 messages Mar 16, 2005 – Mar 18, 2005 SELinux security module

lore
Share & tools
lore
#0 lore raw

for file types, i have a major concern.

if not careful, we are going to be getting into the "multiple file types" thing again, which it has already been discussed that, whilst doable, has some hair-raising implications that make it too complex to
a) understand for implementation purposes b) understand the resultant policy.

kaigai proposed a scheme where he overlaid / associated the inheritance concept of "child" with "subdirectory".

i am not sure if this was intentionally part of the _design_ or whether it was just an example.

i do not believe that the object-orientated scheme wrt. directories and subdirectories _should_ be overloaded in this fashion, but there is a sort-of precedent in the form of the file_type_auto_trans() macro so... *shrug* :)

i believe that the issue of "multiple file contexts" is solvable and achievable by two topologically-equivalent methods which have already been discussed (namely, to place xattrs named "user_t,user_somethingelse_t" in security.selinux, and to derive, via some pre-processing stage, an intermediate name e.g. user_t_user_somethingelse_t_unique_identifier_NNNNNN_t)

however, both those methods have already been concluded as "difficult" - to understand or implement.

the only sensible option left, really, therefore, is to make sure that file types are NOT inherited or inheritable!

l.

Signature · 8 lines
--
<a href="http://lkcl.net">http://lkcl.net</a>
--

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#1 lore raw
Quoted 7 lines · Luke Kenneth Casson Leighton

for file types, i have a major concern.

if not careful, we are going to be getting into the "multiple file types" thing again, which it has already been discussed that, whilst doable, has some hair-raising implications that make it too complex to
a) understand for implementation purposes b) understand the resultant policy.

No, I think you misunderstood. The objection to multiple contexts on files is that you can't analyze the resulting policy without pulling in the entire filesystem state, and a modification to the filesystem state at any time can change the policy. What KaiGai is proposing is an extension to the policy language to allow certain relationships among types to be expressed more easily, with the policy compiler taking care of generating the necessary TE rules based on those relationships. Thus, analysis is still feasible based solely on the centralized policy configuration and changing the policy requires changing that configuration.

Signature · 8 lines
Stephen Smalley <[email protected]>
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#2 lore raw
Quoted 9 lines · Stephen Smalley
Quoted 7 lines · Luke Kenneth Casson Leighton

for file types, i have a major concern.

if not careful, we are going to be getting into the "multiple file types" thing again, which it has already been discussed that, whilst doable, has some hair-raising implications that make it too complex to
a) understand for implementation purposes b) understand the resultant policy.

Quoted 4 lines

No, I think you misunderstood. The objection to multiple contexts on files is that you can't analyze the resulting policy without pulling in the entire filesystem state, and a modification to the filesystem state at any time can change the policy.

sorry, yes: i remember the objection but not the details.

i remember that we disagreed over the conclusion because i could see that what you were proposing and what i was proposing were topologically equivalent (as best i could make out), such that one of us _had_ to be wrong :)

hence my warnings that kaigai's scheme could also be another [topologically equivalent] scheme where filetypes could also get into trouble - or not - depending on whose conclusion is correct.

i be watching the discussions with beady-eyed interest - without comment unless invited - to see what happens.

l.

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.