FIX-GNUSTACK(1)

NAME
fix-gnustack - query or clear any ELF GNU_STACK executable flag

SYNOPSIS
fix-gnustack -h

fix-gnustack [-f] ELF

DESCRIPTION
fix-gnustack scans the program headers of an ELF binary or shared object library, reports if it has a GNU_STACK entry and if it is marked both writeable and executable. On PaX hardened kernels where memory protection (MPROTECT) is enforced, execution of binaries with GNU_STACKS marked WX, or execution of binaries linking against libraries with GNU_STACKS marked WX, is terminated by the kernel. When fix-gnustack is called without the -f option on an ELF, it simply reports the RWX (read/write/execute) flags on any GNU_STACK entry found. When called with -f, it clears the X flag if a GNU_STACK entry is found and it has both W and X flags.

OPTIONS

-h  Print out a short help message and exit.

[-f] ELF
    "Fix" the ELF, ie, remove the X flag from any GNU_STACK entry found if it has both W and X flags. When called without, it simply reports what flags it found.

HOMEPAGE
http://www.gentoo.org/proj/en/hardened/pax-quickstart.xml

REPORTING BUGS
Please report bugs at http://bugs.gentoo.org.

SEE ALSO
scanelf(1), dumpelf(1), paxctl(1), paxctl-ng(1), pspax(1).

AUTHORS
Anthony G. Basile <blueness@gentoo.org>