Abstract

The majority of software vulnerabilities originate from buffer overflow. Techniques to eliminate buffer overflows and limit their damage include secure programming, source code audit, binary code audit, static and dynamic code generation features. Modern compilers implement compile-time and execution time protection schemes, that include variables reordering, inserting canary value, and separate stack for return addresses. Our research is targeted to finding the breaches in the compiler protection methods. We tested MSVC, gcc, and clang and found that two of these compilers have flaws that allow exploiting buffer overwrite under certain conditions.

Highlights

  • Even though there is a lots of progress in mitigating attacks against buffer overflows and in building static analysis tools that attempt to detect these vulnerabilities, buffer overflows remain one of the top ranking vulnerabilities year over year [1]

  • First group is targeted to finding a problem before software is deployed: secure programming, source code audit, binary code audit, automatic testing

  • In this paper we presented the analysis of the buffer overflow protection methods used in modern compilers

Read more

Summary

Introduction

Even though there is a lots of progress in mitigating attacks against buffer overflows and in building static analysis tools that attempt to detect these vulnerabilities, buffer overflows remain one of the top ranking vulnerabilities year over year [1]. Variables reordering and canary values protecting the return address have low runtime overhead and greatly reduce the exploitability of the overflow bugs. Nowadays these techniques are adopted by the commodity compilers Microsoft Visual C++ (MSVC) and GNU C Compiler (gcc) [8], [9]. After bypassing protection scheme an attacker can overwrite instruction pointer and hijack the control flow This kind of threat is well known and many prior researches focused on this problem [14]. In our work we address stack and frame pointer attacks, related to the buffer overflow problem. Description of MSVC and clang stack protection bugs, that allow overwriting stack pointer by calling vulnerable function

Protection Against Stack Buffer Overflows Through the Code Generation
Canary Value
Reordering of the Variables
Copying Function Arguments
Method of Analysis
Snippets Code Structure
Compilation Options
Scheme of Protection
Attack Vectors
Related Work
Conclusion
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call