All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua Brindle <method@manicmethod.com>
To: Kohei KaiGai <kaigai@kaigai.gr.jp>
Cc: KaiGai Kohei <kaigai@ak.jp.nec.com>,
	SE Linux <selinux@tycho.nsa.gov>,
	Stephen Smalley <sds@tycho.nsa.gov>
Subject: Re: sepgsql and process transition
Date: Wed, 31 Aug 2011 16:02:03 -0400	[thread overview]
Message-ID: <4E5E933B.6060604@manicmethod.com> (raw)
In-Reply-To: <CADyhKSVBhXHsfyXVkWZxuJqAZ9-QgPjfhPZOdGyfBEEGb-iVbA@mail.gmail.com>

Kohei KaiGai wrote:
> The reason why we check process:{transition} permission on invocation
> of trusted procedures is an analogy to execution of program with
> domain transition.
>
> In the case of domain transition, it checks process:{transition}
> permission on a pair of source and target domain, and it also checks
> file:{entrypoint execute} permission on the security label of the file
> to be launched.
>

I think I hit the exact reason why this bothers me today. As 
staff_t:SystemLow-SystemHigh I wanted a stored procedure that ran at 
sepgsql_trusted_proc_t:SystemHigh (so that it could read a SystemHigh column and 
fuzz the results).

Because of the current process constraint:
  mlsconstrain process transition
        (( h1 dom h2 ) and
         (( l1 eq l2 ) or ( t1 == mlsprocsetsl ) or
          (( t1 == privrangetrans ) and ( t2 == mlsrangetrans ))));

it isn't possible unless staff_t is part of privrangetrans and 
sepgsql_trusted_proc_t is part of mlsrangetrans. I don't mind the latter but the 
former is clearly a violation of how MLS is suppose to work on multi-level 
SELinux systems (in general, unprivileged users should not be able to change 
their level without going through newrole or logging out and back in).

If there was a different object class for procedures-while-executing, akin to 
process but called something different we could have a different constraint that 
made more sense for this use case.



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

  parent reply	other threads:[~2011-08-31 20:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-30 18:36 sepgsql and process transition Joshua Brindle
2011-08-30 20:48 ` Kohei KaiGai
2011-08-30 23:16   ` Joshua Brindle
2011-08-31 20:02   ` Joshua Brindle [this message]
2011-08-31 20:33     ` Kohei KaiGai
2011-09-01  9:33       ` Kohei Kaigai
2011-09-01 14:39         ` Joshua Brindle
2011-09-01 15:51           ` Kohei Kaigai
2011-09-01 18:36             ` Joshua Brindle
2011-09-01 19:13             ` Joshua Brindle

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=4E5E933B.6060604@manicmethod.com \
    --to=method@manicmethod.com \
    --cc=kaigai@ak.jp.nec.com \
    --cc=kaigai@kaigai.gr.jp \
    --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.