Essentially my question is, why ASLR doesn't randomize text, bss and data regions of the process? Also in the newer version of kernels (such as Linux kernel version 3.x) along with process base, libraries and stack addresses, are the heap addresses also randomized?
closed as not a real question by Adnan, D3C4FF, Terry Chia, TildalWave, Scott Pack Jun 12 at 12:41
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.
It does. The base address of the module is randomised, and therefore the virtual address of all sections will be randomised. However, the relative virtual address of sections from base must remain static, as most memory-access instructions work by relative offsets. Otherwise you'd need to generate fixups for every
It just wouldn't bring any real benefit, would cause lots of problems, and could be easily bypassed by reading known instructions in the current section (fixups are applied in memory).
Yes. Each heap's virtual base address is random, and heap allocations are performed within that heap as normal.