Font Size: a A A

Runtime Verification Of Memory Safety For C Programs

Posted on:2016-04-11Degree:MasterType:Thesis
Country:ChinaCandidate:W M LiFull Text:PDF
GTID:2308330503976046Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
The memory safety problem of C programs is a safety problem caused by illegal operations of memory in C programs. These illegal operations are varied, such as out of bounds of arrays and pointers, buffer overflow, and illegal operations of C library functions. The problem is caused by the lack of boundary checking mechanism. For example, the programs still executes while the array index to be accessed is not in the normal range(not between 0 and Max, while Max is the length of the array). There are a lot of such bugs in C programs, and it is a great threat to the software security. So far, there are a lot of technologies can detect these problems, but there are some defects in those technologies. For example, the modeling technology models a system by simplifying the problem and ignoring a lot of implementation details. The path analysis method, although can reduce false positives by using contextual information, it has missing bugs and becomes slow when checking too many paths.In this paper, for one thing, we propose a runtime verification method which can detect array bounds overflow by automatic program Instrumentation. We first classified array bounds overflow errors into different groups. For different groups, we design different verification methods and algorithms for dynamic checking of array bounds overflow. Experiments show that this method is feasible. For the other, on the basis of the method for checking array bounds overflow, we present a improved object-based detection technology, which is a method improving the structure variable, multidimensional array address range recording, using two query operations to detect a pointer which points to from an effective memory block to another effective one, optimizing the record store with balanced binary tree structure. Experiments show that our method can reduce the execution time overload from 19.8% to 1.5% after instrumentation, and it also reduces the influence of stub functions to the performance of program executions.
Keywords/Search Tags:Memory Safety, Object-Based Approaches, Runtime Verification, Array Bounds Overflow, Automatic Program Instrumentation
PDF Full Text Request
Related items