From: Arjan van de Ven <arjanv@redhat.com>
To: "H. J. Lu" <hjl@lucon.org>
Cc: linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: How to make stack executable on demand?
Date: Sat, 17 Apr 2004 09:13:35 +0200 [thread overview]
Message-ID: <20040417071335.GA4296@devserv.devel.redhat.com> (raw)
In-Reply-To: <20040416204651.GA24194@lucon.org>
[-- Attachment #1: Type: text/plain, Size: 931 bytes --]
On Fri, Apr 16, 2004 at 01:46:51PM -0700, H. J. Lu wrote:
> On Fri, Apr 16, 2004 at 10:02:58PM +0200, Arjan van de Ven wrote:
> > > But it will either fail if
> > > kernel is set with non-executable stack,
> >
> > eh no. mprotect with prot_exec is still supposed to work. The stacks
> > still have MAY_EXEC attribute, just not the actual EXEC attribute
>
> Ok. It looks like a bug in Red Hat EL 3 kernel. In fs/exec.c, there
> are
>
> if (executable_stack)
> mpnt->vm_flags = VM_STACK_FLAGS | VM_MAYEXEC | VM_EXEC;
> else
> mpnt->vm_flags = VM_STACK_FLAGS & ~(VM_MAYEXEC|VM_EXEC);
yep that's a bug
> The VM_MAYEXEC bit is untouched. Now the question is if it is a good
> idea for user to change stack permission.
it's required for correct operation and "security wise" it doesn't matter,
if someone can execute an mprotect syscall the game is over anyway
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2004-04-17 7:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-16 17:09 How to make stack executable on demand? H. J. Lu
2004-04-16 18:07 ` Andreas Steinmetz
2004-04-16 19:40 ` H. J. Lu
2004-04-19 14:39 ` Pavel Machek
2004-04-16 20:02 ` Arjan van de Ven
2004-04-16 20:46 ` H. J. Lu
2004-04-16 20:57 ` Dave Jones
2004-04-17 7:13 ` Arjan van de Ven [this message]
2004-04-19 0:08 ` Jamie Lokier
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=20040417071335.GA4296@devserv.devel.redhat.com \
--to=arjanv@redhat.com \
--cc=hjl@lucon.org \
--cc=linux-kernel@vger.kernel.org \
/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.