4

Does Linux (kernel and applications) support the NX-bit on ARM processors? If so, how can I check if an ARM-binary is compiled with this protection enabled?

5

The NX-bit implementation its supported since ARMv6, and yes, linux also has support for it. (NX implementations needs both OS support and CPU support)

Now if you want to check the nx bit, you can do it like with any other platform, there's a good old script called checksec.sh from the trapkit team, here you can see the implementation:

  # check for NX support
  if readelf -W -l $1 2>/dev/null | grep 'GNU_STACK' | grep -q 'RWE'; then
    echo -n -e '\033[31mNX disabled\033[m   '
  else
    echo -n -e '\033[32mNX enabled \033[m   '
  fi  

Full script: http://www.trapkit.de/tools/checksec.html

If you want to see a implementation in python, Peda (Python Exploit Development Assistance for GDB) also has one (they ported the trapkit script)

https://github.com/longld/peda/blob/master/peda.py#L2543

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.