以下で ASLR が有効かどうか確認する。

1cat /proc/sys/kernel/randomize_va_space


Normally you might expect a value of 0 (disabled), or 1 (enabled). In the case of the randomize_va_space setting, this is true as well. When setting the value to 1, address space is randomized. This includes the positions of the stack itself, virtual dynamic shared object (VDSO) page, and shared memory regions. Setting the option to value 2 will be similar to 1, and add data segments as well. For most systems, this setting is the default and the most secure setting.


  • 0 : disabled
  • 1 : partially enabled
  • 2 : fully enabled


1# disable
2echo 0 | sudo tee /proc/sys/kernel/randomize_va_space
3# enable
4echo 2 | sudo tee /proc/sys/kernel/randomize_va_space


comments powered by Disqus