LLI Wiki — My Digital Knowledge Base

Disable ASLR for Oracle on Linux (ORA-00445)

Why ASLR makes Oracle background processes fail on Linux, how to check it and how to disable it.

Some Oracle background processes can fail to start, and the instance can stop, with errors such as ORA-00445 ("background process did not start after 120 seconds") or failures in the shmat shared memory call. On Linux, one cause can be Address Space Layout Randomization (ASLR). Oracle recommends disabling ASLR on Linux releases.

What ASLR does

ASLR places the base addresses of executables, shared libraries, heap and stack at random positions in the process address space. This makes existing vulnerabilities harder to exploit.

Oracle maps shared memory objects at the same address across its processes. If ASLR moves that address, a process cannot attach the shared memory object at the required address. The attach fails and the process does not start.

Oracle's guidance is to disable ASLR on Oracle Enterprise Linux, Red Hat Enterprise Linux 5, 6 and 7, and SUSE 10 and later.

Check the current setting

cat /proc/sys/kernel/randomize_va_space
Value Meaning
0 No randomization
1 Conservative randomization: shared libraries, stack, mmap(), VDSO and heap
2 Full randomization: the same as 1, plus memory managed through brk()

Disable ASLR temporarily

echo 0 | sudo tee /proc/sys/kernel/randomize_va_space

This setting is lost at reboot.

Disable ASLR persistently

On Red Hat or CentOS 6 and later, add this line to /etc/sysctl.conf:

kernel.randomize_va_space=0

On Red Hat 5, add these two lines:

kernel.randomize_va_space=0
kernel.exec-shield=0

Check the loaded values:

/sbin/sysctl -a | grep randomize

Notes

Mastodon LLIMastodon SocialFosstodon