Giuseppe Scrivano <gscriv...@gnu.org> writes:

> I noticed that ld relocates symbols assigning them always the same
> values in a deterministic way.  I am quite sure this is the desired
> behaviour but wouldn't be better to add a bit of randomness?
> Buffer overflow exploits can take advantage to know in advance the
> position of a symbol, it will not solve completely the problem but
> surely it will make things harder.
>
> Does something similar already exist?  Is it a reasonable idea?

Exploits which rely on the position of symbols are based on popular
binaries which have already been linked.  Binaries are not routinely
relinked.  Randomizing the behaviour at relink time would have a
vanishingly small effect on security.

Randomizing addresses at runtime would have slightly more effect.
That is already implemented in the linker and GNU/Linux kernel, via
-pie.

Ian


_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to