Automatic Fix for C Integer Errors by Precision Improvement

被引:22
作者
Cheng, Xi [1 ,2 ,3 ]
Zhou, Min [1 ,2 ,3 ]
Song, Xiaoyu [4 ]
Gu, Ming [1 ,2 ,3 ]
Sun, Jiaguang [1 ,2 ,3 ]
机构
[1] MoE, Key Lab Informat Syst Secur, Beijing, Peoples R China
[2] Tsinghua Natl Lab Informat Sci & Technol, Beijing, Peoples R China
[3] Tsinghua Univ, Sch Software, Beijing, Peoples R China
[4] Portland State Univ, Elect & Comp Engn, Portland, OR 97207 USA
来源
PROCEEDINGS 2016 IEEE 40TH ANNUAL COMPUTER SOFTWARE AND APPLICATIONS CONFERENCE WORKSHOPS, VOL 1 | 2016年
关键词
integer error; tolerability; code transformation;
D O I
10.1109/COMPSAC.2016.70
中图分类号
TP39 [计算机的应用];
学科分类号
081203 ; 0835 ;
摘要
Integer errors in C program may lead to serious failures and vulnerabilities. They are harbored in a wide range of programs including mature software such as Linux kernel. Code reviewing is laborious and cannot guarantee reliable fixes for errors. Addressing potential errors in the development phase is error-prone even for experts and essentially hinders developing efficiency. In this paper we propose a novel approach to automate fix for C integer errors. Our approach directly replaces original C integers with dynamic-precision integers to fix potential errors without detecting them in advance. Many errors can be fixed by precision improvement without changing the design of application. We implement a tool CIntFix to automatically fix C integer errors. CIntFix succeeds in fixing all 5414 programs in NIST's Juliet test suite from 7 weakness categories. Meanwhile, on Juliet test suite and SPEC CINT2000 benchmarks, CIntFix processes C source code at the rate of 0.157s/KLOC and the fixed programs have 18.0% slowdown on average. The results show that CIntFix is capable to fix integer errors in real-world C programs.
引用
收藏
页码:2 / 11
页数:10
相关论文
共 34 条
[1]   The software model checker BlastApplications to software engineering [J].
Dirk Beyer ;
Thomas A. Henzinger ;
Ranjit Jhala ;
Rupak Majumdar .
International Journal on Software Tools for Technology Transfer, 2007, 9 (5-6) :505-525
[2]  
Brumley D., 2007, NDSS
[3]   BRICK: A Binary Tool for Run-time Detecting and Locating Integer-based Vulnerability [J].
Chen, Ping ;
Wang, Yi ;
Xin, Zhi ;
Mao, Bing ;
Xie, Li .
2009 INTERNATIONAL CONFERENCE ON AVAILABILITY, RELIABILITY, AND SECURITY (ARES), VOLS 1 AND 2, 2009, :208-215
[4]  
Christey S., 2007, VULNERABILITY TYPE D
[5]  
Christey S, 2011, 2011 CWE SANS TOP 25
[6]  
Coker Z, 2013, PROCEEDINGS OF THE 35TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2013), P792, DOI 10.1109/ICSE.2013.6606625
[7]  
Cousot P, 1977, POPL, P238, DOI [DOI 10.1145/512950.512973, 10.1145/512950.512973]
[8]  
Dannenberg R. B., 2010, Proceedings of the 2010 IEEE 21st International Symposium on Software Reliability Engineering (ISSRE 2010), P91, DOI 10.1109/ISSRE.2010.29
[9]  
Dietz W, 2012, PROC INT CONF SOFTW, P760, DOI 10.1109/ICSE.2012.6227142
[10]  
Falke S, 2013, IEEE INT CONF AUTOM, P706, DOI 10.1109/ASE.2013.6693138