Re: "Moving" Stack: my poor return address!
Alexander Klimov <[email protected]>
| Newsgroups | gmane.comp.security.vulnerabilities |
|---|---|
| Message-ID | <TheMailAgent.27c673c8a55d4@2f452836d6ec78187fa6a> |
On Mon, 31 Jul 2006, Jack C wrote: > I'm running on Fedora 5. Is this a security thing that's new in the past > 2 years or so since I've coded one of these? Yes, many distributions now use by default address space randomization. > Is there any way I can either (1) make the stack sit still so I can > point into it <http://gcc.gnu.org/wiki/Randomization>: To disable randomization for a shell session: setarch $(uname -p) -RL bash To disable randomization for the whole system, add this to /etc/sysctl.conf: kernel.randomize_va_space = 0 After that, run 'sysctl -p' as root to update the kernel without rebooting. > or (2) find out where it is during execution? Just printf address of some local variable (they are allocated in stack). -- Regards, ASK