Preview

Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS)

Advanced search

Searching for tainted vulnerabilities in static analysis tool Svace

https://doi.org/10.15514/ISPRAS-2021-33(1)-1

Abstract

The paper is dedicated to search for taint-based errors in the source code of programs, i.e. errors caused by unsafe use of data obtained from external sources, which could potentially be modified by an attacker. The interprocedural static analyzer Svace was used as a basis. The analyzer searches both for defects in the program and searches for suspicious places where the logic of the program may be violated. The goal is to find as many errors as possible at an acceptable speed and a low level of false positives (< 20-35%). To find errors, Svace with help of modified compiler builds a low-level typed intermediate representation, which is used as an input to the main SvEng analyzer. The analyzer builds a call graph and then performs summary-based analysis. In this analysis, the functions are traversed according to the call graph starting from the leaves. After analyzing the function, its summary is created, which will then be used to analyze the call instructions. The analysis has both high speed and good scalability. Intra-procedural analysis is based on symbolic execution with the union of states at merge points of paths. An SMT solver can be used to filter out infeasible paths for some checkers. In this case, the SMT-solver is called only if there is a suspicion of an error. The analyzer has been expanded to find defects of tainted data using. The checkers are implemented as plugins by using the source-sink scheme. The sources are calls of library functions that receive data from outside the program, as well as the arguments of the main function. Sinks are accessing to arrays, using variables as a step or loop boundary, calling functions that require checked arguments. Checkers covering most of the possible types of vulnerabilities for tainted integers and strings have been implemented. The Juliet project was used to assess the coverage. The false negative rate ranged from 46,31% to 81.17% with a small number of false positives.

About the Authors

Alexey Evgenevich BORODIN
Ivannikov Institute for System Programming of the RAS
Russian Federation
PhD, researcher


Alexey Vyacheslavovich GOREMYKIN
Ivannikov Institute for System Programming of the RAS, Lomonosov Moscow State University
Russian Federation
Master's student at the Faculty of Computational Mathematics and Cybernetics, intern at ISP RAS


Sergey Pavlovitch VARTANOV
Ivannikov Institute for System Programming of the RAS
Russian Federation
Researcher


Andrey Andreevich BELEVANTSEV
Ivannikov Institute for System Programming of the RAS, Lomonosov Moscow State University
Russian Federation
Doctor of Physical and Mathematical Sciences, Leading Researcher of ISP RAS, Professor of the Department of System Programming of the Faculty of Computer Science of Moscow State University


References

1. A. Belevantsev, A. Borodin, I. Dudina et al. Design and development of Svace static analyzers. In Proc. of the 2018 Ivannikov Memorial Workshop (IVMEM), 2018, pp. 3-9.

2. А.Е. Бородин и А.А. Белеванцев. Статический анализатор Svace как коллекция анализаторов разных уровней сложности. Труды ИСП РАН, том 27, вып. 6, 2015 г., стр. 111-134. DOI: 10.15514/ISPRAS-2015-27(6)-8 / A. Borodin, A. Belevancev. A Static Analysis Tool Svace as a Collection of Analyzers with Various Complexity Levels. Trudy ISP RAN/Proc. ISP RAS, vol. 27, issue 6, 2015, pp.111-134 (in Russian).

3. A. Borodin, A. Belevantsev, D. Zhurikhin, and A. Izbyshev. Deterministic static analysis. In Proc. of the 2018 Ivannikov Memorial Workshop (IVMEM), 2018, pp. 10-14.

4. В.П. Иванников, А.А. Белеванцев, А.Е. Бородин и др. Статический анализатор Svace для поиска дефектов в исходном коде программ. Труды ИСП РАН, том 26, вып. 1, 2014 г., стр. 231-250. DOI: 10.15514/ISPRAS-2014-26(1)-7 / V. Ivannikov, A. Belevantsev, A. Borodin et al. Svace: static analyzer for detecting of defects in program source code. Trudy ISP RAN/Proc. ISP RAS, vol. 26, issue 1, 2014, pp.231-250 (in Russian).

5. Aleph One. Smashing the stack for fun and profit. Phrack magazine, vol. 7, issue 49, 1996, pp. 14-16.

6. National Vulnerability Database – CWE Over Time. 2020. URL: https://nvd.nist.gov/general/visualizations/vulnerability-visualizations/cwe-over-time. Accessed 15.01.2020.

7. W. Landi. Undecidability of static analysis. ACM Letters on Programming Languages and Systems (LOPLAS), vol. 1, no. 4, 1992, pp. 323-337.

8. M. Hind. Pointer analysis: haven’t we solved this problem yet? In Proc. of the ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering, 2001, pp. 54-61.

9. W. Landi. Interprocedural aliasing in the presence of pointers. PhD Thesis, The State University of New Jersey, 1992, 268 p.

10. W. Landi, B.G. Ryder. A safe approximate algorithm for interprocedural aliasing. ACM SIGPLAN Notices, vol. 27, no. 7, 1992, pp. 235-248, 1992.

11. B. Livshits, M. Sridharan, Y. Smaragdakis et al. In defense of soundiness: a manifesto. Communications of the ACM, vol. 58, no. 2, 2015, 44-46.

12. А. Белеванцев, А. Избышев, Д. Журихин. Организация контролируемой сборки в статическом анализаторе Svace. Системный администратор, вып. 7-8, 2017 г., стр. 135-139 / A. Belevantsev, A. Izbyshev, D. Zhurikhin. Monitoring program builds for Svace static analyzer. System Administrator, issues 7-8, 2017, pp. 135-139 (in Russian).

13. W.R. Bush, J.D. Pincus, and D.J. Sielaff. A static analyzer for finding dynamic programming errors. Software-Practice and Experience, vol. 30, issue 7, 2000, pp. 775–802.

14. A. Aiken, S. Bugrara, I. Dillig et al. An overview of the saturn project. In Proc. of the 7th ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering, 2007, pp. 43–48.

15. D. Babic and A.J. Hu. Calysto: scalable and precise extended static checking. In Proc. of the 30th international conference on Software engineering, 2008, pp. 211-220.

16. В.К. Кошелев, В.Н. Игнатьев, А.И. Борзилов. Инфраструктура статического анализа программ на языке C#. Труды ИСП РАН, том 28, вып. 1, 2016 г., стр. 21-40. DOI: 10.15514/ISPRAS-2016-28(1)-2 / V. Koshelev, V. Ignatiev, A. Borzilov, and A. Belevantsev. SharpChecker: static analysis tool for C# programs. Programming and Computer Software, vol. 43, no. 4, 2017, pp.:268–276.

17. Р.Р. Мулюков, А.Е. Бородин. Использование анализа недостижимого кода в статическом анализаторе для поиска ошибок в исходном коде программ. Труды ИСП РАН, том 28, вып. 5, 2016 г.,, стр. 145-158 / R.R.Mulyukov,A.E.Borodin. Using unreachable code analysis in static analysis tool for finding defects in source code. Trudy ISP RAN/Proc. ISP RAS, 2016, vol. 28, issue 5, 2016, pp. 145-158 (in Russian). DOI: 10.15514/ISPRAS-2016-28(5)-9.

18. Tizen 6.0 Public M2 Release. URL: https://www.tizen.org/blogs/bighoya/2020/tizen-6.0-public-m2-release-0, accessed 15.01.2020.

19. P.E. Black. Juliet 1.3 Test Suite: Changes from 1.2. US Department of Commerce, National Institute of Standards и Technology, 2018, 37 p.

20. Juliet Test Suite v1.2 for C/C++ User Guide. Center for Assured Software, National Security Agency, 2012, 41p.


Review

For citations:


BORODIN A.E., GOREMYKIN A.V., VARTANOV S.P., BELEVANTSEV A.A. Searching for tainted vulnerabilities in static analysis tool Svace. Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS). 2021;33(1):7-32. (In Russ.) https://doi.org/10.15514/ISPRAS-2021-33(1)-1



Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 License.


ISSN 2079-8156 (Print)
ISSN 2220-6426 (Online)