Academia.eduAcademia.edu

Abstract

The StackGuard compiler provides robust automatic protection against the all-too-common problem of stack smashing vulnerabilities. However, this protection is only provided for programs and libraries that are re-compiled with StackGuard. Thus protecting an entire system requires that all potentially vulnerable programs be re-compiled to assure that an attacker cannot exploit a stack smashing vulnerability to gain privilege on the system. This paper describes securing a Linux distribution against stack smashing attacks by re-compiling all of the C software from source code using the StackGuard compiler. We present our experience re-compiling 526 packages from source code, and our experience deploying and using the resultant system.

Key takeaways

  • StackGuard is an extension to gcc that provides an integrity check for function call activation records, making programs largely immune to stack smashing attacks [5].
  • StackGuard is a compiler enhancement to protect programs against stack smashing attacks [5,3].
  • For instance, an attacker can bypass a non-executable stack by injecting the attack code into a separate heap buffer, and then just use a stack buffer to re-point a Conversely, an attacker can bypass StackGuard protection using buffer overflows to alter other pointers in the program besides the return address, such as function pointers and longjmp buffers, which need not even be on the stack.
  • This paper describes our efforts to create an entire Linux system that is protected by StackGuard everywhere that it is potentially vulnerable to stack smashing attacks.
  • StackGuard is an effectively transparent replacement for gcc that offers protection from the pervasive problem of stack smashing vulnerabilities.