Newbie's question> ESP register...

Discuss and suggest new grsecurity features

Newbie's question> ESP register...

Postby phantomforce » Wed Jul 16, 2003 8:53 am

I tried to run the following simple code.
Code: Select all
#include <stdio.h>

unsigned long get_esp() { __asm__("movl %esp, %eax"); }

int main()
{
    printf("esp: %x\n", get_esp());
    return 0;
}


Under RedHat 9 with Gcc 3.2.2, The value of esp reigsters varied as follows;

Code: Select all
[XXX@XXX util]$ ./esp
esp: bfffe5a8
[XXX@XXX util]$ ./esp
esp: bffff028
[XXX@XXX util]$./esp
esp: bfffdca8
[XXX@XXX util]$ ./esp
esp: bfffeca8
[XXX@XXX util]$ ./esp
esp: bfffdd28
[[XXX@XXX util]$ ./esp
esp: bfffe928


Is this the effect of the PaX???
Viewing the object code itself is not special. I think that the compiler
does not affect for the above. When I replaced the kernel, the result
were static.

In RedHat 9, the dynamic stack is default??? And the technology
is from the gresecurity?? This is my question.

(Soooo sorry for my bad English :wink: )
phantomforce
 
Posts: 1
Joined: Wed Jul 16, 2003 8:43 am

Re: Newbie's question> ESP register...

Postby PaX Team » Wed Jul 16, 2003 10:23 am

phantomforce wrote:Is this the effect of the PaX???
http://pageexec.virtualave.net/docs/randustack.txt, in particular, the third paragraph in the implementation section.
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm


Return to grsecurity development

cron