One form of handware support that guarantees that a buffer-overflow attack does not take place is to prevent the execution of code that is located in the stack segment of a process's address space.Recall that buffer-overflow attacks are performed by overflowing the buffer on a stack frame,overwriting the return address of the function,thereby jumping to another portion of the stack frame that contains malicious executable code,which had been placed there as a result of the buffer overflow.By preventing the execution of code from the stack segment, this problem is eliminated. Approaches that use a better programming methodology are typically built around the use of bounds-checking to guand against buffer overflows.Buffer overflows do not not occur in languages like Java where every array access is guaranteed to be within bounds through a software check.Such approaches require no hardware support but result in runtime costs associated with performing bounds-checking.
Approaches that use a better programming methodology are typically built around the use of bounds-checking to guand against buffer overflows.Buffer overflows do not not occur in languages like Java where every array access is guaranteed to be within bounds through a software check.Such approaches require no hardware support but result in runtime costs associated with performing bounds-checking.