From: Johannes Berg <johannes@sipsolutions.net>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org
Subject: Re: Executing from readablee, no-exec pages
Date: Fri, 06 Jul 2007 15:43:00 +0200 [thread overview]
Message-ID: <1183729380.3779.9.camel@johannes.berg> (raw)
In-Reply-To: <9E7F4501-6F8F-430B-AC14-8DCDE437A2F9@kernel.crashing.org>
[-- Attachment #1: Type: text/plain, Size: 1354 bytes --]
On Fri, 2007-07-06 at 15:36 +0200, Segher Boessenkool wrote:
> > Umm, are you sure about this? The "prevent data exception in kernel
> > space" patch came from a test program I had that attempted to
> > execute a
> > page with /no permissions/ at all!
>
> I haven't looked at the code path in detail, but I believe Scott's
> analysis is correct. The kernel would merrily let a program run
> code from a page without execute permission (so also from a page
> without any permissions at all); not anymore, after my patch.
>
> Programs relying on this behaviour are obviously buggy, but the
> problem is that one of these broken programs is glibc, at least
> some not-all-that-new but also not-all-that-old versions.
Ok I can see how your patch changes that if the page is readable but not
executable and hasn't been faulted in yet, then executing it will kill
the program. However, reading first (prefaulting) and then executing
code on the page will not kill the program.
> Too many negatives, I don't see which way you're arguing :-)
Heh.
> I think you're saying to treat read access as including execute
> access? I believe that would be too permissive here.
Yeah well what I was trying to say is that there's no point in having
read without execute if prefaulting the page can get you around that.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
next prev parent reply other threads:[~2007-07-06 13:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-05 21:55 Executing from readablee, no-exec pages Scott Wood
2007-07-05 22:38 ` Rodrigo Rubira Branco
2007-07-06 11:18 ` Johannes Berg
2007-07-06 13:36 ` Segher Boessenkool
2007-07-06 13:43 ` Johannes Berg [this message]
2007-07-06 13:24 ` Segher Boessenkool
2007-07-06 16:49 ` Scott Wood
2007-07-07 2:33 ` Benjamin Herrenschmidt
2007-07-06 14:42 ` David Woodhouse
2007-07-07 2:33 ` Benjamin Herrenschmidt
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=1183729380.3779.9.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=segher@kernel.crashing.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).