Research on Method of C/C++ Code Static Detection Based on Rules
- Author
- LiuChunYan
- Advisor
- ZhouKuanJiu
- School
- Dalian University of Technology
- Major
- Applied Computer Technology
- Classification
- TP311.52 Software Development
- Degree
- Master's thesis
- Year
- 2010
- Downloads
- 105
- Citations
- 0
Abstract
The reliability of software systems attracts more and more attention of people, especially in the occasion with high security requirements, such as spacecraft systems, automotive and some industrial control systems. Software safety analysis is an important means to ensure software reliability. Static analysis technique has been widespread concern for it can find security vulnerabilities in code without execute the code. And it plays an important role in the software safety analysis. With the expanding of software scale, the way of artificial walkthrough become unpractical. A credible tool for automated static analysis has very high value and prospects.First of all, this paper describes the technology of software testing and its development, and focuses on static analysis method and its tools. Then, static detection based on safety rules is introduced. And it indicates that the traditional method, which extractes static information from the AST (Abstract Syntax Tree) generated by GCC, need to deal with a large volume of redundant information. Moreover, this method reduces the accuracy and efficiency of information extraction. A syntax tree model based on relational storage schema is proposed in this paper, which effectively reduces the redundancy. In addition, an intermediate storage model with well extensibility based on XML is disigned. Syntax tree model is finally converted to XML format which is more suitable for static detection.Based on the method mentioned above, an automatic static detection system named CIS (Code Inspection System) is designed and implemented, which supports all the rules described in "GJB5369-2005 safe subset of C language for space armament software" and has well extensibility. CIS provides Multi-layer analysis include lexical analysis, syntax analysis, shallow semantic parsing and deep-seated semantic analysis, which can detect security vulnerabilities in reliable way. CIS also reduces the requirements on the users, and there is no need to add comments in the source program. Moreover, CIS supports multiple file parsing, which can find out security vulnerabilities distribute among associated files.
Table of contents
Abstract 4-5
Abstract 5-8
1 Introduction 8-11
1.1 Background and Significance 8-9
1.2 of this paper work 9-10
1.3 thesis structure 10-11
2 Software Testing Technical Overview 11-19
2.1 software testing concepts and development 11-13
2.2 software testing technology classification 13-15
2.3 static test technology 15-17
2.3.1 Rule-based check 15
2.3.2 Model Checking 15
2.3.3 abstract interpretation 15-16
2.3.4 theorem proving 16
2.3.5 Type Derivation 16-17
the
of 2.4 static detection tools status quo 17-18
2.5 This chapter Summary 18-19
3 CIS the systems theoretical knowledge and language tools 19-26
3.1 compiler Overview 19-21
3.1.1 lexical analysis 19-20
3.1.2 Parsing 20-21
3.2 Lex and Yacc tools 21-23
3.3 C / C safety programming rules 23-25
3.4 This chapter Summary 25-26
CIS system core technology and algorithm 26-41
4.1 Introduction 26-27
4.2 the relational syntax tree based on the relationship between storage mode 27-31
4.2.1 relational storage mode 27-28
4.2.2 sign convention defined 28
4.2.3 syntax tree construction algorithm 28-30
4.2.4 Algorithm Analysis 30-31
4.3 symbol table organization 31-33
4.4 memory management mechanism 33-34
4.5 XML intermediate model 34-40
4.5.1 security attributes extracted 35-36
4.5.2 XML document model 36-37
4.5.3 XML statement model 37
4.5.4 XML identifier model 37-39
4.5.5 XML model in object-oriented languages ??to expand 39-40
4.6 This chapter Summary 40-41
5 CIS system design and implementation 41-53
5.1 CIS system functional requirements analysis 41-42
5.2 CIS system architecture design 42-43
5.3 lexical analysis design 43-45
5.4 parsing design 45-50
5.4.1 symbols and type design 46-48
5.4.2 function and function pointer declaration 48-49
5.4.3 condition selection cycle 49-50
5.5 vulnerability detection 50-51
5.6 Experimental Analysis 51-52
5.7 This chapter Summary 52-53
concluded 53-55
the
References 55-57
during the master's degree Post academic situation 57-58
Acknowledgements 58-60
Related dissertations
- Research on Memory Leak Detection of C/C++Code
- Design and Implementation of the XProc Processor Based on.NET
- Design and Implementation of the XML Document Processing System Based on Xproc
- Research of Web Information Extraction Based on XML
- Research of Information Extraction from Web Documents Based on Tree Automaton
- Research and Application of Information Retrieval Based on XML Document
- Research of Keyword Query Processing on XML Data
- Research on Subtree Results Generation of XML Keyword Search
- Results Diversification for XML Keyword Search Based on Semantics
- Agent-based Research and Implementation on Simulation Modeling and Scenario in Battlefield Environment
- Analog Electronic Technology Experiment Based on Virtual and Practicality Combined Lab
- Power Electronic Remote Experiment Under Virtual and Reality Combination Framework
- Research and Implementation of Keyword Query Technique in a Seamless Intergrated Relation-XML Database System
- The Design and Implementation of WebDAV Service in XML Database
- Research of Heterogeneous Database Integration Based on Web Service and XML
- Research on Encoding and Query Process Technology for Continuous Uncertain
- Research on XML Data Cube Based on Tree Structure
- XQuery Query Processor Design and Implementation
- Research and implementation of group production information integration management
- Research on XML Conceptual Model and Internal Transformation Method