Research on the Foundamentals of Compilation Correctness and Safety

Author
HuYan
Advisor
GongYuChang
School
University of Science and Technology of China
Major
Computer Applications
Classification
TP314 Compiler,interpreter
Degree
Doctoral dissertation
Year
2007
Downloads
204
Citations
1

Request the full text

Abstract

Software security has become a critical issue that need to be considered throughout the software development cycle. During the software development process, from design to coding, any phase with security deficiencies can lead to insecure software. It is important to integrate security testing into the whole development process. Compilation is one of the most important phases in the software development process, which transforms source code to executable. The correctness and safety of the compilation process will have a great impact on the safety of the resulting executable code. With the rapid development of hardware and software verification technologies, many mature verification tools have emerged. Now it is possible to use these tools to verify complex software systems, such as compilers. In fact, compiler verification is one of the hottest research areas.The thesis focuses on compiler verification, and conducts research on some of the essential problems in the verification of compilers. In this thesis, A compiler verification framework based on program analysis is proposed. Methods for the specification and checking of program properties are also exploited, and a new method for program property checking based on the combination of type checking and model checking is proposed. A binary analysis framework for machine code checking and verification is also proposed, which helps to make a complete set of program checking tools for the compiler verification framework. In detail, the thesis focuses on the following topics:(1) The essential problems of compiler verification are exploited. A compiler verification framework based on program analysis is then proposed. The verification process is integrated into the framework as independent modules, with customizable analysis modules to adapt to application-specific property checking.(2) Methods for the representation of program properties are exploited. New methods for the representation of memory safety and information flow security are proposed. Memory safety properties are represent in a unified way with the type refinement mechanism. The typed representation of information flow security property on the SSA intermediate form is also exploited in this part. The study of program property representation method forms the basis of the compiler verification problem.(3) Methods for verifying the correctness of compiler implementation are exploited. Based on the understanding of various compiler implementation technologies, several methods for the verification of the correctness of implementation of the major components of a compiler implementation are proposed. The parser correctness is ensured by the parse-unparse verification method. The correctness of code generation and optimization implementation is verified by checking the correctness of the rewriting condition. For the verification of compiler optimization, an extended attribute grammar is introduced and is integrated with model checking tools to check the rewriting conditions.(4) Program analysis methods are carefully studied. After comparing the advantages and disadvantages of type checking and model checking method, a new technique is proposed that combines the two methods. The new method called TCMC is then applied to the checking of memory safety properties to explain its effectiveness. TCMC method provide a way for the uniform analysis method for the various program representations during the compilation process.(5) The machine code verification problem is discussed, and a new method for machine code property checking is proposed. The new method is based on decompileation techniques, and it can easily recover machine independent intermediate representations from machine code. The intermediate representation can be converted into SSA representation, and the TCMC method can then be used to check the property of the SSA form that is recovered from machine code(in the form of assembly code, or binary code).The new features of the thesis include:(1) A compiler verification framework based on program analysis is proposed. The framework supports flexible program property checking, and can be easily customized for the checking of new safety and security properties.(2) New methods for the representation of memory safety and information flow security are proposed. The new method makes extentions to standard type system, and can be used to represent many kinds of program properties.(3) New method for property checking using the combination of type analysis and model checking techniques is proposed. The new method (TCMC) makes use of the advantages of type checking and model checking, and improves the precision of the analysis.(4) A property checking method for machine code is proposed. With the method, control flow and data flow information can be recovered from machine code without the help of compiling or debugging information. Machine code is first transformed into machine independent intermediate representation. This machine code analysis method, together with the methods for source program checking, provide the compiler verification framework with a complete toolset for program property checking.

Table of contents

Abstract 4-7 ABSTRACT 7-9 directory 9-13 chart catalog 13-15 Tables 15-16 Chapter 1 Introduction 16-29 1.1 security software development 16-17 1.2 compiler construction and its secure authentication 17-22 1.2.1 compiler workflow 18-22 1.2.2 compiler implementation 22 1.2.3 compile safety verification problems raised 22 1.3 program security properties modeling and analysis 22-24 1.3.1 Programs Properties Description 23 1.3.2 Programs Properties analysis 23-24 1.4 compilation process verification technology 24-26 1.4.1 compiler correctness of the concept of 24-25 1.4.2 compiler security authentication 25 1.4.3 compiled optimized verification 25-26 1.5 paper work and organization 26-29 Chapter 2 compiler verification technology 29-52 2.1 Introduction 29-30 2.2 compiler to verify the theoretical basis 30-31 2.2.1 program semantics 30-31 2.2.2 Semantic definition of equivalence and its proof method 31 2.3 compiler validation research content and background 31-33 2.3.1 compiler validation classification 31-32 2.3.2 compiler validation research background analysis 32-33 2.4 program attribute description 33-51 2.4.1 memory safety properties based on the type of refined description of the study 33-40 2.4.2 information flow security properties, said the study 40-51 2.5 Summary 51-52 Chapter 3 compiler correctness validation studies 52-73 3.1 Introduction 52 3.2 parsing algorithm correctness verification 52-54 3.2.1 parsing algorithm to achieve an overview of 52 3.2.2 Parser correctness verification program 52-53 3.2.3 Verify that the instance analysis 53-54 3.2.4 Experimental Analysis 54 3.3 code generation algorithm is correct authentication method 54-57 3.3.1 code generation algorithm principle Profile 54-55 3.3.2 authentication method 55-56 3.3.3 Experimental Analysis 56-57 3.4 attribute grammar-based compiler optimization, validation studies 57-61 3.4.1 compiler optimization to achieve an overview of 57-59 3.4.2 Attribute Grammars About 59 3.4.3 attribute grammar for the CFG to expand 59-60 3.4.4 describe the LCFG of property generated 60-61 3.4.5 Experimental 61 3.5 SSA-based register allocation algorithm 61-70 3.5.1 the SSA syntax and semantics 62-64 3.5.2 register allocation algorithm About 64- 3.5.3 SSA-based register allocation scheme 64-66 3.5.4 register allocation algorithm formal description 66-68 3.5.5 register allocation algorithm correctness verification 68-70 3.6 of the discussion of the SSA-based code generation 70 3.7 experiment 70-72 3.8 Summary 72-73 Chapter 4 compiler validation framework based on program analysis 73-83 4.1 Introduction 73 4.2 SUIF compiler framework Profile 73-74 4.3 validation framework designed 74-78 4.3.1 of the overall structure of 74-75 4.3.2 important module description 75-78 4.4 to customize the program to check the model description language CPDL 78-79 4.4.1 Description Language syntax 78 4.4.2 self-defined analysis of case analysis 78-79 4.5 Analysis Module uses fundamental analysis algorithm 79-80 4.6 workflow compiler validation framework 80-81 4.6.1 source property to check 80-81 4.6.2 compiler to transform the process of validity checking 81 4.7 Summary 81-83 Chapter 5 application security attribute analysis method 83-96 5.1 Introduction 83 5.2 TC and MC mixed-attribute analysis method 83-87 5.2.1 a single analysis of the shortcomings of 84 5.2.2 MC algorithm principle 84-86 5.2.3 TCMC algorithm 86 the 5.2.4 TCMC algorithm is the meaning of the counter-example 86-87 5.3 TCMC algorithm-based memory safety analysis 87 5.4 the TCMC algorithm-based memory leak detection program 87-93 5.4.1 memory leak Overview 87-88 5.4.2 memory leak detection algorithm 88-90 5.4.3 Case Study 90-93 5.5 TCMC algorithm-based information flow security analysis program 93-94 5.5.1 Information flow security marked 93 5.5.2 security type transmission 93 5.5.3 Case Study 93-94 5.6 experiment 94-95 5.7 Summary 95-96 Chapter 6 binary code analysis framework, 96-108 6.1 Introduction 96 6.2 machine code analysis 96-106 6.2.1 to enable redirection of the binary code analysis tool designed 96-98 6.2.2 machine language semantic description MSSL 98-101 6.2.3 The machine-independent RTL intermediate language 101 6.2.4 control flow information recovery 101-105 6.2.5 SSA transform 105 6.2.6 Types 105-106 6.2.7 binary analysis tools in compiler validation framework 106 6.3 discussion 106 6.4 Summary 106-108 Chapter 7 Experimental Analysis 108-112 7.1 Basic experimental data 108-110 7.2 compiler security analysis 110-111 7.3 Summary 111-112 Chapter 8 Conclusion 112-115 References 115-124 pursue a degree during the academic catalog 124-125 of engaged during the PhD research projects 125-126 Acknowledgements 126

Related dissertations

  1. Research on Trustworthiness of Resource Adaptability for Internetware
    XiaZuo ·Anhui University of Engineering ·2013 ·Master's thesis
  2. Clocks Manipulation Applying to the Formal Verificationof Timed System
    GuiYaYun ·Shanghai University ·2013 ·Master's thesis
  3. Model Checking of FlexRay Communication Protocol
    GuoXiaoZuo ·Tianjin University ·2012 ·Master's thesis
  4. Research of Analysis Method in RBC Based on Model Checking
    SongHaiFeng ·Beijing Jiaotong University ·2014 ·Master's thesis
  5. Bread First Search Based Model Checking
  6. Research and Application on Key Technologies of Model Checking
    LiuZhiFeng ·Nanjing University ·2011 ·Doctoral dissertation
  7. Research on Safety Verification Techniques for Logic Control
    TianFengQi ·Northeastern University ·2010 ·Master's thesis
  8. The Research for State Reachability Relation of Uncertain Planning via Model Checking
    HuYuLong ·Xiangtan University ·2012 ·Master's thesis
  9. The Research of Effective Model Checking for Network Authentication Protocol
    TanZhiHua ·Hunan University ·2011 ·Master's thesis
  10. The Formal Modeling of Network Protocols and Discovery of Attacks Based on Model Checking
    MengGuoZhu ·Tianjin University ·2012 ·Master's thesis
  11. Research on Network Security Evalutation Technology Based on Attack Graph Model
    ChengYeXia ·Shanghai Jiaotong University ·2012 ·Master's thesis
  12. Formal model checking based authentication protocol
  13. The Improvement and Application of the PPTL Model Checker
  14. The Research on the Security of the RFID Mutal Authentication Protocol Base on EPC C1G2
    RongJiFang ·Hunan University ·2011 ·Master's thesis
  15. Toward Generating Optimization Actions of Twig Pattern
    LiuKe ·Beijing University of Technology ·2013 ·Master's thesis
  16. Process Calculus with Data Structure and Its Model Checking Algorithm
  17. Formal Modeling and Verification Research of Automatic Train Protection System
    XiongXiJiao ·East China Normal University ·2012 ·Master's thesis
  18. The Extension and Application of the Modeling,Simulation and Verification Tool
  19. Research on the Model Checking Algorithm Using Hadoop
    WeiGuang ·North China University of Technology ·2013 ·Master's thesis
  20. Research of Ada Program Model Checking Based on Program Slicing