[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

position independent executables (PIE) on Debian?



Newer versions of gcc and binutils support generation of position
independent executables (PIE) using the option -fpie for gcc and -pie
for ld.  the result is a ELF shared object that can be executed
instead of a ELF executable.  The difference is that PIE executables
can be loaded at any address and support address randomization in
order to make vulnerability exploits harder.

In Debian you can create and execute such PIE executables but their
address spaces are not randomized (I've checked with printf() and cat
/proc/<pid>/maps).  I assume you need kernel support for this and the
standard Debian kernel doesn't have it.

So is there a way to get PIE executables with random addresses on
Debian?


urs



Reply to: