Dynamic detection of use after free bugs
Автор: Asryan S.A., Gaissaryan S.S., Kurmangaleev Sh. F., Aghabalyan A.M., Hovsepyan N.H., Sargsyan S.S.
Журнал: Труды Института системного программирования РАН @trudy-isp-ran
Статья в выпуске: 3 т.30, 2018 года.
Бесплатный доступ
The article describes new method of use after free bug detection using program dynamic analysis. In memory-unsafe programming languages such as C/C++ this class of bugs mainly accurse when program tries to access specific area of dynamically allocated memory that has been already freed. This method is based on combination of two basic components. The first component tracks all memory operations through dynamic binary instrumentation and searches for inappropriate memory access. It preserves two sets of memory address for all allocation and free instructions. Using both sets this component checks whether current memory is accessible through its address or it has been already freed. It is based on dynamic symbolic execution and code coverage algorithm. It is used to maximize the number of execution paths of the program. Using initial input, it starts symbolic execution of the target program and gathers input constraints from conditional statements. The new inputs are generated by systematically solving saved constraints using constraint solver and then sorted by number of basic blocks they cover. Proposed method detects use after free bugs by applying first component each time when second one was able to open new path of the program. It was tested on our synthetic tests that were created based on well-known use after free bug patterns. The method was also tested on couple of real projects by injecting bugs on different levels of execution.
Program dynamic analysis, code coverage, use after free bug, dynamic symbolic execution, instrumentation
Короткий адрес: https://sciup.org/14916552
IDR: 14916552 | DOI: 10.15514/ISPRAS-2018-30(3)-1