All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chad Sellers <csellers@tresys.com>
To: SELinux@tycho.nsa.gov
Cc: selinux-dev@tresys.com
Subject: [Patch] Refpolicy constraints patch for hierarchy
Date: Tue, 07 Feb 2006 15:48:27 -0500	[thread overview]
Message-ID: <43E9079B.9020600@tresys.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1338 bytes --]

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

----------------------
Chad Sellers
Tresys Technology, LLC
http://www.tresys.com


[-- Attachment #2: hierarchy.diff --]
[-- Type: text/plain, Size: 587 bytes --]

Index: policy/modules/kernel/domain.te
===================================================================
--- policy/modules/kernel/domain.te	(revision 1472)
+++ policy/modules/kernel/domain.te	(working copy)
@@ -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 *;



             reply	other threads:[~2006-02-07 20:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-07 20:48 Chad Sellers [this message]
2006-02-10 14:23 ` [Patch] Refpolicy constraints patch for hierarchy Christopher J. PeBenito

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=43E9079B.9020600@tresys.com \
    --to=csellers@tresys.com \
    --cc=SELinux@tycho.nsa.gov \
    --cc=selinux-dev@tresys.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.