DOI QR코드

DOI QR Code

효과적인 내장형 소프트웨어의 정수 확장 (Integer Promotion) 버그 검출 기법

Effective Integer Promotion Bug Detection Technique for Embedded Software

  • 투고 : 2016.02.19
  • 심사 : 2016.04.11
  • 발행 : 2016.06.15

초록

세탁기, 냉장고 등의 가전제품에 탑재되는 8-bit MCU용 C 컴파일러는 소프트웨어 실행 속도를 높이기 위해 표준 C 언어 규칙을 따르지 않고 컴파일을 수행할 수 있다. 개발자가 일반 C 컴파일러와 8-bit MCU용 C 컴파일러의 차이를 정확하게 이해하지 못할 경우 표준 C 언어 환경에서는 발생하지 않으나 8-bit MCU를 사용하는 내장형 시스템에서는 발생하는 버그를 야기할 수 있으며 이런 버그는 표준 C언어 환경을 가정하는 버그 검출 도구로는 찾기 어렵다. 본 논문에서는 표준 C 정수 확장 규칙을 따르지 않는 8-bit MCU용 컴파일러를 사용할 때 발생하는 정수 확장 버그를 소개하고 정수 확장 버그를 탐지하기 위한 다섯 종류의 버그 패턴을 제안한다. 정수 확장 버그 패턴 검출 도구를 개발하여 LG전자 세탁기 소프트웨어를 분석한 결과 컴파일러 옵션을 잘못 선택한 경우 발생하는 27개의 정수 확장 버그를 발견하였다.

C compilers for 8-bit MCUs used in washing machines and refrigerators often do not follow the C standard to improve runtime performance. Developers who are unaware of the difference between C compilers following the C standard and the C compilers for 8-bit MCU can cause bugs that do not appear in the standard C environment but appear in the embedded systems using 8-bit MCUs. It is difficult for bug detectors that assume the standard C environment to detect such bugs. In this paper, we introduce integer promotion bugs caused by the different integer promotion rules of the C compilers for 8-bit MCU from the C standard and propose 5 bug patterns where the integer promotion bugs occur. We have developed an integer promotion bug detection tool and applied it to the washing machine control software developed by the LG electronics. The integer promotion bug detection tool successfully detected 27 integer promotion bugs in the washing machine control software.

키워드

과제정보

연구 과제 주관 기관 : 한국연구재단, 정보통신기술진흥센터

참고문헌

  1. C. Elbert and C. Jones, "Embedded software: facts, figures, and future," IEEE Computer, Vol. 42, No. 4, pp. 42-52, Apr. 2009.
  2. I. Fredriksen, "Choosing a MCU for your next design; 8 bit or 32 bit?," Atmel Corp., 2014.
  3. Clang/LLVM. [Online]. Available: http://llvm.org.
  4. D. Brumley, T. Chiueh, R. Johnson, H. Lin, and D. Song, "RICH: Automatically protecting against integerbased vulnerabilities," Proc. of the Symposium on Network and Distributed Systems Security, 2007.
  5. W. Dietz, P. Li, J. Regehr, and V. Adve, "Understanding integer overflow in C/C++," ACM Transactions on Software Engineering and Methodology, Vol. 25, No. 1, pp. 2:1-2:20, 2015.
  6. P. Chen, Y. Wang, Z. Xin, B. Mao, and L. Xie, "BRICK: A binary tool for run-time detecting and locating integer-based vulnerability," Proc. of the International Conference on Availability, Reliability and Security, pp. 208-215, 2009.
  7. D. Molnar, X. Li, and D. Wagner, "Dynamic test generation to find integer bugs in x86 binary Linux programs," Proc. of the USENIX Security Symposium, pp. 67-82, 2009.
  8. N. Nethercote and J. Seward, "Valgrind: A program supervision framework," Proc. of the Workshop on Runtime Verification, 2003.
  9. R. Rodrigues, V. Campos, and F. Pereira, "A fast and low-overhead technique to secure programs against integer overflows," Proc. of the IEEE/ACM International Symposium on Code Generation and Optimization, pp. 1-11, 2013.
  10. Y. Kim, M. Kim, and Y. Jang, "CREST-BV: An improved concolic testing technique supporting bitwise operations for embedded software," Journal of KIISE: Software and Applications, Vol. 40, No. 2, pp. 90-98, 2013. (in Korean)
  11. Y. Kim, Y. Kim, T. Kim, G. Lee, Y. Jang, and M. Kim, "Automated unit testing of large industrial embedded software using concolic testing," Proc. of the IEEE/ACM Automated Software Engineering Experience track, pp. 519-528, Nov. 2013.