On startup, sbcl detects whether it is running under ASLR and if so calls personality() to disable it and re-execs to have it turned off for itself. Unfortunately, after restart it does not turn it back on again. The result is that every executable started by sbcl also has ASLR disabled. I already submitted this bug with an accompanying patch to upstream already¹. Unfortunately, they are in feature-freeze at the moment and will only apply the patch after that phase. Thus I'm submitting this patch here and would like to ask you to integrate it into the ebuild until it is applied upstream. ¹ http://sourceforge.net/p/sbcl/mailman/message/34413464/ Reproducible: Always Steps to Reproduce: $ cat > test.c << EOF #include <sys/personality.h> #include <stdio.h> int main(void) { int pers = personality(0xffffffffUL); printf("ASLR is %s\n", pers & ADDR_NO_RANDOMIZE ? "off" : "on"); return 0; } EOF } $ gcc -o test test.c $ ./test ASLR is on $ cat > test.lisp << EOF #!/usr/bin/sbcl --script (sb-ext:run-program "./test" nil :output t) EOF $ sbcl --script test.lisp ASLR is off $ Actual Results: ASLR is off Expected Results: ASLR is on
Created attachment 410516 [details, diff] patch to reenable ASLR after setup
is this solved in 1.3.5 then?
The patch was applied upstream prior to release of 1.2.16, so this and all greater versions are covered. Unfortunately it seems upstream took this more as a feature request, though, so only version >=1.2.16 got the patch. Version 1.1.18 still present in portage hence is affected, too.