Understanding integer overflow in C/C++

Update Item Information
Publication Type Journal Article
School or College College of Engineering
Department Computing, School of
Creator Regehr, John
Other Author Dietz, Will; Li, Peng; Adve, Vikram
Title Understanding integer overflow in C/C++
Date 2012-01-01
Description Integer overflow bugs in C and C++ programs are difficult to track down and may lead to fatal errors or exploitable vulnerabilities. Although a number of tools for finding these bugs exist, the situation is complicated because not all overflows are bugs. Better tools need to be constructed-but a thorough understanding of the issues behind these errors does not yet exist. We developed IOC, a dynamic checking tool for integer overflows, and used it to conduct the first detailed empirical study of the prevalence and patterns of occurrence of integer overflows in C and C++ code. Our results show that intentional uses of wraparound behaviors are more common than is widely believed; for example, there are over 200 distinct locations in the SPEC CINT2000 benchmarks where overflow occurs. Although many overflows are intentional, a large number of accidental overflows also occur. Orthogonal to programmers' intent, overflows are found in both well defined and undefined flavors. Applications executing undefined operations can be, and have been, broken by improvements in compiler optimizations. Looking beyond SPEC, we found and reported undefined integer overflows in SQLite, PostgreSQL, SafeInt, GNU MPC and GMP, Firefox, GCC, LLVM, Python, BIND, and OpenSSL; many of these have since been fixed. Our results show that integer overflow issues in C and C++ are subtle and complex, that they are common even in mature, widely used programs, and that they are widely misunderstood by developers.
Type Text
Publisher Institute of Electrical and Electronics Engineers (IEEE)
First Page 1
Last Page 11
Dissertation Institution University of Utah
Language eng
Bibliographic Citation Dietz, W., Li, P., Regehr, J., & Adve, V. (2012). Understanding integer overflow in C/C++. In Proceedings of the 34th International Conference on Software Engineering (ICSE 2012), 1-11. June.
Rights Management (c) 2012 IEEE. Personal use of this material is permitted. However, permission to reprint/republish this material for advertising or promotional purposes or for creating new collective works for resale or redistribution to servers or lists, or to reuse any copyrighted component of this work in other works must be obtained from the IEEE.
Format Medium application/pdf
Format Extent 243,756 bytes
Identifier uspace,17469
ARK ark:/87278/s62z1q8f
Setname ir_uspace
ID 707775
Reference URL https://collections.lib.utah.edu/ark:/87278/s62z1q8f
Back to Search Results