Skip to contentSkip to conversation

Refpolicy constraints patch for hierarchy

PATCH In review Chad Sellers 2 participants 2 messages Feb 7, 2006 – Feb 10, 2006 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Refpolicy constraints patch for hierarchy

This is a patch to reference policy that modifies constraints to allow using type hierarchy (as provided through "dot" notation) in a certain way with reference policy. This way corresponds to that used in the Framework which we've been working on at Tresys, in which we use hierarchical types to create boundaries which domains cannot escape from. For example, I create outside_t, outside_t.inside_one_t, and outside_t.inside_two_t, where inside_one_t and inside_two_t are constrained by the permissions allowed to outside_t. All 3 of these are given the domain attribute.

The problem arises when you want to place files inside the outside_t security boundary. To do this, we must give the file_type attribute to outside_t. Currently in reference policy, this is not possible because of a constraint which prevents process permissions on anything with a file_type attribute. We modify this to prevent process permissions on anything that's not a domain, so parent types can have both the domain and the file_type attribute. As an additional side effect, this prevents granting process permissions to types that aren't domains or file_types, such as network types, thereby making this constraint more precise in what it's trying to do.

Thanks,
Chad

Signature · 4 lines
----------------------
Chad Sellers
Tresys Technology, LLC
http://www.tresys.com
modules/kernel/domain.te +1 -3
Index: policy/modules/kernel/domain.te
===================================================================
@@ -63,7 +63,5 @@
 # SELinux identity and role change constraints
 attribute process_uncond_exempt;	# add userhelperdomain to this one
 
-# TODO:
-# cjp: also need to except correctly for SEFramework
-neverallow { domain unlabeled_t } file_type:process *;
+neverallow { domain unlabeled_t } ~{ domain unlabeled_t }:process *;
 neverallow ~{ domain unlabeled_t } *:process *;
#1 lore raw
Quoted 6 lines · Chad Sellers

This is a patch to reference policy that modifies constraints to allow using type hierarchy (as provided through "dot" notation) in a certain way with reference policy. This way corresponds to that used in the Framework which we've been working on at Tresys, in which we use hierarchical types to create boundaries which domains cannot escape from.

Merged.

Signature · 9 lines
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150


--
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.