Stack Frame Protection with LD_PRELOAD [1] Buffer overflows are caused by exploiting the stack frame, which stores local variable and return pointer information. Methods to protect the stack frame include compiler patches, runtime security using ptrace, and library-based security loaded with LD_PRELOAD. [2] The author created a library called LibSFP that can be loaded with LD_PRELOAD to securely replace vulnerable functions like strcpy and prevent buffer overflows. It works by measuring the current stack frame size and limiting calls to this size. [3] LibSFP stores a magic value in malloc chunk headers to distinguish global and chunked variables, and protects variables in the stack