aslr

Disable randomization of memory addresses

二次信任 提交于 2019-11-26 12:55:25
问题 I\'m trying to debug a binary that uses a lot of pointers. Sometimes for seeing output quickly to figure out errors, I print out the address of objects and their corresponding values, however, the object addresses are randomized and this defeats the purpose of this quick check up. Is there a way to disable this temporarily/permanently so that I get the same values every time I run the program. Oops. OS is Linux fsttcs1 2.6.32-28-generic #55-Ubuntu SMP Mon Jan 10 23:42:43 UTC 2011 x86_64 GNU

Address canonical form and pointer arithmetic

。_饼干妹妹 提交于 2019-11-26 11:19:15
问题 On AMD64 compliant architectures, addresses need to be in canonical form before being dereferenced. From the Intel manual, section 3.3.7.1: In 64-bit mode, an address is considered to be in canonical form if address bits 63 through to the most-significant implemented bit by the microarchitecture are set to either all ones or all zeros. Now, the most significat implemented bit on current operating systems and architectures is the 47th bit. This leaves us with a 48-bit address space. Especially

Disable and re-enable address space layout randomization only for myself

核能气质少年 提交于 2019-11-26 11:08:26
问题 I would like to disable address space layout randomization (ASLR) on my system (Ubuntu Gnu/Linux 2.6.32-41-server), but, if I use sysctl -w kernel.randomize_va_space=0 the change would affect all users on the system, I presume. (Is this true?) How can I limit the effects of disabling ASLR to myself as a user only, or only to the shell session in which I invoke the command to disable? BTW, I see that my system\'s current (default) setting is sysctl -w kernel.randomize_va_space=0 Why 2 and not