All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: Eric Paris <eparis@parisplace.org>
Cc: Stephen Smalley <sds@tycho.nsa.gov>,
	"Clarkson, Mike R (US SSA)" <mike.clarkson@baesystems.com>,
	selinux@tycho.nsa.gov, James Morris <jmorris@namei.org>
Subject: Re: tracking down execstack & execmem violations
Date: Tue, 10 Jun 2008 14:03:35 -0400	[thread overview]
Message-ID: <484EC1F7.7000506@redhat.com> (raw)
In-Reply-To: <7e0fb38c0806101100x452eae80he5192415b9e02868@mail.gmail.com>

Eric Paris wrote:
> On Tue, Jun 10, 2008 at 1:49 PM, Stephen Smalley <sds@tycho.nsa.gov> wrote:
> 
>> Java is known to require execmem for runtime code generation.  There is
>> a java_t domain that you can look at as an example.  I think they allow
>> it execstack too, although I'm not as clear as to why that is necessary,
>> possibly for the thread stack allocation.
>>
>> Thread stacks may be allocated with PROT_EXEC if the executable is
>> marked as requiring an executable stack or if it lacks the marking;
>> execstack should tell you the story there.
>>
>> If we can't give execmem w/o giving execstack too, then execstack isn't
>> useful as a separate permission.
> 
> As I recall, which is always a dangerous thing for me todo, execstack
> needs execmem for multithreaded processes because the 'stack' of the
> second thread is just 'memory' from the point of view of the
> permission checks.
> 
> execmem does not need execstack.....
> 
> java probably actually uses an executable stack which is why it needs both.....
I believe it was only one of the java implementations that needed
execstack.  The others did not, but it was either to just allow it for all.

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

  reply	other threads:[~2008-06-10 18:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-10 17:10 tracking down execstack & execmem violations Clarkson, Mike R (US SSA)
2008-06-10 17:15 ` Stephen Smalley
2008-06-10 17:23   ` Clarkson, Mike R (US SSA)
2008-06-10 17:49     ` Stephen Smalley
2008-06-10 18:00       ` Eric Paris
2008-06-10 18:03         ` Daniel J Walsh [this message]
2008-06-10 18:21         ` Stephen Smalley

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=484EC1F7.7000506@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=eparis@parisplace.org \
    --cc=jmorris@namei.org \
    --cc=mike.clarkson@baesystems.com \
    --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.