From: Andrew Morton <akpm@linux-foundation.org>
To: Ollie Wild <aaw@google.com>
Cc: bugme-daemon@bugzilla.kernel.org, Ingo Molnar <mingo@elte.hu>,
Roland McGrath <roland@redhat.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Hugh Dickins <hugh@veritas.com>,
pageexec@freemail.hu, linux-kernel@vger.kernel.org
Subject: Re: [Bug 11063] New: lack of GNU_STACK header doesn't result in rwx stack on i386
Date: Wed, 9 Jul 2008 15:28:31 -0700 [thread overview]
Message-ID: <20080709152831.99237c00.akpm@linux-foundation.org> (raw)
In-Reply-To: <bug-11063-27@http.bugzilla.kernel.org/>
(switched to email. Please respond via emailed reply-to-all, not via the
bugzilla web interface).
On Wed, 9 Jul 2008 12:13:05 -0700 (PDT) bugme-daemon@bugzilla.kernel.org wrote:
> http://bugzilla.kernel.org/show_bug.cgi?id=11063
>
> Summary: lack of GNU_STACK header doesn't result in rwx stack on
> i386
> Product: Memory Management
> Version: 2.5
> Platform: All
> OS/Version: Linux
> Tree: Mainline
> Status: NEW
> Severity: normal
> Priority: P1
> Component: Other
> AssignedTo: akpm@osdl.org
> ReportedBy: pageexec@freemail.hu
>
>
> Latest working kernel version: unknown, probably before the introduction of
> unlimited argv
> Earliest failing kernel version: unknown, probably after the introduction of
> unlimited argv, 2.6.26-rc9 definitely fails
> Distribution:
> Hardware Environment:
> Software Environment:
> Problem Description:
> ELF/i386 traditionally has an executable stack which in the PT_GNU_STACK world
> is provided two ways: if the ELF has a RWE PT_GNU_STACK program header or if it
> lacks that program header. due to this regression, the latter case results in a
> non-executable stack with corresponding breakage of (old) userland binaries
> that use nested function trampolines.
>
> this bug was probably introduced when the unlimited argv feature was merged: in
> that system the stack vma (and its vm_flags) is initialized too early, before
> the incoming process' ELF header is consulted, which on i386 means that the
> personality used for determining the executable status of the stack is that of
> the old process, not the incoming one. later, in setup_arg_pages, only the
> explicit setting (disable/enable) of stack executability is honoured,
> EXSTACK_DEFAULT isn't consulted (i guess the assumption was that the initial
> ->vm_flags setting got it right).
>
> Steps to reproduce: run any ELF that lacks a PT_GNU_STACK program header and
> check its stack vma, it'll be rw-, instead of rwx.
>
next parent reply other threads:[~2008-07-09 22:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-11063-27@http.bugzilla.kernel.org/>
2008-07-09 22:28 ` Andrew Morton [this message]
[not found] ` <20080709152716.99e9bbe7.akpm@linux-foundation.org>
2008-07-10 20:19 ` [Bug 11063][PATCH] exec: fix stack excutability without PT_GNU_STACK Hugh Dickins
2008-07-10 21:21 ` pageexec
2008-07-11 11:15 ` Hugh Dickins
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=20080709152831.99237c00.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=a.p.zijlstra@chello.nl \
--cc=aaw@google.com \
--cc=bugme-daemon@bugzilla.kernel.org \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=pageexec@freemail.hu \
--cc=roland@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®