Address space layout randomization (ASLR)

Updated: October 28, 2024

Address space layout randomization varies the location of data and instructions each time an executable is loaded.

To support ASLR, your binary must be compiled as position independent. Use the -fPIC compiler option to compile libraries and the -fPIE option when compiling binaries. The QNX Neutrino compiler utilities include these options by default.

Starting procnto with the -m~r command-line option disables ASLR. Don't use this option on systems where ASLR should be enabled.

The qconn daemon (which you can run on a target system to handle all incoming requests from the QNX Momentics IDE and QNX Toolkit for VS Code) disables ASLR by default. ASLR is also disabled for processes that qconn starts, including any process that the IDE or QNX Toolkit starts via qconn (unless you run qconn with ASLR enabled). For more information, go to the qconn entry in the Utilities Reference.

For more information, see Address space layout randomization (ASLR) in the "Security features for system integrators" section.