Re: Patch 4/6 randomize the stack pointer

From: Arjan van de Ven
Date: Sat Jan 29 2005 - 11:44:40 EST


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.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/