For buffer overflows, what is the stack address when using pthreads?
Posted
by t2k32316
on Stack Overflow
See other posts from Stack Overflow
or by t2k32316
Published on 2010-03-08T16:30:57Z
Indexed on
2010/03/08
16:36 UTC
Read the original article
Hit count: 913
I'm taking a class in computer security and there is an extra credit assignment to insert executable code into a buffer overflow. I have the c source code for the target program I'm trying to manipulate, and I've gotten to the point where I can successfully overwrite the eip for the current function stack frame. However, I always get a Segmentation fault, because the address I supply is always wrong. The problem is that the current function is inside a pthread, and therefore, the address of the stack seems to always change between different runs of the program. Is there any method for finding the stack address within a pthread (or for estimating the stack address within a pthread)? (note: pthread_create's 2nd argument is null, so we're not manually assigning a stack address)
© Stack Overflow or respective owner