|
From: John R. <jr...@bi...> - 2013-07-10 17:01:16
|
> # http://udrepper.livejournal.com/11429.html > export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) > echo 1>&2 MALLOC_PERTURB_=$MALLOC_PERTURB_ " # $HOME/.bash_profile" > This will cause all bytes in newly malloc()ed areas to be set to the > same random byte. [Or, specify a constant such as > export MALLOC_PERTURB_=0xF5 The current implementation within glibc-2.17 uses (0xff & (0xff ^ atoi(getenv("MALLOC_PERTURB_")))) so you suffer the vagaries of atoi() and a bit-wise complement. |