Disable the Linux memory address randomization mechanism and disable process address space randomization. you can fix the base address, stack, and vdso page addresses of the mmap process. you can set kernel. randomize_va_space kernel parameters are used to set memory address randomization. currently randomize_v... disable the Linux memory address randomization mechanism and disable process address space randomization. you can fix the base address, stack, and vdso page addresses of the mmap process. you can set kernel. randomize_va_space kernel parameters are used to set memory address randomization. currently, three randomize_va_space values are available: [, 2] 0-indicating that the process address space is disabled for randomization. 1-randomizes the base address, stack, and vdso pages of mmap. 2-adds heap randomization based on 1. # Echo 0>/proc/sys/kernel/randomize_va_space by using the following program, you can check whether the modification is successful (x86_64): // gcc-g stack. c-o stack // unsigned long sp (void) {asm ("mov % rsp, % rax");} int main (int argc, char ** argv) {unsigned long esp = sp (); printf ("Stack pointer (ESP: 0x % lx) \ n", esp); return 0 ;} close the running result-bash-4.1 #. /stack Stack pointer (ESP: 0x7fff50162e50)-bash-4.1 #. /stack Stack pointer (ESP: 0x7fff5d023730)-bash-4.1 #. /stack Stack pointer (ESP: 0x7ffff9982180)-bash-4.1 #. /stack Stack pointer (ESP: 0x7fffb23612a0)-bash-4.1 #. /stack Stack pointer (ESP: 0x7ffffd5a4980)-bash-4.1 #. /stack Stack pointer (ESP: 0x7fffbac61bf0) is disabled and the running result is-bash-4.1 #. /stack Stack pointer (ESP: 0x7fffffffeaf0)-bash-4.1 #. /stack Stack pointer (ESP: 0x7fffffffeaf0)-bash-4.1 #. /stack Stack pointer (ESP: 0x7fffffffeaf0)-bash-4.1 #. /stack Stack pointer (ESP: 0x7fffffffeaf0)-bash-4.1 #. /stack Stack pointer (ESP: 0x7fffffffeaf0)-bash-4.1 #. /stack Stack pointer (ESP: 0x7fffffffeaf0) reference: http://en.wikipedia.org/wiki/Address_space_layout_randomizationhttp://xorl.wordpress.com/2011/01/16/linux-kernel-aslr-implementation/
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.