Skip to content

Glossary

NX bit (DEP)

A page-level permission that marks memory as non-executable, so data written to the stack or heap cannot run as code. Known as DEP on Windows.

The NX (No-eXecute) bit, called XD by Intel, XN on Arm and Data Execution Prevention (DEP) on Windows, is a page-table permission that forbids the CPU from fetching instructions from a page. Operating systems map the stack, heap and data segments without execute permission, so bytes an attacker manages to write into them cannot be executed; an attempt raises a fault.

On Linux, the ELF GNU_STACK program header should read RW, not RWE, and -Wl,-z,noexecstack enforces it at link time. NX stops code injection but not the reuse of existing code, which is why control-flow integrity exists.