DOI QR코드

DOI QR Code

Detection of Potential Memory Access Errors based on Assembly Codes

어셈블리어 코드 기반의 메모리 오류 가능성 검출

  • 김현수 (금오공과대학교 소프트웨어공학과) ;
  • 김병만 (금오공과대학교 컴퓨터공학부) ;
  • 배현섭 (슈어소프트테크(주)) ;
  • 정인상 (한성대학교 컴퓨터공학과)
  • Received : 2010.06.21
  • Accepted : 2010.09.18
  • Published : 2011.02.28

Abstract

Memory errors can cause not only program malfunctions but also even unexpected system halt. Though a programmer checks memory errors, some memory errors with low occurrence frequency are missed to detect. In this paper, we propose a method for effectively detecting such memory errors using instruction transition diagrams through analyzing assembly codes obtained by disassembling an executable file. Out of various memory errors, local memory return errors, null pointer access errors and uninitialized pointer access errors are targeted for detection. When applying the proposed method to various programs including well-known open source programs such as Apache web server and PHP script interpreter, some potential memory errors are detected.

메모리 사용에 관련한 오류는 해당 프로그램뿐 아니라 시스템의 오작동을 유발할 수 있다. 특히 발생 빈도가 매우 낮은 일부 메모리 오류의 경우 제대로 된 동작 테스트를 할 수 없어, 오류에 대한 파악 및 수정이 힘들다. 이에 본 논문에서는 실행 프로그램을 역어셈블(Dis-Assemble)하여 만들어진 어셈블리어 코드를 구문 분석하여 명령어 전이도를 도출하고 이에 기반을 두어 메모리 사용 오류 가능성을 검출하는 방법을 제안하였다. 몇 가지 프로그램을 검사대상으로 선정하여 Local Memory Return Error, Null Pointer Access Error, Uninitialized Pointer Access Error를 검출하였으며 그 중 오픈 소스 프로젝트(Open Source Project)인 아파치 웹 서버와 PHP 스크립트 해석기에서도 메모리 사용 오류의 가능성이 있는 코드가 검출되었다.

Keywords

References

  1. 정영범, 김재황, 신재호, 이광근, “아이락: C 프로그램의 메모리 오류 정적 분석기", 한국정보과학회 2005 가을 학술발표대회문집 32(2), pp. 964-966 2005.11
  2. SureSoftTech, "TEST Monitor", http://suresofttech.com, 2007.
  3. J. Seward, N. Nethercote, "Valgrind", http://www.valgrind.org, 2000.
  4. Jason D. Hiser, Clark L. Coleman, Michele Co and Jack W. Davison, "MEDS: The Memory Error Detection System", Engineering Secure Software and Systems, LNCS 5429, pp 164-179, 2009. https://doi.org/10.1007/978-3-642-00199-4_14
  5. Patrick Cousot and Radhia Cousot, "Abstract interpretation: a unied lattice model for static analysis of programs by construction or approximation of xpoints", Proceedings of ACM Symposium on Principles of Programming Languages, pp 238-252, 1977.
  6. Kevin Scott and Jack Davidson, “Strata: A Software Dynamic Translation Infrastructure”, In Proceedings of the Workshop on Binary Translation (WBT '01), Barcelona, Spain, September 2001.
  7. Apache Web Server, "http://httpd.apache.org", 1995.
  8. PHP Scripting Language, "http://www.php.net", 1995.