The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Chris Wright <chrisw@osdl.org>
To: Stephen Smalley <sds@epoch.ncsc.mil>
Cc: Chris Wright <chrisw@osdl.org>, Andrew Morton <akpm@osdl.org>,
	James Morris <jmorris@redhat.com>,
	lkml <linux-kernel@vger.kernel.org>,
	Darrel Goeddel <dgoeddel@trustedcs.com>
Subject: Re: [PATCH 4/6] Add dynamic context transition support to SELinux
Date: Thu, 2 Dec 2004 12:12:28 -0800	[thread overview]
Message-ID: <20041202121228.F2357@build.pdx.osdl.net> (raw)
In-Reply-To: <1102017022.26015.249.camel@moss-spartans.epoch.ncsc.mil>; from sds@epoch.ncsc.mil on Thu, Dec 02, 2004 at 02:50:22PM -0500

* Stephen Smalley (sds@epoch.ncsc.mil) wrote:
> On Thu, 2004-12-02 at 14:18, Chris Wright wrote:
> > No, I was thinking of actually tracking the threads, since you know when
> > they come and go.  One way would be to share task_security_struct via
> > refcnt for threads, although this could get sticky.
> 
> Hmm...that would be a significant change, and I'm not clear that the
> existing security_task_alloc() hook even allows for it (no clone_flags
> passed to it).  ptrace_sid could also be an issue for sharing.

True, guess that's filed under "sticky" ;-)

> Note that the mm checking logic is already after one permission check
> (setcurrent), which will only be allowed to the small set of privileged
> processes that use this feature.  That acts as the gatekeeper for any
> use of this feature, then the dyntransition check controls the possible
> transitions among security contexts using this feature.  In the case of
> exec-based transitions, the corresponding transition check is deferred
> until the actual exec processing.  So even as it stands, arbitrary
> processes aren't allowed to reach the code in question, which is better
> than the [gs]etpriority cases.

OK, I misread that any threaded app could write to /proc/self/attr/current
and trigger that loop, only to fail the avc lookup.  Yes, now I see the
PROCESS__SETCURRENT test, thanks.

thanks,
-chris
-- 
Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net

      reply	other threads:[~2004-12-02 20:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-02 15:43 [PATCH 4/6] Add dynamic context transition support to SELinux Stephen Smalley
2004-12-02 18:34 ` Chris Wright
2004-12-02 18:56   ` Stephen Smalley
2004-12-02 19:18     ` Chris Wright
2004-12-02 19:50       ` Stephen Smalley
2004-12-02 20:12         ` Chris Wright [this message]

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=20041202121228.F2357@build.pdx.osdl.net \
    --to=chrisw@osdl.org \
    --cc=akpm@osdl.org \
    --cc=dgoeddel@trustedcs.com \
    --cc=jmorris@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sds@epoch.ncsc.mil \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox