public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: John Richard Moser <nigelenki@comcast.net>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Rik van Riel <riel@redhat.com>,
	linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: Patch 4/6  randomize the stack pointer
Date: Sat, 29 Jan 2005 11:59:27 -0500	[thread overview]
Message-ID: <41FBC0EF.8010705@comcast.net> (raw)
In-Reply-To: <1107016955.4174.127.camel@laptopd505.fenrus.org>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1





Arjan van de Ven wrote:
> On Sat, 2005-01-29 at 11:21 -0500, John Richard Moser wrote:
> 
>>-----BEGIN PGP SIGNED MESSAGE-----
> 
> 
>>These are the only places mprotect() is mentioned; a visual scan
>>confirms no trickery:
>>
>>        if( fork() == 0 ) {
>>                /* Perform a dirty (but not unrealistic) trick to circumvent
>>                 * the kernel protection.
>>                 */
>>                if( paxtest_mode == 1 ) {
>>                        pthread_t thread;
>>                        pthread_create(&thread, NULL, test_thread, dummy);
>>                        doit();
>>                        pthread_kill(thread, SIGTERM);
>>                } else {
> 
> 
>>So, there you have it.  These tests do not intentionally kill
>>exec-shield based on its known issue with tracking the upper limit of
>>the code segment.
> 
> 
> 
> here they do.
> dummy is a local NESTED function, which causes the stack to *correctly*
> be marked executable, due to the need of trampolines. 
> That disables execshield for any tests that use dummy.o, which most of
> them are.
> 

Only in "Blackhat" mode.  I ran in Kiddie and Blackhat mode, and my
second batch of tests (tests.txt, my errata) was run after execstack -c.

> 

root@iceslab:/mnt/redhat/root/paxtest-0.9.6 # strace ./execstack 2>&1 |
grep mprotect
mprotect(0x20822000, 4096, PROT_NONE)   = 0
root@iceslab:/mnt/redhat/root/paxtest-0.9.6 # strace ./execstack 2>&1 |
grep EXEC
old_mmap(NULL, 64996, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x265d9000
old_mmap(NULL, 1232332, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x265e9000
mmap2(NULL, 8392704, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x26716000

I killed the fork() line and straced it.
0x26716000 is only ~600 megs up,  I find my stack at ~1.5G under
segmexec, I'd guess it'd be at ~3G under normal things like execshield.
 You know what *looks*

getstack1:  0xfefcead7
getstack1:  0xfefe9947
getstack1:  0xfeedd4f7
getstack1:  0xfefe6e37
getstack1:  0xfee412b7
getstack1:  0xfee71737

Yeah it's pretty high under exec shield.

none of these are doing ANYTHING weird (grepping for EXEC and scanning
for PROT_EXEC and related addresses), aside from the normal mapping of
libraries by the system, which is probably what's killing Exec Shield's
anonymous mapping, heap, data, bss, library data, library bss. . .

To put it bluntly, you're wrong.  The tests are valid.

- --
All content of all messages exchanged herein are left in the
Public Domain, unless otherwise explicitly stated.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFB+8DuhDd4aOud5P8RAscYAKCErG3KB5M9gMwZ1BRqTDBKyYYLrACfcYeb
0ptJYTE+uUx0QYSHmKXWlsA=
=PL8+
-----END PGP SIGNATURE-----

  reply	other threads:[~2005-01-29 16:59 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-27 10:11 Patch 0/6 virtual address space randomisation Arjan van de Ven
2005-01-27 10:12 ` Patch 1/6 introduce sysctl Arjan van de Ven
2005-01-27 10:36   ` Andi Kleen
2005-01-27 11:13     ` Arjan van de Ven
2005-01-27 18:16   ` Pavel Machek
2005-01-27 19:11     ` Ingo Molnar
2005-01-27 19:46       ` Dave Jones
2005-01-27 19:53         ` Ingo Molnar
2005-01-27 19:53         ` Arjan van de Ven
2005-02-04 21:27   ` Benoit Boissinot
2005-01-27 10:12 ` Patch 2/6 introduce helper infrastructure Arjan van de Ven
2005-01-27 10:41   ` Andi Kleen
2005-01-27 11:58     ` Arjan van de Ven
2005-01-27 12:27       ` Andi Kleen
2005-01-27 12:43         ` Arjan van de Ven
2005-02-01 21:14   ` Matt Mackall
2005-01-27 10:12 ` Patch 3/6 per process flag Arjan van de Ven
2005-01-27 10:13 ` Patch 4/6 randomize the stack pointer Arjan van de Ven
2005-01-27 10:21   ` Christoph Hellwig
2005-01-27 17:38   ` John Richard Moser
2005-01-27 17:47     ` Arjan van de Ven
2005-01-27 18:04       ` John Richard Moser
2005-01-27 18:09         ` Arjan van de Ven
2005-01-27 18:12         ` Christoph Hellwig
2005-01-27 18:16         ` Linus Torvalds
2005-01-27 18:28           ` Linus Torvalds
2005-01-27 18:55             ` John Richard Moser
2005-01-27 18:49           ` John Richard Moser
2005-01-27 19:30             ` Linus Torvalds
2005-01-27 19:48               ` Arjan van de Ven
2005-01-27 19:59                 ` Linus Torvalds
2005-01-27 20:04                   ` Arjan van de Ven
2005-01-27 20:08               ` John Richard Moser
2005-01-27 19:19           ` linux-os
2005-01-27 19:52             ` Julien TINNES
2005-01-27 20:02             ` Arjan van de Ven
2005-01-27 20:13               ` John Richard Moser
2005-01-27 21:33                 ` jnf
2005-01-28 17:22                 ` Paulo Marques
2005-01-28 17:51                   ` John Richard Moser
2005-01-28 18:42                   ` Ingo Molnar
2005-01-29  6:04                     ` John Richard Moser
2005-01-27 20:37               ` linux-os
2005-01-27 20:45                 ` John Richard Moser
2005-01-27 21:39           ` John Richard Moser
2005-01-27 21:53             ` Arjan van de Ven
2005-01-27 22:34               ` John Richard Moser
2005-01-29  2:50                 ` Rik van Riel
2005-01-29  6:31                   ` John Richard Moser
2005-01-29  8:10                     ` Arjan van de Ven
     [not found]                       ` <41FBB821.3000403@comcast.net>
2005-01-29 16:42                         ` Arjan van de Ven
2005-01-29 16:59                           ` John Richard Moser [this message]
2005-01-29 16:46                         ` Arjan van de Ven
2005-01-29 17:04                           ` John Richard Moser
2005-01-29 17:37                     ` Jakub Jelinek
2005-01-29 17:49                       ` John Richard Moser
2005-01-29 17:55                         ` Christoph Hellwig
2005-01-29 18:10                           ` John Richard Moser
2005-01-29 18:12                             ` Rik van Riel
2005-01-29 18:16                             ` Christoph Hellwig
2005-01-29  7:46           ` John Richard Moser
2005-01-27 18:40         ` Felipe Alfaro Solana
2005-01-27 22:31     ` Jirka Kosina
2005-01-28  5:58       ` Ingo Molnar
2005-01-28 19:02         ` David Lang
2005-01-28  7:33       ` Arjan van de Ven
2005-01-27 19:43   ` Julien TINNES
2005-01-28  0:10     ` H. Peter Anvin
2005-01-28  0:23       ` Roland Dreier
2005-01-28  1:06         ` H. Peter Anvin
2005-01-28  2:03     ` Horst von Brand
2005-01-28  8:45       ` Julien TINNES
2005-01-27 20:23   ` Christoph Hellwig
2005-01-27 20:27     ` Arjan van de Ven
2005-01-27 20:32       ` Christoph Hellwig
2005-01-27 20:35         ` Arjan van de Ven
2005-01-27 20:40         ` Rik van Riel
2005-01-27 20:42           ` Christoph Hellwig
2005-01-27 20:56             ` Arjan van de Ven
2005-01-27 21:13               ` Linus Torvalds
2005-01-27 10:13 ` Patch 5/6 randomize mmap addresses Arjan van de Ven
2005-01-27 10:14 ` Patch 6/6 default enable randomisation for -mm Arjan van de Ven
2005-01-27 11:45 ` Patch 0/6 virtual address space randomisation Julien TINNES
2005-01-27 11:57   ` Arjan van de Ven
2005-01-27 17:42     ` John Richard Moser
2005-01-27 19:34       ` Julien TINNES
2005-01-27 19:57         ` John Richard Moser
2005-01-27 20:13         ` Arjan van de Ven
2005-01-28  8:45           ` David Weinehall
  -- strict thread matches above, loose matches on Subject: below --
2005-01-31 10:55 Patch 4/6 randomize the stack pointer linux
2005-01-31 17:28 ` John Richard Moser

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=41FBC0EF.8010705@comcast.net \
    --to=nigelenki@comcast.net \
    --cc=akpm@osdl.org \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riel@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