execstack - Linux


execstack enables the execution of non-executable stacks, a security feature that prevents programs from executing code from the stack. It’s used in security-sensitive environments, such as secure boot and hypervisors.


execstack [ OPTIONS ] COMMAND [ARGS]


  • -v, –verbose: Verbose output.
  • -h, –help: Display help.
  • -t, –stack-size: Stack size in megabytes. Defaults to 8MB.


# Enable stack execution
execstack cat /etc/passwd

# Enable stack execution with a custom stack size
execstack -t 16 cat /etc/passwd

Common Issues

  • Permissions Denied: Ensure the user has sufficient permissions to execute the command.
  • Invalid Stack Size: The stack size must be a positive integer.


execstack can be used with other tools like:

  • seccomp: Limit system calls allowed by the program.
  • paxctl: Set security flags on executables.

Related Commands

  • setarch: Change the architecture of a running process.
  • ldd: Display shared libraries required by an executable.