John Lam 1997 — 2026

NX: No execute coming in Win XP SP2

Scoble just posted a link to the Developer’s View of Windows XP SP2. It’s worth reading the section on the new memory protection features in SP2, specifically the No-Execute (NX) flag. It requires hardware support from the CPU, specifically the ability to set a no-execute flag on each virtual page. This would effectively make it impossible to execute code that was injected via a buffer overrun attack on a data page. Currently the only CPU’s that implement this feature are AMD’s K8 and Intel Itanium processors, but “it is expected that future 32 and 64-bit processors will provide execution protection. Microsoft is preparing for and encouraging this trend by supporting execution protection in its flagship Windows operating systems.”

3 archived reader comments

Peter Sumner (2003-11-07)

Does anyone know which (if any) current JIT compilers are going to be broken by SP2 and the NX bit?

NT (2003-12-12)

What about windows thunks in ATL (“atlbase.h”)? Are all the applications using ATL going to stop working?

John Lam (2003-12-12)

According to Jim Hogg, the current implementation of the JIT in V1.0 and V1.1 do not use the VirtualProtect() API to mark JITTed code pages. This means that it is likely that V1.0 and V1.1 .NET FX will break under Athlon 64 processors running WinXP SP2.