Research on GCC Compiler Security Verification Methods

Author
YuJiaZi
Advisor
ChenGang
School
Zhejiang University
Major
Computer Science and Technology
Classification
TP314 Compiler,interpreter
Degree
Master's thesis
Year
2008
Downloads
165
Citations
2

Request the full text

Abstract

Compiler is one of the most important pieces of basic computer software in addition with operating system and database systems. They are the key infrastructures of computer system software. As the producer of all software, the security, reliability and stability attributes of compiler are very important. Especially in the situation of high confidential software environment, we must prove that the machine code which compiler produced is totally accordant with the source code without any insertion of malicious code in order to guarantee transparency and logical correctness of compiler behavior.This paper first reviewed all the recent research work in software verification area, especially in compiler verification, including formal method of verification, model check, object file logical comparison, analysis and discuss the advantage and disadvantage in both theory and practice of these method. This paper mainly focus on the question: does the compiler insert any malicious code or back door program into the output object file?We propose two compiler verification methods in this paper: compiler source code analysis and comparison method and control flow graph logical comparison method.In the first method, as in GCC, we try to classify all the functions in GCC source code into two categories: for those functions that will modify the input data and will affect the output result of the compiler, we label them as category one; For those functions that will not modify the input data and will not affect the output result of the compiler, we label them as category two.For category two, we are supposed to save all the input data before getting into the function, and then compare all the input data after function return with the data saved before. If they are identical, then we prove that the function is safe and will not affect the output result. For category one, we manually check these functions and re-implement all the function by an independent group of people, then we compare all the input data before and after function call with these two versions of the function implementation: the original one and the re-implemented. If they are identical, then we prove that the function is safe and will not affect the output result.In the second method, we try to compare the control flow graph of the source code and the output object file by the compiler. First, we use lex & yacc to extract the control flow graph of the source code, then we use a tool developed for this paper to extract the control flow graph of the object file, then we reduce the both graphs and use isomorphism algorithm to compare these two graphs. If they are isomorphism, then we prove that the compiler is safe.Finally, we propose a combination method of these two above. On one side, this will largely decrease the workload of compiler verification, on the other side, it also prove the completeness of compiler verification. The method we proposed in the paper can be widely used in other compiler.

Table of contents

Abstract 3-5 Abstract 5-10 Chapter 1 Introduction 10-17 1.1 Background 10-15 1.1.1 trusted software and software validation 11-12 1.1.2 static analysis and formal methods 12-13 1.1.3 dynamic analysis and software testing 13-15 1.2 research 15 1.3 to study target 1.4 paper is organized 15-16 1.5 This chapter Summary 16-17 Chapter 2 the compiler validation studies summarized 17-22 2.1 compiler secure authentication 17-19 2.2 compiler optimization validation 19 2.3 compile results runtime guarantee 19-21 2.4 This chapter Summary 21-22 Chapter 3 the compiler code analysis and protection compared verify 22-37 3.1 Introduction 22 3.2 overall program description 22-28 3.2.1 basic idea 23-24 3.2.2 implementation steps 24-26 3.2.3 participation in staff roles and constraints 26-27 3.2.4 Additional Notes 27-28 3.3 implementation instance 28-34 3.3.1 the cyclic code unswitching optimize the security authentication 28-34 3.4 workload estimated 34-36 3.5 This chapter Summary 36-37 Chapter 4 of the control flow logic structure contrast verification 37-65 4.1 Introduction 37-38 4.2 control flow graph 38-42 4.2.1 control flow graph structure 38-41 4.2.2 ISOMORPHIC 41-42 4.3 C language source code control flow graph production 42-51 4.3.1 Lex Yacc 43-44 4.3.2 conditions judgment statement 44-46 4.3.3 loop statement 46-50 4.3.4 function call 50-51 4.4 object code control flow graph production 51-54 4.5 control flow graph simplify isomorphism 54-57 4.5.1 Control Flow Graph simplify 54-55 4.5.2 Control Flow Graph isomorphism 55-57 4.6 Experimental assessment test 57-64 4.6.1 Control Flow Graph experimental use cases 57-60 4.6.2 malicious code embedded 60 4.6.3 malicious code embedding experiment 60-63 4.6.4 true test cases 63-64 4.7 This chapter Summary 64-65 Chapter 5 Summary and Outlook 65-67 5.1 this article to complete the research work 65 5.2 of this paper the main contribution to innovation 65-66 5.3 further research work 66-67 Appendix 67-81 C language lexical rules 67-71 C language syntax rules 71-81 the References 81-86 Acknowledgements 86

Related dissertations

  1. The Study on Formal Modeling and Verification of High-speed Railway Train Control System
    CaoYuan ·Beijing Jiaotong University ·2011 ·Doctoral dissertation
  2. Research on Collaborative Optimization of city group logistics base and multi task
  3. Method of Verifying3D Object Authenticity Based on Spin Image
    WeiChunZi ·Northeastern University ·2013 ·Master's thesis
  4. Research on C/S Architectural Style Based on XYZ/SE
    LiuManXia ·Hunan University ·2013 ·Master's thesis
  5. Design and Implementation of Measuirng Instrument Detection System Based on ASP.NET
    ZhuLi ·Hunan University ·2013 ·Master's thesis
  6. A Study of Static Malicious Code Detection Method Based on Opcode Sequneces
    LuZhanJun ·Harbin Institute of Technology ·2013 ·Master's thesis
  7. The Design and Verification of Configurable Host Port Interface on DSP64X
  8. The Design and Implementation of PCI Port for YHFT-DSPX
  9. Structure a Reference Module of ISO14443Communication Interface in VMM Verification Platform
  10. An SER Estimation-based Automatic Logic Synthesis Method for FPGAs and Verification
    XiaJing ·Hunan University ·2013 ·Master's thesis
  11. The Design and Verification of DFT Integration of High Speed Interface IP Cores for High Performance CPU
  12. Verification of AMBAIO System Based on SoC
  13. The Design and Implementation of the FPGA Based Verification and Testing Platform of NoC
  14. Functional Verification of YHFT-DX High Performance DSP
  15. The Verification of USIM Core Based on Specman
  16. Design and Implementation of Floating Arithmetic Unit in FT-Matrix DSP
  17. The Verification of EECTRL Based on VMM and the Analysis of Coverage Report
  18. OPC Optimization Design Method Based on Nanoscale Technology Standard Cells
  19. A Research on Enlarging Vocabulary of Male Students in Rural Senior High School English Teaching from the Perspective of Task-based Language Teaching Model
    ZhouYan ·Hunan Normal University ·2014 ·Master's thesis
  20. On the Development of the Creativity of Postgraduates
    LuChenLiang ·Xiangtan University ·2013 ·Master's thesis