added 1 changeset to branch 'refs/remotes/pdziepak-github/aslr' old head: 46d58c97d448a0f531d8ef738f1db36d8350b16f new head: fdaca26e63ae6221fa356750a2515b1cea61b9ee overview: https://github.com/pdziepak/Haiku/compare/46d58c9...fdaca26 ---------------------------------------------------------------------------- fdaca26: runtime_loader: randomize position of relocatable images Use B_RANDOMIZED_BASE for creating areas for relocatable segments. [ Pawel Dziepak <pdziepak@xxxxxxxxxxx> ] ---------------------------------------------------------------------------- Commit: fdaca26e63ae6221fa356750a2515b1cea61b9ee Author: Pawel Dziepak <pdziepak@xxxxxxxxxxx> Date: Wed Feb 27 02:09:40 2013 UTC ---------------------------------------------------------------------------- 1 file changed, 2 insertions(+), 2 deletions(-) src/system/runtime_loader/images.cpp | 4 ++-- ---------------------------------------------------------------------------- diff --git a/src/system/runtime_loader/images.cpp b/src/system/runtime_loader/images.cpp index 6c6c460..d7323aa 100644 --- a/src/system/runtime_loader/images.cpp +++ b/src/system/runtime_loader/images.cpp @@ -173,7 +173,7 @@ get_image_region_load_address(image_t* image, uint32 index, int32 lastDelta, if (index == 0) { // but only the first segment gets a free ride loadAddress = RLD_PROGRAM_BASE; - addressSpecifier = B_BASE_ADDRESS; + addressSpecifier = B_RANDOMIZED_BASE_ADDRESS; } else { loadAddress = image->regions[index].vmstart + lastDelta; addressSpecifier = B_EXACT_ADDRESS; @@ -298,7 +298,7 @@ map_image(int fd, char const* path, image_t* image, bool fixed) addr_t loadAddress; size_t reservedSize = 0; size_t length = 0; - uint32 addressSpecifier = B_ANY_ADDRESS; + uint32 addressSpecifier = B_RANDOMIZED_ANY_ADDRESS; for (uint32 i = 0; i < image->num_regions; i++) { // for BeOS compatibility: if we load an old BeOS executable, we