KR102097672B1 - Program bug development operand decision apparatus and method thereof - Google Patents

Program bug development operand decision apparatus and method thereof Download PDF

Info

Publication number
KR102097672B1
KR102097672B1 KR1020180050006A KR20180050006A KR102097672B1 KR 102097672 B1 KR102097672 B1 KR 102097672B1 KR 1020180050006 A KR1020180050006 A KR 1020180050006A KR 20180050006 A KR20180050006 A KR 20180050006A KR 102097672 B1 KR102097672 B1 KR 102097672B1
Authority
KR
South Korea
Prior art keywords
bug
program
factor
instruction
determining
Prior art date
Application number
KR1020180050006A
Other languages
Korean (ko)
Other versions
KR20190125774A (en
Inventor
권태경
조민기
Original Assignee
연세대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 연세대학교 산학협력단 filed Critical 연세대학교 산학협력단
Priority to KR1020180050006A priority Critical patent/KR102097672B1/en
Publication of KR20190125774A publication Critical patent/KR20190125774A/en
Application granted granted Critical
Publication of KR102097672B1 publication Critical patent/KR102097672B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/366Software debugging using diagnostics

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

프로그램 버그 발생 인자 결정 장치 및 방법이 개시된다. 본 발명의 프로그램 버그 버그 발생 인자 결정 방법은 프로그램 버그와 관련된 입력 데이터가 미리 설정된 프로그램이 실행됨에 따라 프로그램 버그와 관련된 인자를 포함하면서 명령어를 실행시키는 코드가 포함된 코드 라인이 포함된 실행기록을 저장하는 단계, 실행기록에 포함된 코드 라인에 포함된 메모리 상의 주소 정보가 서로 인접한 코드 라인들을 포함하는 버그 인자 결정 필드를 결정하는 단계, 및 버그 인자 결정 필드에 포함된 코드 라인 각각에 포함된 명령어의 속성을 고려하여 프로그램의 버그 발생과 관련된 버그 발생 인자를 결정하는 단계를 포함한다.Disclosed is an apparatus and method for determining a program bug generation factor. The method for determining a bug occurrence factor of a program bug according to the present invention stores an execution record including a code line including code for executing a command while including a parameter related to a program bug as the input data related to the program bug is executed in advance. Determining a bug factor determination field including code lines in which address information in memory included in the code line included in the execution record is adjacent to each other, and instructions included in each code line included in the bug factor determination field. It includes the step of determining the bug occurrence factor related to the bug occurrence of the program by considering the properties.

Description

프로그램 버그 발생 인자 결정 장치 및 그 방법 {PROGRAM BUG DEVELOPMENT OPERAND DECISION APPARATUS AND METHOD THEREOF}DEVELOPMENT DEVELOPMENT DEVELOPMENT DEVICE AND METHOD FOR PROGRAM {PROGRAM BUG DEVELOPMENT OPERAND DECISION APPARATUS AND METHOD THEREOF}

본 발명은 프로그램 버그 발생 인자 결정 장치 및 그 방법에 관한 것이다. 보다 상세하게는, 본 발명은 명령어 속성을 고려하여 프로그램의 버그 발생과 관련된 프로그램 버그 발생 인자를 결정하는 프로그램 버그 발생 인자 결정 장치 및 그 방법에 관한 것이다.The present invention relates to an apparatus and method for determining a program bug generation factor. More specifically, the present invention relates to an apparatus and method for determining a program bug occurrence factor for determining a program bug occurrence factor related to a bug occurrence of a program in consideration of an instruction attribute.

정보 가전, 휴대 전화 등, 소위 내장 기기로 불리는 정보 처리 기기에서 소프트웨어 규모가 증대하고 있다. 네트워크 대응을 위한 기능 추가, 유저 요구의 증대 등에 의해, 소프트웨어를 이용하여 단기간에 많은 새 기능을 실현하는 것이 요구되고 있다. 이와 같은 소프트웨어 규모의 증대에 수반하여, 소프트웨어의 품질확보가 요구되고 있으며, 이에 따라 발생되는 버그(Bug)에 대한 대응책도 요구되고 있다.The size of software is increasing in information processing devices called so-called built-in devices, such as information appliances and mobile phones. It is required to realize many new functions in a short period of time using software by adding functions for network response, increasing user demand, and the like. With the increase in the size of the software, it is required to secure the quality of the software, and a countermeasure against a bug generated accordingly is also required.

프로그램의 소스 코드나 설계 과정에서의 실수와 오류 때문에 발생되는 버그의 결과로 다양한 문제가 발생될 수 있다. 버그는 프로그램의 실행을 중단시키거나 프로그램을 강제 종료 시키는 문제를 일으킬 수 있다. 또한, 버그는 보안 문제를 발생시킬 수도 있다. 예를 들면 악의적인 사용자는 자주 발생하는 버그인 버퍼 오버플로(Buffer Overflow)를 사용할 수 있다. 버퍼 오버플로는 메모리에 할당된 버퍼의 양을 초과하는 데이터가 프로그램에 입력되면서 프로그램의 복귀 주소(return address)가 조작되는 상황을 나타낸다. 따라서, 악의적인 사용자는 버퍼 오버플로를 사용하여 보안 문제를 발생시킬 수 있는 코드를 실행할 수 있다.Various problems can occur as a result of bugs caused by mistakes and errors in the source code or design process of a program. Bugs can cause the program to stop running or force the program to terminate. Also, bugs can cause security problems. For example, a malicious user can use the buffer overflow, a common bug. A buffer overflow indicates a situation in which a program's return address is manipulated while data exceeding the amount of the buffer allocated to memory is input to the program. Thus, a malicious user could use a buffer overflow to execute code that could cause security problems.

프로그램의 버그 탐지를 위한 방법으로 기호 실행 분석을 이용한 탐지 방법이 있다. 기호 실행은 프로그램 단위 내의 입력 변수에 문자 값 대신 기호 값을 할당시키는 실행 방법으로 종래의 기호 실행을 사용하여 프로그램의 버그를 탐지하는 방법들은 소프트웨어의 실행 경로를 확장하는 데에 사용한다. 소프트웨어의 실행 경로 확장은 소프트웨어의 논리 또는 데이터에 기반하여 컴퓨터가 작업을 처리할 때 취하는 경로나 과정이 확장되는 것을 나타낸다.As a method for detecting a bug in a program, there is a detection method using symbol execution analysis. Symbol execution is an execution method that assigns a symbol value instead of a character value to an input variable in a program unit. Conventional symbol execution methods to detect bugs in a program are used to expand the execution path of software. Expansion of the execution path of software refers to expansion of a path or process taken by a computer when processing a task based on software logic or data.

그러나 종래의 기호 실행을 사용하는 방법은 새로운 실행 경로에 존재하는 버그 중 특정한 입력한 값에 의해 발생하는 버그를 탐지하지 못한다는 문제가 있다.However, the method using the conventional symbol execution has a problem in that it cannot detect a bug caused by a specific input value among bugs existing in a new execution path.

또한, 기호 실행 분석은 실행 속도가 느리기 때문에 확장성이 낮은 문제가 있으며, 프로그램이 커질수록 분기문의 수가 많아지기 때문에 프로그램의 버그가 발생되는 부분에서는 프로그램이 실행되지 못하는 문제가 있다. In addition, the symbol execution analysis has a problem of low scalability because the execution speed is slow, and as the number of branches increases, the number of branch statements increases.

이에 따라, 종래의 기호 실행을 사용하여 버그를 탐지하는 방법 이외에 프로그램 버그를 탐지하여 버그 문제를 해결하기 위한 기술의 필요성이 대두되고 있다.Accordingly, there is a need for a technique for detecting a program bug and solving a bug problem in addition to a method of detecting a bug using conventional symbol execution.

본 발명은 상술한 문제점을 해결하기 위한 것으로, 오염 인자를 포함하는 명령어의 속성을 고려하여 프로그램 버그 발생과 관련된 프로그램 버그 발생 인자를 결정하는 프로그램 버그 발생 인자 결정 장치 및 그 방법을 제공함에 있다.The present invention is to solve the above-mentioned problems, and provides an apparatus and method for determining a program bug occurrence factor for determining a program bug occurrence factor related to a program bug occurrence in consideration of an attribute of an instruction including a pollution factor.

상술한 목적을 달성하기 위한 본 발명의 일 실시 예에 따른 프로그램 버그 발생 인자 결정 방법은 프로그램 버그와 관련된 입력 데이터가 미리 설정된 프로그램이 실행됨에 따라 프로그램 버그와 관련된 인자를 포함하면서 명령어를 실행시키는 코드가 포함된 코드 라인이 포함된 실행기록을 저장하는 단계; 상기 실행기록에 포함된 코드 라인에 포함된 메모리 상의 주소 정보가 서로 인접한 코드 라인들을 포함하는 버그 인자 결정 필드를 결정하는 단계; 및 상기 버그 인자 결정 필드에 포함된 코드 라인 각각에 포함된 명령어의 속성을 고려하여 상기 프로그램의 버그 발생과 관련된 버그 발생 인자를 결정하는 단계;를 포함할 수 있다.The method for determining a program bug generation factor according to an embodiment of the present invention for achieving the above object includes a code for executing a command while including a parameter related to a program bug as input data related to the program bug is executed in advance. Storing an execution record including an included code line; Determining a bug factor determination field including code lines in which address information on a memory included in a code line included in the execution record includes code lines adjacent to each other; And determining a bug occurrence factor related to a bug occurrence of the program in consideration of an attribute of an instruction included in each code line included in the bug factor determination field.

상기 버그 인자 결정 필드를 결정하는 단계는, 상기 실행기록에 포함된 코드 라인에 포함된 명령어를 실행시키는데 사용된 상기 입력 데이터가 기록된 주소를 나타내는 입력 데이터 오프셋이 연속으로 이어진 코드 라인을 포함하는 버그 인자 결정 필드를 결정할 수 있다.The determining of the bug factor determination field may include a bug in which the input data offset representing the address in which the input data used to execute the instruction included in the code line included in the execution record is continuously recorded is an input data offset. The factor determination field can be determined.

상기 버그 인자 결정 필드는 상기 프로그램의 버그 발생과 관련된 버그 발생 인자의 주소 정보를 포함할 수 있다.The bug factor determination field may include address information of a bug occurrence factor related to a bug occurrence of the program.

상기 명령어의 속성이 산술 명령어이고, 상기 버그 발생 인자를 결정하는 단계는 상기 산술 명령어의 결과 값이 기 설정된 경계 값을 초과하도록 상기 입력 데이터의 값을 변경시켜 상기 프로그램의 버그를 발생시키는 버그 발생 인자를 결정할 수 있다.The attribute of the instruction is an arithmetic instruction, and the step of determining the bug occurrence factor is a bug occurrence factor that causes a bug in the program by changing the value of the input data such that a result value of the arithmetic instruction exceeds a preset boundary value. Can decide.

상기 버그 발생 인자를 결정하는 단계는 상기 산술 명령어 실행을 역으로 분석하여 상기 산술 명령어의 계산이 기호로 변환된 방정식을 생성하고, 상기 생성된 방정식으로부터 상기 산술 명령어의 결과 값이 기 설정된 경계 값을 초과하도록 만드는 인자의 값을 산출하여 상기 프로그램의 버그를 발생시키는 버그 발생 인자를 결정할 수 있다.The determining of the bug generation factor generates an equation in which the calculation of the arithmetic command is converted into a symbol by inversely analyzing the execution of the arithmetic command, and a boundary value in which a result value of the arithmetic command is preset from the generated equation. A bug generating factor that causes a bug in the program may be determined by calculating a value of the factor that makes it exceed.

상기 명령어의 속성이 비교 명령어이고, 상기 버그 발생 인자를 결정하는 단계는 상기 버그 인자 결정 필드에 포함된 코드 라인에 포함된 상기 비교 명령어에 사용되며 상기 프로그램 버그와 관련된 인자에 해당하는 제1 인자와 상기 입력 데이터를 비교하여 상기 프로그램의 실행 경로를 확장시키는 프로그램 실행 경로 확장 인자를 결정하는 단계; 및 상기 프로그램 실행 경로 확장 인자를 이용하여 상기 프로그램의 버그 발생과 관련된 버그 발생 인자를 결정하는 단계;를 포함할 수 있다.The attribute of the instruction is a comparison instruction, and the step of determining the bug occurrence factor is used for the comparison instruction included in the code line included in the bug factor determination field and a first factor corresponding to the program bug related factor and Comparing the input data to determine a program execution path extension factor that expands the execution path of the program; And determining a bug occurrence factor related to a bug occurrence of the program using the program execution path extension factor.

상기 프로그램 실행 경로 확장과 관련된 인자를 결정하는 단계는, 상기 제1 인자와 상기 입력 데이터가 동일한 경우, 상기 비교 명령어에 사용되며 상기 프로그램 버그와 관련된 인자 이외의 인자에 해당하는 제2 인자를 상기 프로그램 실행 경로 확장과 관련된 인자로 결정하고, 상기 결정된 제2 인자를 상기 프로그램의 입력으로 하여 상기 프로그램 실행 경로 확장 여부를 테스트하여 상기 프로그램 실행 경로 확장 인자를 결정하고, 상기 제1 인자와 상기 입력 데이터가 다른 경우, 상기 프로그램의 실행 경로를 역으로 분석하여 상기 비교 명령어가 실행된 위치에서 상기 비교 명령어의 결과에 따라 분기된 곳에서 실행된 상기 프로그램의 실행 경로와 다른 실행 경로를 실행시키는 제3 인자를 상기 프로그램 실행 경로 확장 인자로 결정할 수 있다.The determining of the parameters related to the program execution path extension may include: when the first parameter and the input data are the same, the second parameter used for the comparison command and corresponding to a factor other than the parameter related to the program bug is the program. Determine the execution path extension factor, determine the program execution path extension factor by testing whether the program execution path extension is performed using the determined second factor as an input of the program, and determine the first execution parameter and the input data. In other cases, a third parameter that analyzes an execution path of the program in reverse to execute a different execution path from the execution path of the program executed in a branched location according to the result of the comparison instruction at a location where the comparison instruction was executed It can be determined by the program execution path extension factor.

상기 버그 발생 인자를 결정하는 단계는 상기 프로그램 실행 경로 확장 인자를 상기 프로그램 버그와 관련된 데이터로 변환하고, 상기 변환된 데이터를 상기 프로그램의 입력으로 이용하여 전체 과정을 반복하면서 상기 프로그램의 버그 발생과 관련된 버그 발생 인자를 결정할 수 있다.The determining of the bug occurrence factor converts the program execution path extension factor into data related to the program bug, and repeats the entire process using the converted data as the input of the program, while relating to the bug occurrence of the program. It is possible to determine the cause of the bug.

상기 명령어의 속성이 비교 명령어 및 산술 명령어 이외의 명령어이고, 상기 버그 발생 인자를 결정하는 단계는 상기 버그 인자 결정 필드에 포함되며 상기 코드 라인과 다른 코드 라인에 포함된 명령어 속성을 고려하여 상기 프로그램의 버그 발생과 관련된 버그 발생 인자를 결정할 수 있다.The attribute of the instruction is an instruction other than a comparison instruction and an arithmetic instruction, and the step of determining the bug generation factor is included in the bug factor determination field and considering the instruction attribute included in the code line and another code line, You can determine the bug occurrence factor related to the bug occurrence.

상술한 목적을 달성하기 위한 본 발명의 일 실시 예에 따른 프로그램 버그 발생 인자 결정 장치는 프로그램 버그와 관련된 입력 데이터가 미리 설정된 프로그램이 실행됨에 따라 프로그램 버그와 관련된 인자를 포함하면서 명령어를 실행시키는 코드가 포함된 코드 라인을 포함하는 실행기록을 저장하는 메모리부; 및 상기 실행기록에 포함된 코드 라인에 포함된 메모리 상의 주소 정보가 서로 인접한 코드 라인들을 포함하는 버그 인자 결정 필드를 결정하고, 상기 버그 인자 결정 필드에 포함된 코드 라인 각각에 포함된 명령어의 속성을 고려하여 상기 프로그램의 버그 발생과 관련된 버그 발생 인자를 결정할 수 있다.The apparatus for determining a program bug generation factor according to an embodiment of the present invention for achieving the above object includes code for executing an instruction while including a parameter related to a program bug as input data related to the program bug is executed in advance. A memory unit for storing an execution record including an included code line; And a bug factor determination field including code lines adjacent to each other in address information in the memory included in the code line included in the execution record, and determining an attribute of an instruction included in each code line included in the bug factor determination field. Considering this, it is possible to determine a bug occurrence factor related to a bug occurrence of the program.

상기 분석부는 상기 실행기록에 포함된 코드 라인에 포함된 명령어를 실행시키는데 사용된 상기 입력 데이터가 기록된 주소를 나타내는 입력 데이터 오프셋이 연속으로 이어진 코드 라인을 포함하는 버그 인자 결정 필드를 결정할 수 있다.The analysis unit may determine a bug factor determination field including a code line in which an input data offset representing an address in which the input data is used to execute an instruction included in the code line included in the execution record is continuously connected.

상기 명령어의 속성이 산술 명령어이고, 상기 분석부는 상기 산술 명령어의 결과 값이 기 설정된 경계 값을 초과하도록 상기 입력 데이터의 값을 변경시켜 상기 프로그램의 버그를 발생시키는 버그 발생 인자를 결정할 수 있다.The attribute of the instruction is an arithmetic instruction, and the analysis unit may determine a bug generation factor that causes a bug in the program by changing the value of the input data such that a result value of the arithmetic instruction exceeds a preset boundary value.

상기 명령어의 속성이 비교 명령어이고, 상기 분석부는 상기 버그 인자 결정 필드에 포함된 코드 라인에 포함된 상기 비교 명령어에 사용되며 상기 프로그램 버그와 관련된 인자에 해당하는 제1 인자와 상기 입력 데이터를 비교하여 상기 프로그램의 실행 경로를 확장시키는 프로그램 실행 경로 확장 인자를 결정하고, 상기 결정된 프로그램 실행 경로 확장 인자를 이용하여 상기 프로그램의 버그 발생과 관련된 버그 발생 인자를 결정할 수 있다.The attribute of the instruction is a comparison instruction, and the analysis unit compares the input data with a first parameter corresponding to an argument related to the program bug, which is used in the comparison instruction included in a code line included in the bug factor determination field. A program execution path extension factor for extending the execution path of the program may be determined, and a bug occurrence factor related to a bug occurrence of the program may be determined using the determined program execution path extension factor.

상기 분석부는 상기 프로그램 실행 경로 확장 인자를 상기 프로그램 버그와 관련된 데이터로 변환하고, 상기 변환된 데이터를 상기 프로그램의 입력으로 이용하여 전체 과정을 반복하면서 상기 버그 발생 인자를 결정할 수 있다.The analysis unit may convert the program execution path extension factor into data related to the program bug, and determine the bug occurrence factor by repeating the entire process using the converted data as the input of the program.

상기 명령어의 속성이 비교 명령어 및 산술 명령어 이외의 명령어이고, 상기 분석부는 상기 버그 인자 결정 필드에 포함되며 상기 코드 라인과 다른 코드 라인에 포함된 명령어 속성을 고려하여 상기 프로그램의 버그 발생과 관련된 버그 발생 인자를 결정할 수 있다.The property of the instruction is an instruction other than a comparison instruction and an arithmetic instruction, and the analysis unit includes a bug related to the occurrence of a bug in the program in consideration of an instruction attribute included in the bug factor determination field and included in the code line and another code line Factors can be determined.

상술한 목적을 달성하기 위한 본 발명의 일 실시 예에 따른 프로그램의 버그를 발생시키는 발생 인자를 결정하는 방법이 컴퓨터에서 실행시키기 위한 컴퓨터 판독 가능 매체에 저장된 컴퓨터 프로그램을 제공할 수 있다.A method of determining an occurrence factor that causes a bug in a program according to an embodiment of the present invention to achieve the above object may provide a computer program stored in a computer readable medium for execution on a computer.

이상과 같은 본 발명의 실시 예에 따라 프로그램 버그 발생 인자를 결정하는 경우 실행 속도가 향상될 수 있고, 프로그램 버그를 탐지할 때 사용되는 메모리가 감소될 수 있다.When the program bug generation factor is determined according to the embodiment of the present invention as described above, execution speed may be improved, and memory used when detecting a program bug may be reduced.

또한, 본 발명의 실시 예에 따라 프로그램 버그 발생 인자를 결정하는 경우 반복문의 조건 검사가 이루어지는 값을 비교하여 새로운 경로를 찾으므로 경로 폭발 문제가 완화될 수 있다.In addition, if the program bug generation factor is determined according to an embodiment of the present invention, a path explosive problem may be alleviated because a new path is found by comparing the value of the conditional check of the loop.

또한, 본 발명의 실시 예에 따라 프로그램 버그를 발생 인자를 결정하는 경우 프로그램이 표현할 수 있는 범위를 넘어서는 값이 구해지므로 프로그램의 버그가 특정한 값에 의해 유발되는 경우에도 탐지될 수 있고, 이에 대해 대응이 가능하므로 프로그램이 비 정상적인 동작을 일으키거나 강제로 종료되는 현상 또한 방지할 수 있다.In addition, when determining an occurrence factor of a program bug according to an embodiment of the present invention, a value exceeding a range that can be expressed by the program is obtained, so that even when a bug of the program is caused by a specific value, it can be detected, and coping with it Since this is possible, it is also possible to prevent the phenomenon that the program causes abnormal operation or is forcibly terminated.

본 발명의 효과들은 이상에서 언급한 효과들로 제한되지 않으며, 언급되지 않은 또 다른 효과들은 아래의 기재로부터 통상의 기술자에게 명확하게 이해 될 수 있을 것이다.The effects of the present invention are not limited to the above-mentioned effects, and other effects not mentioned will be clearly understood by those skilled in the art from the following description.

도 1은 본 발명의 일 실시 예에 따른 프로그램 버그 발생 인자 결정 장치의 구성을 개략적으로 도시한 블록도이다.
도 2는 본 발명의 일 실시 예에 따른 프로그램 버그 발생 인자 결정 방법을 설명하기 위한 흐름도이다.
도 3은 본 발명의 또 다른 일 실시 예에 따른 프로그램 버그 발생 인자 및 프로그램 실행 경로 확장과 관련된 인자 결정 방법을 구체적으로 설명하기 위한 흐름도이다.
도 4는 본 발명의 일 실시 예에 따른 프로그램 실행기록을 나타낸 것이다.
도 5는 본 발명의 일 실시 예에 따라 버그 인자 결정 필드 별로 정리된 코드 라인을 나타낸 것이다.
도 6은 본 발명의 일 실시 예에 따른 프로그램 출력 결과를 나타낸 것이다.
1 is a block diagram schematically showing the configuration of a device for determining a program bug generation factor according to an embodiment of the present invention.
2 is a flowchart illustrating a method of determining a program bug generation factor according to an embodiment of the present invention.
3 is a flowchart illustrating in detail a method for determining a parameter related to a program bug occurrence factor and a program execution path extension according to another embodiment of the present invention.
4 shows a program execution record according to an embodiment of the present invention.
5 illustrates code lines organized for each bug factor determination field according to an embodiment of the present invention.
6 illustrates a program output result according to an embodiment of the present invention.

이하, 첨부된 도면을 참조하여 본 발명의 실시 예를 상세히 설명한다. 본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시 예들을 참조하면 명확해질 것이다. 그러나 본 발명은 이하에서 게시되는 실시 예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 수 있으며, 단지 본 실시 예들은 본 발명의 게시가 완전하도록 하고, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 발명은 청구항의 범주에 의해 정의될 뿐이다. 명세서 전체에 걸쳐 동일 참조 부호는 동일 구성 요소를 지칭한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. Advantages and features of the present invention, and methods for achieving them will be clarified with reference to embodiments described below in detail together with the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below, but may be implemented in various different forms, and only the embodiments allow the publication of the present invention to be complete, and general knowledge in the technical field to which the present invention pertains. It is provided to fully inform the holder of the scope of the invention, and the invention is only defined by the scope of the claims. The same reference numerals refer to the same components throughout the specification.

다른 정의가 없다면, 본 명세서에서 사용되는 모든 용어(기술 및 과학적 용어를 포함)는 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 공통적으로 이해될 수 있는 의미로 사용될 수 있을 것이다. 또 일반적으로 사용되는 사전에 정의되어 있는 용어들은 명백하게 특별히 정의되어 있지 않는 한 이상적으로 또는 과도하게 해석되지 않는다.Unless otherwise defined, all terms (including technical and scientific terms) used in the present specification may be used as meanings commonly understood by those skilled in the art to which the present invention pertains. In addition, terms defined in the commonly used dictionary are not ideally or excessively interpreted unless specifically defined.

본 명세서에서 어떤 구성요소가 다른 구성요소에 "연결되어"있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결될 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어"있다고 언급된 때에는 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다. 한편, 구성요소들 간의 관계를 설명하는 다른 표현들, 즉 "~사이에"와 "바로 ~사이에" 또는 "~에 이웃하는"과 "~에 직접 이웃하는" 등도 마찬가지로 해석되어야 한다.When a component is referred to as being "connected" to another component in this specification, it should be understood that other components may be present in the middle, although it may be directly connected to the other component. On the other hand, when a component is said to be "directly connected" to another component, it should be understood that no other component exists in the middle. On the other hand, other expressions describing the relationship between the components, that is, "between" and "immediately between" or "adjacent to" and "directly neighboring to" should be interpreted similarly.

본 명세서에서 "제1", "제2" 등의 용어는 하나의 구성요소를 다른 구성요소로부터 구별하기 위한 것으로, 이들 용어들에 의해 권리범위가 한정되어서는 아니 된다. 예를 들어, 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다.In the present specification, terms such as “first” and “second” are for distinguishing one component from other components, and the scope of rights should not be limited by these terms. For example, the first component may be referred to as the second component, and similarly, the second component may also be referred to as the first component.

본 명세서에서 각 단계들에 있어 식별부호(예를 들어, a, b, c 등)는 설명의 편의를 위하여 사용되는 것으로 식별부호는 각 단계들의 순서를 설명하는 것이 아니며, 각 단계들은 문맥상 명백하게 특정 순서를 기재하지 않는 이상 명기된 순서와 다르게 일어날 수 있다. 즉, 각 단계들은 명기된 순서와 동일하게 일어날 수도 있고 실질적으로 동시에 수행될 수도 있으며 반대의 순서대로 수행될 수도 있다.In this specification, the identification numbers (for example, a, b, c, etc.) in each step are used for convenience of description, and the identification numbers do not describe the order of each step, and each step is clearly in context. It may occur differently from the order specified unless a specific order is specified. That is, each step may occur in the same order as specified, may be performed substantially simultaneously, or may be performed in the reverse order.

본 명세서에서, “가진다”, “가질 수 있다”, “포함한다” 또는 “포함할 수 있다”등의 표현은 해당 특징(예: 수치, 기능, 동작, 또는 부품 등의 구성요소)의 존재를 가리키며, 추가적인 특징의 존재를 배제하지 않는다.In this specification, expressions such as “have,” “can have,” “includes,” or “can include,” indicate the existence of a corresponding feature (eg, a component such as a numerical value, function, operation, or part). Indicates, does not exclude the presence of additional features.

또한, 본 명세서에 기재된 "...부", "...기", "모듈", "블록"등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어나 소프트웨어 또는 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다.In addition, terms such as "... unit", "... group", "module", and "block" described herein mean a unit that processes at least one function or operation, which is hardware or software or It can be implemented by a combination of hardware and software.

도 1은 본 발명의 일 실시 예에 따른 프로그램 버그 발생 인자 결정 장치의 구성을 개략적으로 도시한 블록도이다.1 is a block diagram schematically showing the configuration of a device for determining a program bug generation factor according to an embodiment of the present invention.

도 1을 참조하면, 프로그램 버그 발생 인자 결정 장치(100)는 메모리부(110) 및 분석부(120)를 포함할 수 있다.Referring to FIG. 1, the apparatus 100 for determining a program bug generation factor may include a memory unit 110 and an analysis unit 120.

메모리부(110)는 프로그램 버그와 관련된 입력 데이터가 미리 설정된 프로그램이 실행됨에 따라 프로그램 버그와 관련된 인자를 포함하면서 명령어를 실행시키는 코드가 포함된 코드 라인을 포함하는 실행기록을 저장할 수 있다.The memory unit 110 may store an execution record including a line of code including code for executing an instruction while including an argument related to a program bug as the program in which input data related to the program bug is preset is executed.

본 발명의 일 실시 예에 따른 프로그램은 퍼징(fuzzing)을 대상으로 하는 프로그램일 수 있다. 퍼징은 퍼즈 테스팅(Fuzz testing)이라고도 나타내며, 소프트웨어의 취약점을 테스트하는 방법 중 하나를 나타낸다. 퍼징은 예기치 못한 오류나 크래시(crash)를 일으키도록 소프트웨어에 무작위 데이터, 미리 설정된 데이터 또는 예상치 않은 데이터가 입력되면서 실행되는 테스트이다. 시스템 크래시는 응용 소프트웨어나 운영 체제와 같은 컴퓨터 프로그램이 적절하게 기능하는 것을 멈췄을 때를 나타낸다. 단, 퍼징을 대상으로 하는 프로그램은 본 발명의 일 실시 예를 설명하기 위한 예시일 뿐 이에 한정되는 것이 아니며 보안 문제를 테스트 할 수 있는 다양한 프로그램이 사용될 수 있다.The program according to an embodiment of the present invention may be a program targeting fuzzing. Fuzzing, also known as fuzz testing, represents one of the ways to test for software vulnerabilities. Fuzzing is a test that runs when random data, preset data, or unexpected data is entered into the software to cause unexpected errors or crashes. A system crash indicates when a computer program, such as an application software or operating system, has stopped functioning properly. However, the program targeting for fuzzing is only an example for explaining an embodiment of the present invention and is not limited thereto, and various programs capable of testing security problems may be used.

상술한 프로그램은 입력 받은 데이터에 의해 실행될 수 있으며, 프로그램이 실행되면서 명령어를 실행시키는 코드가 포함된 코드 라인을 포함하는 실행기록이 저장될 수 있다.The above-described program may be executed by input data, and an execution record including a code line including code for executing an instruction may be stored as the program is executed.

본 발명의 일 실시 예에 따른 프로그램 버그와 관련된 입력 데이터는 오염 분석을 이용한 입력 데이터를 나타낼 수 있다.The input data related to the program bug according to an embodiment of the present invention may represent input data using pollution analysis.

오염 분석 방법은 입력 데이터가 오염되었다고 가정하고 입력 데이터의 흐름에 포함된 모든 코드들도 역시 오염된 것으로 간주하여 분석하는 방법으로 오염된 인자가 악의적인 목적 혹은 버그를 발생시키는데 쓰였는지를 데이터 흐름 추적을 통해 탐지하는 방법이다. 상술한 인자(operand)는 명령어에 해당되는 값을 나타낸다. 즉, 오염 분석 방법은 모든 외부 입력을 프로그램의 버그를 발생시킬 수 있는 입력으로 간주하여 외부 입력을 비 신뢰성(Untrustworthy) 값으로 간주하는 것을 나타낸다. 따라서, 상술한 오염 분석 방법으로 추적된 오염된 인자는 프로그램 버그와 관련된 인자로, 오염된 인자는 프로그램 버그를 발생시킬 수 있는 인자를 나타낼 수 있으며, 신뢰할 수 없는 소스로부터 유래된 인자를 나타낼 수 있다. The pollution analysis method assumes that the input data is contaminated and analyzes all codes included in the input data flow as also contaminated. It analyzes the data flow to see if the contaminated factors were used to cause a malicious purpose or bug. It is a way to detect through. The above-described argument (operand) indicates a value corresponding to the command. That is, the pollution analysis method indicates that all external inputs are regarded as inputs that may cause a bug in the program, and the external inputs are regarded as untrustworthy values. Therefore, the polluted factors tracked by the above-described pollution analysis method are factors related to program bugs, and the contaminated factors may indicate factors that can cause program bugs, and may indicate factors derived from untrusted sources. .

오염 분석 방법은 동적 오염 분석 방법과 정적 오염 분석 방법으로 나뉠 수 있다. 동적 오염 분석 방법은 오염된 데이터의 흐름을 탐색하여 명시적인 데이터 흐름뿐만 아니라 실행된 프로그램에 대한 암시적인 데이터 흐름도 탐색하여 분석하는 방법을 나타낸다. 이에 비해 정적 오염 분석 방법은 프로그램을 실행시키지 않고 코드로부터 분석하는 방법으로 분석하는데 시간이 오래 걸리는 문제점이 있다.The pollution analysis method can be divided into a dynamic pollution analysis method and a static pollution analysis method. The dynamic pollution analysis method represents a method of exploring and analyzing the flow of contaminated data, as well as exploring and analyzing implicit data flows for executed programs as well as explicit data flow. On the other hand, the static pollution analysis method has a problem that it takes a long time to analyze it by analyzing it from code without executing the program.

분석부(120)는 실행기록에 포함된 코드 라인에 포함된 메모리 상의 주소 정보가 서로 인접한 코드 라인들을 포함하는 버그 인자 결정 필드를 결정할 수 있다.The analysis unit 120 may determine a bug factor determination field including code lines in which address information on the memory included in the code line included in the execution record includes adjacent code lines.

구체적으로, 분석부(120)는 실행기록에 포함된 코드 라인에 포함된 명령어를 실행시키는데 사용된 입력 데이터가 기록된 주소를 나타내는 입력 데이터 오프셋이 연속으로 이어진 코드 라인을 포함하는 버그 인자 결정 필드를 결정할 수 있다. 상술한 실행기록에 포함된 코드 라인은 프로그램 버그와 관련된 인자를 포함한 코드 라인을 나타낸다. 또한, 본 발명의 일 실시 예에 따르면 버그 인자 결정 필드는 프로그램의 버그 발생과 관련된 버그 발생 인자의 주소 정보를 포함할 수 있다. 버그 인자 결정 필드를 결정하는 구체적인 방법은 도 4에서 후술하도록 한다.Specifically, the analysis unit 120 may determine a bug factor determination field including a code line in which an input data offset representing an address in which input data used to execute an instruction included in a code line included in the execution record is consecutively continued. Can decide. The code line included in the above-described execution record indicates a code line including an argument related to a program bug. In addition, according to an embodiment of the present invention, the bug factor determination field may include address information of a bug occurrence factor related to a bug occurrence of a program. A detailed method of determining the bug factor determination field will be described later in FIG. 4.

또한, 분석부(120)는 버그 인자 결정 필드에 포함된 코드 라인 각각에 포함된 명령어의 속성을 고려하여 프로그램의 버그 발생과 관련된 버그 발생 인자를 결정할 수 있다.Also, the analysis unit 120 may determine a bug occurrence factor related to a bug occurrence of a program by considering an attribute of an instruction included in each code line included in the bug factor determination field.

본 발명의 일 실시 예에 따르면 명령어의 속성이 산술 명령어일 수 있다. 산술 명령어는 산술 연산을 실행하기 위해 사용되는 명령어로, 일반적으로 알려진 산술 명령어에는 ADD, ADC, SUB, RSB, SBC, RSC 또는 MUL과 같은 명령어 종류가 포함될 수 있다. 단, 산술 명령어는 상술한 종류에 한정되지 않으며 산술 연산을 실행하기 위해 사용되는 모든 명령어가 포함될 수 있다. 명령어의 속성이 산술 명령어인 경우, 분석부는 산술 명령어의 결과 값이 기 설정된 경계 값을 초과하도록 만드는 인자를 프로그램의 버그를 발생시키는 버그 발생 인자로 결정할 수 있다. 상술한 산술 명령어의 결과 값이 기 설정된 경계 값을 초과하도록 만드는 인자는 프로그램이 표현할 수 있는 값의 범위를 벗어나게 하는 인자를 나타낸다. 명령어 속성이 산술 명령어인 경우 프로그램의 버그 발생과 관련된 버그 발생 인자를 결정하는 구체적인 방법은 도 6에서 후술하기로 한다.According to an embodiment of the present invention, an attribute of an instruction may be an arithmetic instruction. Arithmetic instructions are instructions used to perform arithmetic operations, and commonly known arithmetic instructions may include instruction types such as ADD, ADC, SUB, RSB, SBC, RSC or MUL. However, the arithmetic instructions are not limited to the above-described types, and may include all instructions used to perform arithmetic operations. When the attribute of the instruction is an arithmetic instruction, the analysis unit may determine an argument that causes a result value of the arithmetic instruction to exceed a preset boundary value as a bug occurrence factor that causes a bug in the program. The factors that cause the result value of the arithmetic instruction to exceed the preset boundary value indicate the factors that cause the program to fall outside the range of values that can be expressed. When the instruction attribute is an arithmetic instruction, a specific method of determining a bug occurrence factor related to a bug occurrence of a program will be described later in FIG. 6.

반면, 본 발명의 또 다른 일 실시 예에 따르면, 상술한 명령어의 속성이 산술 명령어가 아닌 비교 명령어일 수 있다. 비교 명령어는 두 숫자의 크기를 비교하기 위해 쓰이는 명령어를 나타내며, 상술한 비교 명령어는 순차적으로 진행된 프로그램의 실행 흐름을 조건에 따라 다른 곳으로 분기시키는 분기문을 결정 짓는 명령어를 나타낸다. 따라서, 상술한 비교 명령어의 결과에 따라 분기된 곳에서 하나의 프로그램 실행 경로가 선택되고, 선택되지 않은 프로그램의 실행 경로에서는 프로그램 코드가 실행되지 않는다. 일반적으로 알려진 비교 명령어에는 CMP, CMN, COMM 또는 DIFF와 같은 명령어 종류가 포함될 수 있다. 단, 비교 명령어는 상술한 종류에 한정되지 않으며 비교하기 위해 사용되는 모든 명령어가 포함될 수 있다. 명령어의 속성이 비교 명령어인 경우, 분석부(120)는 프로그램 실행 경로 확장과 관련된 인자를 결정할 수 있다. 분석부(120)는 프로그램 실행 경로 확장과 관련된 인자를 테스트하여 테스트 된 인자가 프로그램 실행 경로를 확장시키는 인자에 해당하면 분석된 인자를 오염시켜 프로그램을 다시 실행시킬 수 있다.On the other hand, according to another embodiment of the present invention, the attribute of the above-described instruction may be a comparison instruction rather than an arithmetic instruction. The comparison instruction denotes an instruction used to compare the size of two numbers, and the above-described comparison instruction denotes an instruction that determines a branching statement that branches the execution flow of a sequentially executed program to another place according to conditions. Accordingly, one program execution path is selected at a branched location according to the result of the comparison instruction described above, and program code is not executed in the execution path of the unselected program. Commonly known comparison instructions may include instruction types such as CMP, CMN, COMM, or DIFF. However, the comparison command is not limited to the above-described types and all commands used for comparison may be included. When the attribute of the instruction is a comparison instruction, the analysis unit 120 may determine an argument related to the extension of the program execution path. The analysis unit 120 may test the factors related to the extension of the program execution path, and if the tested factors correspond to the factors that expand the program execution path, the analyzed factors may be contaminated and the program executed again.

구체적으로 버그 인자 결정 필드에 포함된 코드 라인 중 코드 라인에 포함된 비교 명령어에 사용되고 프로그램 버그와 관련된 인자에 해당하는 제1 인자의 값과 입력 데이터의 값이 동일한 경우, 분석부(120)는 상술한 비교 명령어에 사용되지만 프로그램 버그와 관련되지 않은 인자인 제2 인자를 프로그램 실행 경로 확장과 관련된 인자로 결정할 수 있다. 분석부(120)는 상술한 제2 인자를 프로그램의 입력 데이터로 결정하여 프로그램을 테스트 할 수 있고, 테스트 결과 프로그램의 실행 경로가 확장되면 분석부(120)는 제2 인자를 프로그램 실행 경로 확장 인자로 결정할 수 있다. 분석부(120)는 상술한 제2 인자를 프로그램 버그와 관련된 입력 데이터로 결정하여 프로그램을 실행시켜 상술한 과정을 반복하면서 버그 발생 인자를 결정할 수 있다.Specifically, among the code lines included in the bug factor determination field, when the value of the first parameter corresponding to the parameter related to the program bug is used and the value of the input data is the same, the analysis unit 120 is described above The second argument, which is used for one comparison instruction, but is not related to a program bug, can be determined as an argument related to extension of a program execution path. The analysis unit 120 may test the program by determining the above-described second parameter as the input data of the program, and when the execution path of the program is expanded as a result of the test, the analysis unit 120 sets the second parameter as the program execution path expansion factor You can decide. The analysis unit 120 may determine the bug generating factor while repeating the above-described process by executing the program by determining the second parameter as input data related to the program bug.

분석부(120)는 상술한 프로그램의 실행 결과에 따른 실행 기록을 저장하고, 실행 기록에 포함된 코드 라인들을 버그 인자 결정 필드로 식별하고, 식별된 필드에 포함된 코드 라인 각각으로부터 명령어 속성을 판단하는 과정을 반복하여 프로그램 버그와 관련된 버그 발생 인자를 결정할 수 있다.The analysis unit 120 stores the execution record according to the execution result of the above-described program, identifies the code lines included in the execution record as a bug factor determination field, and determines the instruction attribute from each code line included in the identified field You can repeat the process to determine the bug occurrence factor related to the program bug.

또한, 본 발명의 일 실시 예에 따르면 제1 인자의 값과 입력 데이터 값이 동일하지 않은 경우, 분석부(120)는 상술한 프로그램의 실행 경로를 역으로 분석하여 비교 명령어가 실행된 위치에서 처음 비교 명령어의 결과에 따라 분기된 곳에서 선택되지 않은 프로그램 실행 경로를 실행시키는 제3 인자를 프로그램 실행 경로 확장 인자로 결정할 수 있다. 분석부(120)는 상술한 제3 인자를 프로그램 버그와 관련된 입력 데이터로 결정하여 프로그램을 실행시켜 상술한 과정을 반복하면서 버그 발생 인자를 결정할 수 있다.In addition, according to an embodiment of the present invention, when the value of the first factor and the input data value are not the same, the analysis unit 120 analyzes the execution path of the above-described program in reverse and executes the comparison command for the first time. According to the result of the comparison instruction, a third parameter that executes a program execution path that is not selected in a branched location may be determined as a program execution path extension factor. The analysis unit 120 may determine the bug generating factor while repeating the above-described process by executing the program by determining the third parameter as input data related to the program bug.

본 발명의 일 실시 예에 따라 상술한 제2 및 제3 인자는 코드 커버리지를 증가시키는 데이터를 나타낼 수 있다.According to an embodiment of the present invention, the second and third factors described above may represent data that increases code coverage.

코드 커버리지는 소프트웨어의 테스트를 논할 때 얼마나 테스트가 충분한가를 나타내는 지표 중 하나를 나타낸다. 즉, 코드 커버리지는 소프트웨어 테스트가 진행되었을 때 코드 자체가 얼마나 실행되었냐는 것을 나타낸다.Code coverage represents one of the indicators of how much testing is sufficient when discussing software testing. That is, the code coverage indicates how much the code itself was executed when the software test was performed.

또한, 본 발명의 또 다른 일 실시 예에 따른 프로그램 버그 발생 인자 결정 장치는 상술한 제2 인자 또는 제3 인자를 프로그램 버그와 관련된 입력 데이터로 결정하여 프로그램을 실행시키면서 발생하는 크래시를 분류할 수 있다.In addition, the apparatus for determining a program bug generation factor according to another embodiment of the present invention may classify a crash occurring while executing a program by determining the above-described second or third factors as input data related to a program bug. .

또한, 본 발명의 또 다른 일 실시 예에 따르면, 버그 인자 결정 필드에 포함된 코드 라인에 포함된 명령어의 속성이 비교 명령어 및 산술 명령어 이외의 명령어일 수 있다. 예를 들면, 논리 연산 명령어 또는 데이터 이동 연산 명령어가 있을 수 있으나 이에 한정되는 것은 아니다. 상술한 명령어인 경우 분석부(120)는 버그 인자 결정 필드에 포함되며 상술한 명령어를 포함하는 코드가 포함된 코드 라인과 다른 코드 라인에 포함된 코드에 포함된 명령어의 속성을 고려하여 프로그램의 버그 발생과 관련된 버그 발생 인자를 결정할 수 있다.Further, according to another embodiment of the present invention, an attribute of an instruction included in a code line included in a bug factor determination field may be an instruction other than a comparison instruction and an arithmetic instruction. For example, there may be a logical operation instruction or a data movement operation instruction, but is not limited thereto. In the case of the above-mentioned instruction, the analysis unit 120 is included in the bug factor determination field and considers the attribute of the instruction included in the code included in the code line and the code line containing the above-described instruction in the bug of the program. It is possible to determine the occurrence factor of the bug related to the occurrence.

따라서, 본 발명의 일 실시 예에 따른 프로그램 버그 발생 인자 결정 장치는 오염 분석 방법으로 오염된 인자를 포함하는 명령어를 추출하여 프로그램 버그를 탐지하므로 프로그램의 실행 속도가 향상될 수 있고, 프로그램 버그를 탐지할 때 사용되는 메모리가 감소될 수 있으며 경로 폭발 문제 또한 완화될 수 있다.Therefore, the apparatus for determining a program bug generation factor according to an embodiment of the present invention extracts an instruction including a contaminated factor by a pollution analysis method to detect a program bug, so that the execution speed of the program can be improved and the program bug is detected The memory used when doing so can be reduced, and the route explosion problem can also be alleviated.

도 2는 본 발명의 일 실시 예에 따른 프로그램 버그 발생 인자 결정 방법을 설명하기 위한 흐름도이다.2 is a flowchart illustrating a method of determining a program bug generation factor according to an embodiment of the present invention.

도 2를 참조하면, 메모리부는 프로그램 버그와 관련된 입력 데이터가 미리 설정된 프로그램이 실행됨에 따라 프로그램 버그와 관련된 인자를 포함하면서 명령어를 실행시키는 코드가 포함된 코드 라인이 포함된 실행기록을 저장한다(S210). 분석부는 실행기록에 포함된 코드 라인에 포함된 주소 정보가 인접한 코드 라인을 포함하는 버그 인자 결정 필드를 결정한다(S220).Referring to FIG. 2, the memory unit stores an execution record including a code line including code for executing an instruction while including parameters related to a program bug as input data related to a program bug is executed in advance (S210) ). The analysis unit determines a bug factor determination field in which the address information included in the code line included in the execution record includes adjacent code lines (S220).

분석부는 버그 인자 결정 필드에 포함된 코드 라인 각각에 포함된 명령어의 속성을 고려하여 프로그램의 버그 발생과 관련된 버그 발생 인자를 결정한다(S230). 분석부는 버그 인자 결정 필드에 포함된 코드 라인에 포함된 명령어의 속성이 산술 명령어인 경우 산술 명령어의 결과 값이 기 설정된 경계 값을 초과하도록 만드는 인자를 프로그램의 버그를 발생시키는 버그 발생 인자로 결정할 수 있다. 또한 분석부는 명령어의 속성이 비교 명령어인 경우 프로그램 실행 경로 확장과 관련된 인자를 테스트하여 프로그램 실행 경로 확장 인자를 결정할 수 있고, 결정된 인자를 프로그램 버그와 관련된 입력 데이터로 설정하여 프로그램을 다시 실행시켜 상술한 과정을 반복하여 프로그램 버그 발생과 관련된 버그 발생 인자를 결정할 수 있다.The analysis unit determines the bug occurrence factor related to the bug occurrence of the program by considering the attribute of the instruction included in each code line included in the bug factor determination field (S230). When the attribute of the instruction included in the code line included in the bug factor determination field is an arithmetic instruction, the analysis unit may determine the factor that causes the result value of the arithmetic instruction to exceed a preset boundary value as a bug occurrence factor that causes a bug in the program. have. In addition, when the attribute of the instruction is a comparison instruction, the analysis unit may determine the program execution path extension factor by testing the parameters related to the program execution path extension, and execute the program again by setting the determined parameter as input data related to the program bug, as described above. By repeating the process, you can determine the bug occurrence factors related to program bug occurrence.

도 3은 본 발명의 또 다른 일 실시 예에 따른 프로그램 버그 발생 인자 및 프로그램 실행 경로 확장과 관련된 인자 결정 방법을 구체적으로 설명하기 위한 흐름도이다.3 is a flowchart illustrating in detail a method for determining a parameter related to a program bug occurrence factor and a program execution path extension according to another embodiment of the present invention.

도 3을 참조하면, 분석부는 메모리부에 저장된 프로그램 실행기록을 로드 할 수 있다(S310). 분석부는 명령어를 실행시키며 실행기록에 포함된 코드 라인에 포함된 메모리 상의 주소 정보가 서로 인접한 코드 라인들을 포함하는 버그 인자 결정 필드를 결정할 수 있다(S320). 분석부는 결정된 버그 인자 결정 필드를 로드 할 수 있다(S330). 분석부는 로드 된 버그 인자 결정 필드에서 하나의 코드 라인을 로드 할 수 있다(S340).Referring to FIG. 3, the analysis unit may load a program execution record stored in the memory unit (S310). The analysis unit may execute an instruction and determine a bug factor determination field including code lines in which address information on the memory included in the code line included in the execution record includes adjacent code lines (S320). The analysis unit may load the determined bug factor determination field (S330). The analysis unit may load one code line from the loaded bug factor determination field (S340).

설명의 편의를 위해, 로드 된 코드 라인 중 첫 번째로 로드 되는 코드 라인을 제1 코드 라인으로 나타내고, 제1 코드 라인과 다르면서 두 번째로 로드 되는 코드 라인은 제2 코드 라인으로 나타낸다.For convenience of description, the first loaded code line among the loaded code lines is represented by the first code line, and the second loaded code line is different from the first code line by the second code line.

분석부는 로드 된 제1 코드 라인에 포함된 명령어가 비교 명령어인지 판단할 수 있다(S341). 제1 코드 라인에 포함된 명령어가 비교 명령어로 판단되면, 분석부는 프로그램 버그와 관련된 인자에 해당되면서 비교 명령어를 실행시키는 제1 인자의 값을 로드 할 수 있다(S342). 상술한 프로그램 버그와 관련된 인자는 오염된 인자를 나타낸다. 비교 명령어를 실행시키는 인자 값은 복수 개의 인자 값일 수 있으며, 설명의 편의를 위해 비교 명령어를 실행시키는 인자는 오염된 인자인 제1 인자와 오염되지 않은 인자인 제2 인자를 포함할 수 있다. 단, 상술한 제1 인자 및 제2 인자는 본 발명의 일 실시 예를 설명하기 위한 예시일 뿐 이에 한정되는 것은 아니다.The analysis unit may determine whether the instruction included in the loaded first code line is a comparison instruction (S341). When the instruction included in the first code line is determined to be the comparison instruction, the analysis unit may load the value of the first parameter that executes the comparison instruction while corresponding to the parameter related to the program bug (S342). The factors related to the above-described program bugs indicate contaminated factors. The argument value for executing the comparison command may be a plurality of argument values, and for convenience of description, the argument for executing the comparison command may include a first factor that is a contaminated factor and a second factor that is a non-contaminated factor. However, the above-described first and second factors are only examples for explaining an embodiment of the present invention, but are not limited thereto.

분석부는 로드 된 제1 인자의 값과 입력 데이터의 값이 동일한지 판단할 수 있다(S343).The analysis unit may determine whether the value of the loaded first factor and the value of the input data are the same (S343).

제1 인자의 값과 입력 데이터의 값이 동일한 경우, 분석부는 제1 인자와 다르면서 비교 명령어를 실행시키는 제2 인자를 프로그램 실행 경로 확장과 관련된 인자로 결정하여 제2 인자의 값을 제1 데이터 값으로 결정할 수 있다(S344). 결정된 제1 데이터 값을 포함하는 인자는 프로그램의 실행 경로를 확장시킬 수 있는 인자일 수 있다.When the value of the first argument and the value of the input data are the same, the analysis unit determines a second parameter that executes a comparison instruction while being different from the first parameter as a factor related to program execution path expansion, and determines the value of the second factor as the first data. It can be determined by the value (S344). The factor including the determined first data value may be a factor that can extend the execution path of the program.

제1 인자의 값과 상기 입력 데이터의 값이 다른 경우, 분석부는 프로그램 실행 경로를 역으로 분석하여 비교 명령어가 실행된 위치에서 처음 비교 명령어의 결과에 따라 분기된 곳에서 선택되지 않은 프로그램 실행 경로를 실행시키는 인자를 제3 인자로 결정할 수 있고, 결정된 제3 인자의 값을 제2 데이터 값으로 결정할 수 있다(S345). 따라서, 결정된 제2 데이터 값이 포함된 인자는 프로그램의 실행 경로를 확장시키는 인자에 해당한다.When the value of the first argument is different from the value of the input data, the analysis unit analyzes the program execution path inversely, and selects the program execution path that is not selected from the branch where the comparison instruction was executed, according to the result of the first comparison instruction. The factor to be executed may be determined as the third factor, and the determined value of the third factor may be determined as the second data value (S345). Therefore, the argument including the determined second data value corresponds to an argument that expands the execution path of the program.

분석부는 로드 된 제1 코드 라인에 포함된 명령어가 비교 명령어인지를 판단한 결과 비교 명령어가 아닌 경우, 제1 코드 라인에 포함된 명령어가 산술 명령어인지를 판단할 수 있다(S346). 분석부는 제1 코드 라인에 포함된 명령어를 산술 명령어로 판단하면, 산술 명령어의 결과 값이 기 설정된 경계 값을 초과하도록 만드는 인자의 값을 제3 데이터 값으로 결정할 수 있다(S347). 구체적으로 분석부는 입력 데이터의 위치를 나타내는 필드는 고정하고, 입력 데이터의 값만을 변경함으로써 상술한 프로그램이 기 설정된 경계 값을 초과하도록 만드는 인자의 값을 분석할 수 있고, 분석된 인자를 프로그램 버그를 발생시키는 버그 발생 인자로 결정할 수 있다.The analysis unit may determine whether the instruction included in the first code line is an arithmetic instruction when the instruction included in the loaded first code line is not a comparison instruction (S346). When the analysis unit determines that the instruction included in the first code line is an arithmetic instruction, it may determine the value of the factor that causes the result value of the arithmetic instruction to exceed a preset boundary value as a third data value (S347). Specifically, the analysis unit can analyze the value of the factor that causes the above-described program to exceed the preset boundary value by fixing the field indicating the position of the input data and changing only the value of the input data, and the program bug is analyzed. It can be determined by the cause of the bug.

따라서, 프로그램의 버그는 특정한 값에 의해 유발되는 경우에도 탐지될 수 있으므로 본 발명의 일 실시 예에 따른 프로그램 버그 발생 인자 결정 장치는 프로그램이 비 정상적인 동작을 일으키거나 강제로 종료되는 현상 또한 방지할 수 있다.Therefore, since a bug in a program can be detected even when caused by a specific value, the apparatus for determining a program bug generation factor according to an embodiment of the present invention can also prevent a phenomenon in which a program causes an abnormal operation or is forcibly terminated. have.

분석부는 상술한 방법에 의해 결정된 프로그램의 버그 발생 인자 값 또는 프로그램 실행 경로 확장과 관련된 인자 값을 저장할 수 있다(S360).The analysis unit may store a bug generation factor value of the program determined by the above-described method or a parameter value related to program execution path extension (S360).

다만, 분석부는 로드 된 제1 코드 라인에 포함된 명령어가 산술 명령어도 아니라고 판단하면 동일한 버그 인자 결정 필드에 포함된 코드 라인 중 제1 코드 라인과 다른 제2 코드 라인을 로드 할 수 있다. 분석부는 제2 코드 라인을 로드 하면서 위에서 설명한 방법과 동일한 과정을 반복할 수 있다.However, if the analysis unit determines that the instruction included in the loaded first code line is not an arithmetic instruction, it may load a second code line different from the first code line among the code lines included in the same bug factor determination field. The analysis unit may repeat the same process as described above while loading the second code line.

분석부는 제1 코드 라인이 포함된 버그 인자 결정 필드에 제1 코드 라인 이외에 다른 제2 코드 라인이 존재하는지 판단할 수 있다(S370). 제1 코드 라인이 포함된 버그 인자 결정 필드에 제2 코드 라인이 존재하는 경우, 분석부는 제2 코드 라인을 로드 할 수 있으며 상술한 과정을 반복할 수 있다.The analysis unit may determine whether there is a second code line other than the first code line in the bug factor determination field including the first code line (S370). When the second code line exists in the bug factor determination field including the first code line, the analysis unit may load the second code line and repeat the above-described process.

제1 코드 라인이 포함된 버그 인자 결정 필드를 제1 버그 인자 결정 필드라고 하면, 분석부는 제1 버그 인자 결정 필드에 제1 코드 라인 이외에 다른 코드 라인이 존재하지 않는 경우, 제1 버그 인자 결정 필드 이외에 다른 버그 인자 결정 필드가 존재하는지 판단할 수 있고, 분석부는 제1 버그 인자 결정 필드와 다른 제2 버그 인자 결정 필드가 존재한다고 판단하는 경우 제2 버그 인자 결정 필드를 로드 하여 상술한 과정을 반복할 수 있다 (S380).If the bug factor determination field including the first code line is referred to as a first bug factor determination field, the analysis unit may determine that the first bug factor determination field does not exist in the first bug factor determination field other than the first code line. In addition, it is possible to determine whether another bug factor determination field exists, and when the analysis unit determines that there is a second bug factor determination field different from the first bug factor determination field, the second bug factor determination field is loaded to repeat the above process. It can be done (S380).

분석부는 제1 버그 인자 결정 필드 이외에 다른 버그 인자 결정 필드가 존재하지 않는다고 판단되면, 프로그램 버그 발생 인자 또는 프로그램 실행 경로 확장과 관련된 인자의 위치를 나타내는 제1 버그 인자 결정 필드에 포함된 각각의 코드 라인에 대해 프로그램의 버그 발생과 관련된 버그 발생 인자 또는 프로그램의 실행 경로 확장과 관련된 인자를 결정할 수 있다(S390).If it is determined that there is no other bug factor determination field other than the first bug factor determination field, each code line included in the first bug factor determination field indicating the location of the argument related to the program bug generation factor or the program execution path extension. With respect to, a bug occurrence factor related to a bug occurrence of a program or a factor related to extension of an execution path of a program may be determined (S390).

도 4는 본 발명의 일 실시 예에 따른 프로그램 실행기록을 나타낸 것이다.4 shows a program execution record according to an embodiment of the present invention.

구체적으로 도 4는 프로그램 실행기록에 포함되며 프로그램 버그와 관련된 인자를 포함하는 복수 개의 코드 라인들을 버그 인자 결정 필드로 결정하는 방법을 설명하기 위한 도면이다.Specifically, FIG. 4 is a view for explaining a method of determining a plurality of code lines included in a program execution record and including parameters related to program bugs as a bug factor determination field.

도 4를 참조하면, 실행기록에 포함된 각각의 코드 라인은 명령어 주소(410), 역어셈블된 명령어(420), 명령어 타입(430), 입력 데이터 오프셋(440) 및 명령어의 인자에 저장된 값(450)을 나타낸다.Referring to FIG. 4, each code line included in the execution record includes an instruction address 410, a deassembled instruction 420, an instruction type 430, an input data offset 440, and a value stored in the instruction argument ( 450).

본 발명의 일 실시 예에 따른 명령어 주소(410)는 프로그램에서 명령어의 주소를 나타낸 것으로, “0xb4ab1ca8”을 나타낸다.The instruction address 410 according to an embodiment of the present invention represents an address of an instruction in a program and represents “0xb4ab1ca8”.

본 발명의 일 실시 예에 따른 역어셈블된 명령어(420)는 “cmp dl, 0x5a”를 나타낸다. 역어셈블된 명령어(420)는 기계어를 어셈블된 명령어로 변환하는 것을 나타낸다. 기계어는 컴퓨터가 읽을 수 있는 2진 숫자로 이루어진 언어를 나타내며, 어셈블리된 명령어는 기계어를 사람이 보기 쉽게 문자를 기호화한 것을 나타낸다.The deassembled instruction 420 according to an embodiment of the present invention represents “cmp dl, 0x5a”. The disassembled instruction 420 represents converting the machine language to an assembled instruction. Machine language refers to a computer-readable binary number language, and assembled instructions represent machine language coded characters that are easy for humans to see.

또한, 명령어 타입(430)은 비교 명령어에 해당하는 “CMP”를 나타낸다. 단, 상술한 비교 명령어의 종류 중 하나인 “CMP”는 본 발명의 일 실시 예를 설명하기 위한 예시일 뿐 이에 한정되는 것은 아니며 다양한 비교 명령어가 포함될 수 있다. 상술한 비교 명령어는 순차적으로 진행된 프로그램의 실행 흐름을 조건에 따라 다른 곳으로 분기시키는 분기문을 결정 짓는 역어셈블된 명령어를 나타낸다. 상술한 “CMP” 명령어에서 “dl”, “0x5a”가 인자에 해당한다. In addition, the command type 430 represents “CMP” corresponding to the comparison command. However, “CMP”, which is one of the types of the comparison commands described above, is only an example for explaining an embodiment of the present invention and is not limited thereto, and various comparison commands may be included. The above-described comparison instruction indicates a disassembled instruction that determines a branching statement that branches the execution flow of a sequentially executed program to another place according to conditions. In the above-described “CMP” command, “dl” and “0x5a” correspond to arguments.

본 발명의 일 실시 예에 따른 입력 데이터 오프셋(440)은 실행기록에 포함된 각각의 코드 라인에 포함된 명령어를 실행시키는데 사용된 입력 데이터가 기록된 주소를 나타낸 것이다. 구체적으로 입력 데이터 오프셋(440)은 입력 데이터에서의 몇 번째 바이트가 상술한 명령어에 사용되는지를 나타낸 것이다. 본 발명의 일 실시 예에 따른 입력 데이터 오프셋(440)은 “{0x2cc}”를 나타낸다.The input data offset 440 according to an embodiment of the present invention represents an address in which input data used to execute instructions included in each code line included in the execution record is recorded. Specifically, the input data offset 440 indicates how many bytes in the input data are used in the above-described instruction. The input data offset 440 according to an embodiment of the present invention represents “{0x2cc}”.

명령어의 인자에 저장된 값(450)은 역어셈블된 명령어(420)에 포함된 인자 “dl”의 레지스터 안에 있는 인자 값을 나타내며, 구체적으로 “4c”가 첫 번째 인자의 값(451)이고, “5a”가 두 번째 인자의 값(452)을 나타낸다.The value 450 stored in the argument of the instruction represents the argument value in the register of the argument “dl” included in the deassembled instruction 420, specifically “4c” is the value 451 of the first argument, and “ 5a ”represents the value 452 of the second argument.

상술한 프로그램 실행기록에 포함된 복수 개의 코드 라인을 버그 인자 결정 필드로 결정하는 구체적인 방법은 입력 데이터 오프셋이 “{0x114, 0x115, 0x116, 0x117}”인 입력 데이터 오프셋(440a)으로 설명하도록 한다. 분석부는 상술한 입력 데이터 오프셋과 같이 입력 데이터 오프셋이 연속적으로 이어져 있고 프로그램 버그와 관련된 인자가 포함된 코드 라인을 포함하는 버그 인자 결정 필드를 결정할 수 있다. 본 발명의 일 실시 예에 따른 버그 인자 결정 필드는 시작(start)이 “0x114”이고, 크기(size)가 “4”이다. 단, 상술한 실행기록 및 버그 인자 결정 필드는 본 발명의 일 실시 예를 설명하기 위한 예시일 뿐 이에 한정되는 것은 아니다.A detailed method of determining a plurality of lines of code included in the program execution record as the bug factor determination field will be described as an input data offset 440a having an input data offset of “{0x114, 0x115, 0x116, 0x117}”. As described above, the analysis unit may determine a bug factor determination field including a code line in which input data offsets are continuously connected and parameters related to program bugs. The bug factor determination field according to an embodiment of the present invention has a start of “0x114” and a size of “4”. However, the execution record and the bug factor determination field described above are only examples for explaining an embodiment of the present invention, but are not limited thereto.

도 5는 본 발명의 일 실시 예에 따라 버그 인자 결정 필드 별로 정리된 코드 라인을 나타낸 것이다.5 illustrates code lines organized for each bug factor determination field according to an embodiment of the present invention.

도 6은 본 발명의 일 실시 예에 따른 프로그램 출력 결과를 나타낸 것이다.6 illustrates a program output result according to an embodiment of the present invention.

설명의 편의를 위해 도 5 및 도 6을 함께 설명하도록 한다.For convenience of description, FIGS. 5 and 6 will be described together.

도 5를 참조하면, 시작(start)이 “0”(511), 크기(size)가 “2”(512)인 제1 버그 인자 결정 필드(510), 시작이 “e4”, 크기가 “2”인 제2 버그 인자 결정 필드 및 시작이 “e6”, 크기가 “2”인 제3 버그 인자 결정 필드를 나타내고 있다.Referring to FIG. 5, a first bug factor determination field 510 having a start of “0” (511) and a size of “2” (512), a start of “e4”, and a size of “2” Indicates a second bug factor determination field of “” and a third bug factor determination field of “e6” and size “2”.

제1 버그 인자 결정 필드(510)에서 입력 데이터의 값(orig value)은 “4d5a”(520)을 나타내고 있으며, 제1 버그 인자 결정 필드(510)에 3개의 코드 라인이 포함되어 있음을 나타낸다. 제1 버그 인자 결정 필드(510)에 포함된 3개의 코드 라인에 포함된 명령어 모두는 비교 명령어의 종류 중 하나인 “cmp”(530)이다.The orig value of the input data in the first bug factor determination field 510 indicates “4d5a” 520, and indicates that three code lines are included in the first bug factor determination field 510. All of the instructions included in the three code lines included in the first bug factor determination field 510 are “cmp” 530, which is one of types of comparison instructions.

본 발명의 일 실시 예에서는 엔디안(endian) 정보도 포함될 수 있다. 엔디안은 단어를 형성하는 2진 바이트에서 저장되는 바이트의 순서를 나타내는 방법으로, 빅 엔디안(big-endian)과 리틀 엔디안(little-endian)으로 구분될 수 있다. 빅 엔디안은 최상위 비트(MSB)부터 부호화되어 저장되는 것을 나타내며, 리틀 엔디안은 최하위 비트(LSB)부터 부호화되어 저장되는 것을 나타낸다. 본 발명의 일 실시 예에서는 빅 엔디안(big endian)으로 되어 있으나 이는 본 발명의 일 실시 예를 설명하기 위한 예시일 뿐 이에 한정되는 것은 아니며, 리틀 엔디안(little endian)이 적용될 수도 있다.In one embodiment of the present invention, endian information may also be included. Endianness is a method of indicating the order of bytes stored in binary bytes forming a word, and can be classified into big-endian and little-endian. The big endian indicates that it is encoded and stored from the most significant bit (MSB), and the little endian indicates that it is encoded and stored from the least significant bit (LSB). In one embodiment of the present invention is a big endian (big endian), but this is only an example for explaining an embodiment of the present invention, and is not limited thereto, and little endian may be applied.

또한 본 발명의 일 실시 예에서는 엔디안 정보 우측에 명령어(530)에 사용된 인자 값(540) 및 오염 분석에 의해 명령어(530)에 사용된 인자 중 몇 번째 인자가 프로그램 버그와 관련된 인자에 대한 정보를 나타내고 있다. 구체적으로 오염 분석에 의해 명령어(530)에 사용된 인자 중 몇 번째 인자가 오염되어있는지에 대한 정보를 나타내고 있다. “t op: 0”(50)에서 “t op(taint operand)”는 몇 번째 인자가 오염되어 있는지에 대한 정보를 나타낸다. 본 발명의 일 실시 예에서 제1 버그 인자 결정 필드(510)에 포함된 코드 라인 모두에는 “t op”가 “0”이므로 오염된 인자는 제1 인자(op0)이며 제1 인자의 값은 “4d5a0000”(541)을 나타낸다.In addition, in an embodiment of the present invention, a factor value 540 used in the command 530 to the right of the endian information and a number of factors used in the command 530 by the analysis of pollution are information about a parameter related to a program bug. Is shown. Specifically, it indicates information about which of the factors used in the instruction 530 by contamination analysis is contaminated. In “t op: 0” (50), “t op (taint operand)” indicates information about how many factors are contaminated. In one embodiment of the present invention, since “t op” is “0” in all of the code lines included in the first bug factor determination field 510, the contaminated factor is the first factor (op0) and the value of the first factor is “ 4d5a0000 ”(541).

도 2에서 설명한 바와 같이 명령어의 속성이 제1 버그 인자 결정 필드(510)에 나타난 것처럼 “cmp”와 같은 비교 명령어의 경우 분석부는 프로그램 실행 경로 확장과 관련된 인자를 결정할 수 있다.As described in FIG. 2, in the case of a comparison command such as “cmp”, as the property of the command is shown in the first bug factor determination field 510, the analysis unit may determine a parameter related to the extension of the program execution path.

다만, 시작이 “e4”이고 크기가 “2”인 제2 버그 인자 결정 필드는 비교 명령어 외에 “sub dx, 0x14c”(530a)와 같은 산술 명령어 또는 “and”(530b)와 같은 같이 비교 명령어도 아니고 산술 명령어가 아닌 논리 연산 명령어를 포함하고 있다.However, the second bug factor determination field having a start of “e4” and a size of “2” includes arithmetic commands such as “sub dx, 0x14c” (530a) or comparison commands such as “and” (530b) in addition to the comparison commands. It contains logical operation instructions, not arithmetic instructions.

도 6을 참조하면서, 프로그램의 버그를 발생시키는 버그 발생 인자 및 프로그램의 실행 경로를 확장시키는 인자를 결정하는 방법을 설명하도록 한다.Referring to FIG. 6, a description will be given of a method of determining a bug generation factor that causes a program bug and a factor that expands a program execution path.

구체적으로, 도 6은 버그 인자 결정 필드 별로 프로그램의 실행 경로 확장과 관련된 인자의 값인 제1 데이터 값(M)(610), 프로그램의 실행 경로를 확장시키는 인자의 값인 제2 데이터 값(C)(620) 및 프로그램의 버그를 발생시키는 버그 발생 인자의 값인 제3 데이터 값(I)(630)을 나타낸 것이다.Specifically, FIG. 6 shows a first data value (M) 610 which is a value of an argument related to an extension of an execution path of a program for each bug factor determination field, and a second data value (C) (which is a value of an argument that expands an execution path of a program) ( 620) and a third data value (I) 630 which is a value of a bug generation factor that generates a bug in a program.

프로그램의 버그를 발생시키는 버그 발생 인자의 값은 프로그램이 표현할 수 있는 값의 범위를 벗어나게 하는 인자의 값을 나타낸다.The value of a bug occurrence parameter that causes a program bug represents a value of an argument that causes the program to fall outside the range of values that can be expressed.

도 6을 참조하면, 도 5에서 설명한 시작이 0(511), 크기가 2(512)인 제1 버그 인자 결정 필드에서의 제1 데이터 값(M)(610), 제2 데이터 값(C)(620) 및 제3 데이터 값(I)(630)을 확인할 수 있다.Referring to FIG. 6, the first data value (M) 610 and the second data value (C) in the first bug factor determination field having a start of 0 (511) and a size of 2 (512) described in FIG. 5. 620 and the third data value (I) 630 can be confirmed.

본 발명의 일 실시 예에 따라 제1 버그 인자 결정 필드에서의 제2 데이터 값(C)(620) 및 제3 데이터 값(I)(630)은 표시되어 있지 않고, 제1 데이터 값(M)(610)만 표시되어 있음을 확인할 수 있다. 도 5에서 제1 버그 인자 결정 필드(510)에 포함된 코드 라인에 포함된 명령어의 속성은 다 “cmp”(530)인 비교 명령어에 해당된다. 따라서, 제1 버그 인자 결정 필드(510)에서는 산술 명령어인 경우 프로그램이 표현할 수 있는 값의 범위를 벗어나는 값인 제3 데이터 값(I)(630)은 나올 수 없다.According to an embodiment of the present invention, the second data value (C) 620 and the third data value (I) 630 in the first bug factor determination field are not displayed, and the first data value (M) It can be seen that only 610 is displayed. In FIG. 5, an attribute of an instruction included in a code line included in the first bug factor determination field 510 corresponds to a comparison instruction that is “cmp” 530. Therefore, in the first bug factor determination field 510, in the case of an arithmetic instruction, the third data value (I) 630, which is a value outside the range that can be expressed by the program, cannot be displayed.

따라서, 제1 버그 인자 결정 필드(510)에서는 제1 데이터 값(M)(610) 또는 제2 데이터 값(C)(620)만이 나올 수 있다.Therefore, only the first data value (M) 610 or the second data value (C) 620 may appear in the first bug factor determination field 510.

구체적으로 도 5에서 오염된 인자인 “t op”가 “0”(550)이므로 제1 버그 인자 결정 필드에 포함된 코드 라인에서 오염된 인자는 “op0”이며 오염된 인자의 값은 “4d5a0000”(541)이고, 엔디안 정보가 빅 엔디안으로 이 경우 입력 데이터의 값인 “4d5a”(520)와 동일한 경우에 해당된다. 따라서, 제1 버그 인자 결정 필드(510)의 경우 도 6에서와 같이 제2 데이터 값(C)(620)은 나올 수 없고, 제1 데이터 값(M)(610)만 나올 수 있다. 도 5에서 입력 데이터의 값(520)이 오염된 인자의 값들(541)과 동일하므로 분석부는 오염되지 않은 인자(op1)의 값들인 “cc000000”, “0b010000” 및 “4d5a0000”(542)을 프로그램 실행 경로 확장과 관련된 인자의 값으로 결정할 수 있다. 또한, 제1 버그 인자 결정 필드(510)에서의 프로그램 실행 경로 확장과 관련된 인자의 주소는 제1 버그 인자 결정 필드의 시작(start)인 “0”이 된다.Specifically, since the contaminated factor “t op” in FIG. 5 is “0” (550), the contaminated factor is “op0” in the code line included in the first bug factor determination field, and the value of the contaminated factor is “4d5a0000” (541), and the endian information is the big endian, which corresponds to the case where the input data value is equal to “4d5a” 520. Therefore, in the case of the first bug factor determination field 510, as shown in FIG. 6, the second data value (C) 620 may not appear, and only the first data value (M) 610 may appear. In FIG. 5, since the input data value 520 is the same as the contaminated factor values 541, the analysis unit programs the non-contaminated factor op1 values “cc000000”, “0b010000”, and “4d5a0000” 542 It can be determined by the value of the argument related to the extension of the execution path. In addition, the address of the argument related to the program execution path extension in the first bug argument determination field 510 becomes “0”, which is the start of the first bug argument determination field.

따라서, 상술한 제1 버그 인자 결정 필드(510)에 포함된 코드 라인에서 프로그램 실행 경로 확장과 관련된 인자의 위치는 “0”(511)이 저장될 수 있고, 프로그램 실행 경로 확장과 관련된 인자의 값은 “cc000000”, “0b010000” 및 “4d5a0000”(542)가 저장될 수 있다. 프로그램 실행 경로 확장과 관련된 인자의 위치 및 값이 저장된 후 분석부는 제1 버그 인자 결정 필드(510)외에 다른 버그 인자 결정 필드가 존재하는 경우 제2 버그 인자 결정 필드를 동일한 방법으로 분석할 수 있다.Accordingly, in the code line included in the first bug argument determination field 510, the position of the argument related to the program execution path extension may be stored as “0” 511, and the value of the argument related to the program execution path extension "Cc000000", "0b010000" and "4d5a0000" (542) can be stored. After the location and value of the parameters related to the program execution path extension are stored, the analysis unit may analyze the second bug factor determination field in the same way when there are other bug factor determination fields other than the first bug factor determination field 510.

제1 버그 인자 결정 필드(510)에는 제2 데이터 값(C)(620) 및 제3 데이터 값(I)(630)이 포함되어 있지 않지만, 아래에서는 제2 데이터 값(C)(620) 및 제3 데이터 값(I)(630)을 구하는 구체적인 방법을 설명하도록 한다.The second data value (C) 620 and the third data value (I) 630 are not included in the first bug factor determination field 510, but the second data value (C) 620 and A specific method of obtaining the third data value (I) 630 will be described.

먼저 제2 데이터 값(C)(620)은 제1 버그 인자 결정 필드(510)에서와 달리 비교 명령어가 사용되었으며, 분석부는 오염된 인자의 값과 입력된 데이터의 값이 다른 경우 제2 데이터 값(C)(620)을 분석할 수 있다. 구체적으로, 오염된 인자의 값과 입력된 데이터의 값이 다른 경우 분석부는 프로그램 실행 경로를 역으로 분석하여 비교 명령어가 실행된 위치에서 처음 비교 명령어의 결과에 따라 분기된 곳에서 선택되지 않은 프로그램 실행 경로를 실행시키는 인자를 분석하고 결정할 수 있다. 상술한 인자에 해당하는 값이 제2 데이터 값(C)(620)일 수 있다.First, in the second data value (C) 620, a comparison command is used unlike the first bug factor determination field 510, and when the value of the contaminated factor is different from the value of the input data, the analysis unit uses the second data value. (C) 620 can be analyzed. Specifically, when the value of the contaminated factor and the value of the input data are different, the analysis unit analyzes the program execution path inversely and executes an unselected program at the branch where the comparison instruction was executed according to the result of the first comparison instruction. You can analyze and determine the factors that trigger the pathway. The value corresponding to the above-described factor may be the second data value (C) 620.

분석부는 상술한 프로그램 실행 경로를 역으로 분석하여 인자를 분석하는 방법을 기호 실행 방법을 이용하여 분석할 수 있다. 분석부는 프로그램의 입력 데이터에 대한 실행 경로를 분석하는 방법 중 하나인 기호 실행 방법을 이용하여 비교 명령어 실행에 대한 방정식을 생성할 수 있으며, 분석부는 생성된 방정식의 해를 산출하여 분기된 곳에서 선택되지 않은 프로그램 실행 경로를 실행시키는 인자를 결정할 수 있다. The analysis unit may analyze a method of analyzing factors by inversely analyzing the above-described program execution path using a symbol execution method. The analysis unit can generate an equation for execution of a comparison instruction using a symbol execution method, which is one of methods for analyzing an execution path for input data of a program, and the analysis unit calculates a solution of the generated equation and selects it from the branched point It is possible to determine the argument that executes an unexecuted program execution path.

본 발명의 일 실시 예에 따른 분석부는 상술한 방정식을 SMT(Satisfiability Modulo Theories) 해석기를 이용하여 방정식의 해를 구할 수 있다. 단, 상술한 SMT 해석기는 본 발명의 일 실시 예를 설명하기 위한 예시일 뿐 이에 한정되는 것은 아니며 방정식의 해를 구하는 다양한 도구들이 사용될 수 있다. 따라서, 상술한 방법에 의해 결정된 인자 값은 프로그램의 실행 경로를 확장시키는 인자의 값으로, 제2 데이터 값(C)(620)을 나타낸다.The analysis unit according to an embodiment of the present invention may obtain the solution of the equation using the above-described equation using a SMT (Satisfiability Modulo Theories) analyzer. However, the above-described SMT analyzer is only an example for explaining an embodiment of the present invention, and is not limited thereto, and various tools for solving an equation may be used. Therefore, the factor value determined by the above-described method is a factor value that expands the execution path of the program, and represents the second data value (C) 620.

산술 명령어의 결과 값이 기 설정된 경계 값을 초과하도록 만드는 인자의 값에 해당하는 제3 데이터 값(I)(630)의 분석 방법을 설명하기 위해 도 5에서의 제2 버그 인자 결정 필드를 예를 들어 설명하도록 한다.The second bug factor determination field in FIG. 5 is illustrated to describe a method of analyzing the third data value (I) 630 corresponding to the value of the factor that causes the result value of the arithmetic instruction to exceed the preset boundary value. Listen and explain.

분석부는 도 5에서의 시작이 “e4”이고 크기가 “2”인 제2 버그 인자 결정 필드에 포함된 코드 라인 중 명령어의 속성이 비교 명령어인 코드 라인에서 제1 데이터 값(M)(610) 또는 제2 데이터 값(C)(620)을 분석할 수 있다.The analysis unit is the first data value (M) 610 in the code line in which the attribute of the instruction is a comparison instruction among the code lines included in the second bug factor determination field having a start of “e4” and a size of “2” in FIG. 5. Alternatively, the second data value (C) 620 may be analyzed.

다만, 제3 데이터 값(I)(630)은 비교 명령어가 아닌 산술 명령어에 해당되는 경우의 결과 값으로, 제2 버그 인자 결정 필드에는 “sub dx, 0x14c”(530a) 명령어인 산술 명령어가 포함되어 있다. 산술 명령어가 sub인 경우 상술한 기 설정된 경계 값은 “0”이며, 기 설정된 경계 값을 초과하는 것은 “0”보다 작아지는 값을 나타낸다.However, the third data value (I) 630 is a result value when the arithmetic instruction is not a comparison instruction, and the second bug factor determination field includes an arithmetic instruction that is a “sub dx, 0x14c” (530a) instruction. It is done. When the arithmetic command is sub, the above-mentioned preset boundary value is “0”, and exceeding the preset boundary value represents a value that becomes smaller than “0”.

따라서, 분석부는 도 5에 나타난 제2 버그 인자 결정 필드에서 제3 데이터 값(I)(630)을 분석할 수 있다. 제2 버그 인자 결정 필드에 포함된 산술 명령어인 “sub dx, 0x14c”(530a)는 “dx” 레지스터에 “0x14c”를 빼서 “dx”에 저장하는 명령어에 해당된다. 상술한 산술 명령어의 결과 값(“dx” 레지스터에서 “0x14c”를 뺀 값)이 “0”보다 작아지는 값에 해당하는 인자의 값이 프로그램이 표현할 수 있는 범위를 넘어서게 하는 인자의 값에 해당한다. 따라서, 분석부는 입력 데이터의 위치를 나타내는 필드는 고정하고, 입력 데이터의 값만을 변경함으로써 상술한 프로그램이 표현할 수 있는 값의 범위를 벗어나게 하는 인자의 값을 분석할 수 있고, 분석된 인자를 프로그램 버그를 발생시키는 버그 발생 인자로 결정할 수 있다. 따라서, 결정된 버그 발생 인자의 값은 제3 데이터 값(I)(630)에 해당한다. 또한, 본 발명의 일 실시 예에 따른 분석부는 기호 실행 방법을 이용하여 상술한 버그 발생 인자를 분석하고 결정할 수 있다.Accordingly, the analysis unit may analyze the third data value (I) 630 in the second bug factor determination field shown in FIG. 5. The arithmetic instructions “sub dx, 0x14c” (530a) included in the second bug factor determination field correspond to an instruction that subtracts “0x14c” from the “dx” register and stores it in “dx”. The result value of the above-described arithmetic instruction (the value obtained by subtracting “0x14c” from the “dx” register) corresponds to the value of the argument that causes the value of the argument that is less than “0” to exceed the range that the program can express. . Therefore, the analysis unit can fix the field indicating the position of the input data, and analyze the value of the factor that deviates from the range of the value that the above-described program can express by changing only the value of the input data, and the analyzed bug is a program bug. It can be determined as a bug occurrence factor that causes. Accordingly, the determined value of the bug occurrence factor corresponds to the third data value (I) 630. In addition, the analysis unit according to an embodiment of the present invention may analyze and determine the above-described bug occurrence factor using the symbol execution method.

단, 상술한 예는 본 발명의 일 실시 예를 설명하기 위한 예시일 뿐이므로 산술 명령어에는 “sub” 명령어 이외에 다양한 산술 명령어가 포함될 수 있으며, 일 실시 예로 산술 명령어 중 “add” 또는 “mul” 명령어가 사용되는 경우 계산 결과 값이 기 설정된 경계 값을 초과하도록 만드는 산술 명령어의 인자의 값이 제3 데이터 값(I)이 될 수 있으며, 기 설정된 경계 값은 1바이트(byte) 타입의 경우 28, 2바이트 타입의 경우 216, 4바이트 타입의 경우 232 또는 8바이트 타입의 경우 264가 될 수 있으며 8바이트 타입 이상의 경우에는 더 큰 값이 해당될 수 있다. 단, 산술한 기 설정된 경계 값은 본 발명의 일 실시 예를 설명하기 위한 예시일 뿐 이에 한정되는 것은 아니다.However, the above-described example is only an example for explaining an embodiment of the present invention, and the arithmetic command may include various arithmetic commands in addition to the “sub” command. In one embodiment, among the arithmetic commands, “add” or “mul” command When is used, the value of the argument of the arithmetic instruction that causes the calculation result value to exceed the preset boundary value can be the third data value (I), and the preset boundary value is 28 for the 1-byte type. It may be 216 for a 2-byte type, 232 for a 4-byte type, or 264 for an 8-byte type, and a larger value may be applied for an 8-byte type or more. However, the pre-set boundary value is an example for explaining an embodiment of the present invention, but is not limited thereto.

따라서, 상술한 분석부는 도 5에서 제2 버그 인자 결정 필드에 포함된 각각의 코드 라인에서 제1 데이터 값(M)(610), 제2 데이터 값(C)(620) 및 제3 데이터 값(I)(630)을 저장할 수 있으며, 저장된 후 제1 버그 인자 결정 필드(510) 및 제2 버그 인자 결정 필드 외에 다른 버그 인자 결정 필드가 존재하는 경우 분석부는 상술한 방법에 의해 다른 버그 인자 결정 필드에서 제1 데이터 값(M)(610), 제2 데이터 값(C)(620) 및 제3 데이터 값(I)을 분석할 수 있다.Therefore, the above-described analysis unit in each code line included in the second bug factor determination field in FIG. 5 is the first data value (M) 610, the second data value (C) 620, and the third data value ( I) (630) can be stored, and after the other bug factor determination field other than the first bug factor determination field 510 and the second bug factor determination field, the analysis unit determines another bug factor determination field by the above-described method. In the first data value (M) 610, the second data value (C) 620 and the third data value (I) may be analyzed.

본 발명의 일 실시 예에 따라 프로그램 버그 발생 인자를 결정하는 경우 종래의 기호 실행을 이용한 방법만으로 프로그램 버그 발생 인자를 결정하는 경우보다 프로그램의 실행 속도가 향상될 수 있고, 프로그램 버그 발생 인자를 결정할 때 사용되는 메모리가 감소될 수 있으며 경로 폭발 문제 또한 완화될 수 있다. 또한, 프로그램의 버그가 특정한 값에 의해 유발되는 경우에도 탐지될 수 있으므로 프로그램이 비 정상적인 동작을 일으키거나 강제로 종료되는 현상 또한 방지될 수 있음을 보여준다.When determining a program bug generation factor according to an embodiment of the present invention, when the program bug generation factor is determined only by a method using a conventional symbol execution method, the execution speed of the program may be improved and when determining the program bug generation factor The memory used can be reduced and the route explosion problem can also be alleviated. In addition, since a bug in a program can be detected even when it is caused by a specific value, it shows that the program may cause an abnormal operation or forcibly terminate the phenomenon.

이상에서 설명한 본 발명의 실시 예를 구성하는 모든 구성요소들이 하나로 결합하거나 결합하여 동작하는 것으로 기재되어 있다고 해서, 본 발명이 반드시 이러한 실시 예에 한정되는 것은 아니다. 즉, 본 발명의 목적 범위 안에서라면, 그 모든 구성요소들이 하나 이상으로 선택적으로 결합하여 동작할 수도 있다. 또한, 그 모든 구성요소들이 각각 하나의 독립적인 하드웨어로 구현될 수 있지만, 각 구성요소들의 그 일부 또는 전부가 선택적으로 조합되어 하나 또는 복수개의 하드웨어에서 조합된 일부 또는 전부의 기능을 수행하는 프로그램 모듈을 갖는 컴퓨터 프로그램으로서 구현될 수도 있다. 또한, 이와 같은 컴퓨터 프로그램은 USB 메모리, CD 디스크, 플래쉬 메모리 등과 같은 컴퓨터가 읽을 수 있는 기록 매체(Computer Readable Media)에 저장되어 컴퓨터에 의하여 읽혀지고 실행됨으로써, 본 발명의 실시 예를 구현할 수 있다. 컴퓨터 프로그램의 기록 매체로서는 자기기록매체, 광 기록매체 등이 포함될 수 있다.Even if all the components constituting the embodiments of the present invention described above are described as being combined or operated as one, the present invention is not necessarily limited to these embodiments. That is, within the object scope of the present invention, all of the components may be selectively combined and operated. In addition, although all of the components may be implemented as one independent hardware, a part or all of the components are selectively combined to perform a combined function of some or all of functions in one or a plurality of hardware. It may be implemented as a computer program having a. In addition, such a computer program is stored in a computer readable recording medium (Computer Readable Media) such as a USB memory, CD disk, flash memory, etc., and read and executed by a computer, thereby implementing an embodiment of the present invention. The recording medium of the computer program may include a magnetic recording medium, an optical recording medium, and the like.

이상의 설명은 본 발명의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 발명의 본질적인 특성에서 벗어나지 않는 범위 내에서 다양한 수정, 변경 및 치환이 가능할 것이다. 따라서, 본 발명에 개시된 실시예 및 첨부된 도면들은 본 발명의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예 및 첨부된 도면에 의하여 본 발명의 기술 사상의 범위가 한정되는 것은 아니다. 본 발명의 보호 범위는 아래의 청구 범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 발명의 권리 범위에 포함되는 것으로 해석되어야 할 것이다.The above description is merely illustrative of the technical idea of the present invention, and those of ordinary skill in the art to which the present invention pertains may make various modifications, changes, and substitutions without departing from the essential characteristics of the present invention. will be. Therefore, the embodiments disclosed in the present invention and the accompanying drawings are not intended to limit the technical spirit of the present invention, but to explain the scope of the technical spirit of the present invention. . The scope of protection of the present invention should be interpreted by the claims below, and all technical spirits within the scope equivalent thereto should be interpreted as being included in the scope of the present invention.

100: 프로그램 버그 발생 인자 결정 장치
110: 메모리부
120: 분석부
100: program bug generation factor determination device
110: memory unit
120: analysis unit

Claims (16)

프로그램 버그와 관련된 입력 데이터가 미리 설정된 프로그램이 실행됨에 따라 프로그램 버그와 관련된 인자를 포함하면서 명령어를 실행시키는 코드가 포함된 코드 라인이 포함된 실행기록을 저장하는 단계;
상기 실행기록에 포함된 코드 라인에 포함된 메모리 상의 주소 정보가 서로 인접한 코드 라인들을 포함하는 버그 인자 결정 필드를 결정하는 단계; 및
상기 버그 인자 결정 필드에 포함된 코드 라인 각각에 포함된 명령어의 속성을 고려하여 상기 프로그램의 버그 발생과 관련된 버그 발생 인자를 결정하는 단계;를 포함하며,
상기 명령어의 속성이 비교 명령어이고,
상기 버그 발생 인자를 결정하는 단계는, 상기 버그 인자 결정 필드에 포함된 코드 라인에 포함된 상기 비교 명령어에 사용되며 상기 프로그램 버그와 관련된 인자에 해당하는 제1 인자와 상기 입력 데이터를 비교하여 상기 프로그램의 실행 경로를 확장시키는 프로그램 실행 경로 확장 인자를 결정하는 단계를 포함하며,
상기 프로그램 실행 경로 확장과 관련된 인자를 결정하는 단계는, (i) 상기 제1 인자와 상기 입력 데이터가 동일한 경우, 상기 비교 명령어에 사용되며 상기 프로그램 버그와 관련된 인자 이외의 인자에 해당하는 제2 인자를 상기 프로그램 실행 경로 확장과 관련된 인자로 결정하고, 상기 결정된 제2 인자를 상기 프로그램의 입력으로 하여 상기 프로그램 실행 경로 확장 여부를 테스트하여 상기 프로그램 실행 경로 확장 인자를 결정하고, (ii) 상기 제1 인자와 상기 입력 데이터가 다른 경우, 상기 프로그램의 실행 경로를 역으로 분석하여 상기 비교 명령어가 실행된 위치에서 상기 비교 명령어의 결과에 따라 분기된 곳에서 실행된 상기 프로그램의 실행 경로와 다른 실행 경로를 실행시키는 제3 인자를 상기 프로그램 실행 경로 확장 인자로 결정하는, 프로그램 버그 발생 인자 결정 방법.
Storing an execution record including a code line including code for executing an instruction while including an argument related to a program bug as a program in which input data related to the program bug is preset is executed;
Determining a bug factor determination field including code lines in which address information on a memory included in a code line included in the execution record includes code lines adjacent to each other; And
And determining a bug occurrence factor related to a bug occurrence of the program in consideration of an attribute of an instruction included in each code line included in the bug factor determination field.
The property of the command is a comparison command,
The determining of the bug generating factor is performed by comparing the input data with a first parameter corresponding to the parameter related to the program bug and used in the comparison instruction included in a code line included in the bug factor determining field. And determining a program execution path extension factor to expand the execution path of
The step of determining an argument related to the program execution path extension may include (i) a second argument that is used in the comparison command when the first argument and the input data are the same and corresponds to an argument other than the argument related to the program bug. Is determined as a factor related to the program execution path extension, and the program execution path extension factor is determined by testing whether the program execution path extension is performed using the determined second factor as an input of the program, and (ii) the first When the argument and the input data are different, the execution path of the program is reversely analyzed to determine an execution path different from the execution path of the program executed at a branched location according to the result of the comparison instruction at a location where the comparison instruction is executed. The program determines the third parameter to be executed as the program execution path extension factor. G bugs factor determination method.
제1항에 있어서,
상기 버그 인자 결정 필드를 결정하는 단계는,
상기 실행기록에 포함된 코드 라인에 포함된 명령어를 실행시키는데 사용된 상기 입력 데이터가 기록된 주소를 나타내는 입력 데이터 오프셋이 연속으로 이어진 코드 라인을 포함하는 버그 인자 결정 필드를 결정하는, 프로그램 버그 발생 인자 결정 방법.
According to claim 1,
The determining of the bug factor determination field may include:
A program bug generation factor that determines a bug factor determination field including a code line in which an input data offset representing the address where the input data is used to execute the instruction included in the code line included in the execution record is successively continued. How to decide.
제1항에 있어서,
상기 버그 인자 결정 필드는 상기 프로그램의 버그 발생과 관련된 버그 발생 인자의 주소 정보를 포함하는, 프로그램 버그 발생 인자 결정 방법.
According to claim 1,
The bug factor determination field includes address information of a bug occurrence factor related to a bug occurrence of the program.
제1항에 있어서,
상기 명령어의 속성이 산술 명령어이고,
상기 버그 발생 인자를 결정하는 단계는,
상기 산술 명령어의 결과 값이 기 설정된 경계 값을 초과하도록 상기 입력 데이터의 값을 변경시켜 상기 프로그램의 버그를 발생시키는 버그 발생 인자를 결정하는, 프로그램 버그 발생 인자 결정 방법.
According to claim 1,
The attribute of the instruction is an arithmetic instruction,
The step of determining the bug generating factor,
A method of determining a program bug generation factor by changing a value of the input data so that a result value of the arithmetic command exceeds a preset boundary value and determining a bug generation factor that causes a bug in the program.
제4항에 있어서,
상기 버그 발생 인자를 결정하는 단계는,
상기 산술 명령어 실행을 역으로 분석하여 상기 산술 명령어의 계산이 기호로 변환된 방정식을 생성하고, 상기 생성된 방정식으로부터 상기 산술 명령어의 결과 값이 기 설정된 경계 값을 초과하도록 만드는 인자의 값을 산출하여 상기 프로그램의 버그를 발생시키는 버그 발생 인자를 결정하는, 프로그램 버그 발생 인자 결정 방법.
According to claim 4,
The step of determining the bug generating factor,
By inversely analyzing the execution of the arithmetic command, an equation in which the calculation of the arithmetic command is converted into a symbol is generated, and from the generated equation, a value of a factor that causes a result value of the arithmetic command to exceed a preset boundary value is calculated. A method of determining a program bug occurrence factor, which determines a bug occurrence factor that causes a bug in the program.
제1항에 있어서,
상기 버그 발생 인자를 결정하는 단계는,
상기 프로그램 실행 경로 확장 인자를 이용하여 상기 프로그램의 버그 발생과 관련된 버그 발생 인자를 결정하는 단계;를 포함하는, 프로그램 버그 발생 인자 결정 방법.
According to claim 1,
The step of determining the bug generating factor,
And determining a bug occurrence factor related to a bug occurrence of the program using the program execution path extension factor.
삭제delete 제6항에 있어서,
상기 버그 발생 인자를 결정하는 단계는,
상기 프로그램 실행 경로 확장 인자를 상기 프로그램 버그와 관련된 데이터로 변환하고, 상기 변환된 데이터를 상기 프로그램의 입력으로 이용하여 전체 과정을 반복하면서 상기 프로그램의 버그 발생과 관련된 버그 발생 인자를 결정하는, 프로그램 버그 발생 인자 결정 방법.
The method of claim 6,
The step of determining the bug generating factor,
A program bug that converts the program execution path extension factor into data related to the program bug and determines the bug occurrence factor related to the bug occurrence of the program while repeating the entire process using the converted data as the input of the program. How to determine the incidence factor.
제1항에 있어서,
상기 명령어의 속성이 비교 명령어 및 산술 명령어 이외의 명령어이고,
상기 버그 발생 인자를 결정하는 단계는,
상기 버그 인자 결정 필드에 포함되며 상기 코드 라인과 다른 코드 라인에 포함된 명령어 속성을 고려하여 상기 프로그램의 버그 발생과 관련된 버그 발생 인자를 결정하는, 프로그램 버그 발생 인자 결정 방법.
According to claim 1,
The attribute of the instruction is an instruction other than a comparison instruction and an arithmetic instruction,
The step of determining the bug generating factor,
A method of determining a program bug occurrence factor, determining a bug occurrence factor related to a bug occurrence of the program in consideration of an instruction attribute included in the bug factor determination field and included in the code line and another code line.
프로그램 버그와 관련된 입력 데이터가 미리 설정된 프로그램이 실행됨에 따라 프로그램 버그와 관련된 인자를 포함하면서 명령어를 실행시키는 코드가 포함된 코드 라인을 포함하는 실행기록을 저장하는 메모리부; 및
상기 실행기록에 포함된 코드 라인에 포함된 메모리 상의 주소 정보가 서로 인접한 코드 라인들을 포함하는 버그 인자 결정 필드를 결정하고, 상기 버그 인자 결정 필드에 포함된 코드 라인 각각에 포함된 명령어의 속성을 고려하여 상기 프로그램의 버그 발생과 관련된 버그 발생 인자를 결정하는 분석부;를 포함하며,
상기 명령어의 속성이 비교 명령어이고,
상기 분석부는, 상기 버그 인자 결정 필드에 포함된 코드 라인에 포함된 상기 비교 명령어에 사용되며 상기 프로그램 버그와 관련된 인자에 해당하는 제1 인자와 상기 입력 데이터를 비교하여 상기 프로그램의 실행 경로를 확장시키는 프로그램 실행 경로 확장 인자를 결정하고, 상기 결정된 프로그램 실행 경로 확장 인자를 이용하여 상기 프로그램의 버그 발생과 관련된 버그 발생 인자를 결정하며,
상기 분석부는, (i) 상기 제1 인자와 상기 입력 데이터가 동일한 경우, 상기 비교 명령어에 사용되며 상기 프로그램 버그와 관련된 인자 이외의 인자에 해당하는 제2 인자를 상기 프로그램 실행 경로 확장과 관련된 인자로 결정하고, 상기 결정된 제2 인자를 상기 프로그램의 입력으로 하여 상기 프로그램 실행 경로 확장 여부를 테스트하여 상기 프로그램 실행 경로 확장 인자를 결정하고, (ii) 상기 제1 인자와 상기 입력 데이터가 다른 경우, 상기 프로그램의 실행 경로를 역으로 분석하여 상기 비교 명령어가 실행된 위치에서 상기 비교 명령어의 결과에 따라 분기된 곳에서 실행된 상기 프로그램의 실행 경로와 다른 실행 경로를 실행시키는 제3 인자를 상기 프로그램 실행 경로 확장 인자로 결정하는, 프로그램 버그 발생 인자 결정 장치.
A memory unit for storing an execution record including a code line including code for executing an instruction while including an argument related to a program bug as a program in which input data related to the program bug is preset is executed; And
A bug factor determination field including code lines adjacent to each other in address information included in the code line included in the execution record is determined, and an attribute of an instruction included in each code line included in the bug factor determination field is considered. Includes an analysis unit for determining a bug occurrence factor related to the occurrence of a bug in the program;
The property of the command is a comparison command,
The analysis unit expands an execution path of the program by comparing the input data with a first argument corresponding to an argument related to the program bug and used for the comparison command included in a code line included in the bug factor determination field. A program execution path extension factor is determined, and a bug generation factor related to a bug occurrence of the program is determined using the determined program execution path extension factor,
The analysis unit, (i) when the first argument and the input data are the same, is used for the comparison command, and a second argument corresponding to an argument other than an argument related to the program bug as an argument related to the extension of the program execution path Determining, determining the program execution path extension factor by testing whether the program execution path is extended using the determined second factor as an input of the program, and (ii) when the first factor and the input data are different, the The program execution path is analyzed by inversely analyzing the execution path of the program and executing a third parameter that executes a different execution path from the execution path of the program executed in a branched location according to the result of the comparison instruction at a location where the comparison instruction is executed. A device for determining a program bug occurrence factor, which is determined by an extension factor.
제10항에 있어서,
상기 분석부는,
상기 실행기록에 포함된 코드 라인에 포함된 명령어를 실행시키는데 사용된 상기 입력 데이터가 기록된 주소를 나타내는 입력 데이터 오프셋이 연속으로 이어진 코드 라인을 포함하는 버그 인자 결정 필드를 결정하는, 프로그램 버그 발생 인자 결정 장치.
The method of claim 10,
The analysis unit,
A program bug generation factor that determines a bug factor determination field including a code line in which an input data offset representing the address where the input data is used to execute the instruction included in the code line included in the execution record is successively continued. Crystal device.
제10항에 있어서,
상기 명령어의 속성이 산술 명령어이고,
상기 분석부는,
상기 산술 명령어의 결과 값이 기 설정된 경계 값을 초과하도록 상기 입력 데이터의 값을 변경시켜 상기 프로그램의 버그를 발생시키는 버그 발생 인자를 결정하는, 프로그램 버그 발생 인자 결정 장치.
The method of claim 10,
The attribute of the instruction is an arithmetic instruction,
The analysis unit,
The apparatus for determining a program bug occurrence factor by changing a value of the input data so that a result value of the arithmetic instruction exceeds a preset boundary value and determining a bug occurrence factor that causes a bug in the program.
삭제delete 제10항에 있어서,
상기 분석부는,
상기 프로그램 실행 경로 확장 인자를 상기 프로그램 버그와 관련된 데이터로 변환하고, 상기 변환된 데이터를 상기 프로그램의 입력으로 이용하여 전체 과정을 반복하면서 상기 버그 발생 인자를 결정하는, 프로그램 버그 발생 인자 결정 장치.
The method of claim 10,
The analysis unit,
And converting the program execution path extension factor into data related to the program bug, and determining the bug occurrence factor while repeating the entire process using the converted data as an input of the program.
제10항에 있어서,
상기 명령어의 속성이 비교 명령어 및 산술 명령어 이외의 명령어이고,
상기 분석부는,
상기 버그 인자 결정 필드에 포함되며 상기 코드 라인과 다른 코드 라인에 포함된 명령어 속성을 고려하여 상기 프로그램의 버그 발생과 관련된 버그 발생 인자를 결정하는, 프로그램 버그 발생 인자 결정 장치.
The method of claim 10,
The attribute of the instruction is an instruction other than a comparison instruction and an arithmetic instruction,
The analysis unit,
An apparatus for determining a program bug occurrence factor that determines a bug occurrence factor related to a bug occurrence of the program in consideration of an instruction attribute included in the bug factor determination field and included in a code line different from the code line.
컴퓨터에서 제1항 내지 제6항, 제8항, 제9항 중 어느 한 항에 따른 프로그램 버그 발생 인자 결정 방법을 실행시키기 위한 컴퓨터 판독 가능 매체에 저장된 컴퓨터 프로그램.A computer program stored in a computer readable medium for executing a method for determining a program bug occurrence factor according to any one of claims 1 to 6, 8 or 9 in a computer.
KR1020180050006A 2018-04-30 2018-04-30 Program bug development operand decision apparatus and method thereof KR102097672B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180050006A KR102097672B1 (en) 2018-04-30 2018-04-30 Program bug development operand decision apparatus and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180050006A KR102097672B1 (en) 2018-04-30 2018-04-30 Program bug development operand decision apparatus and method thereof

Publications (2)

Publication Number Publication Date
KR20190125774A KR20190125774A (en) 2019-11-07
KR102097672B1 true KR102097672B1 (en) 2020-04-06

Family

ID=68579084

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180050006A KR102097672B1 (en) 2018-04-30 2018-04-30 Program bug development operand decision apparatus and method thereof

Country Status (1)

Country Link
KR (1) KR102097672B1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101568224B1 (en) * 2014-12-26 2015-11-11 고려대학교 산학협력단 Analysis device and method for software security

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101568224B1 (en) * 2014-12-26 2015-11-11 고려대학교 산학협력단 Analysis device and method for software security

Also Published As

Publication number Publication date
KR20190125774A (en) 2019-11-07

Similar Documents

Publication Publication Date Title
KR102190727B1 (en) Apparatus and method for detecting vulnerability of software
CN102841844B (en) A kind of binary code bug excavation method based on simple and easy semiology analysis
JP7287480B2 (en) Analysis function imparting device, analysis function imparting method and analysis function imparting program
EP3264274B1 (en) Input discovery for unknown program binaries
CN109635568B (en) Concurrent vulnerability detection method based on combination of static analysis and fuzzy test
US9552284B2 (en) Determining valid inputs for an unknown binary program
KR102118236B1 (en) Operating system support for contracts
Ashouri Etherolic: a practical security analyzer for smart contracts
US20100218257A1 (en) Program obfuscation apparatus, program obfuscation method and computer readable medium
US9983975B2 (en) Fixing anti-patterns in javascript
US9176846B1 (en) Validating correctness of expression evaluation within a debugger
US11275676B2 (en) Constraint guided hybrid fuzzing test system for application programs
KR102097672B1 (en) Program bug development operand decision apparatus and method thereof
US20140089738A1 (en) System and method for identifying source of run-time execution failure
US11847207B2 (en) Security-adaptive code execution
US9710360B2 (en) Optimizing error parsing in an integrated development environment
US8806183B1 (en) Blank bit and processor instructions employing the blank bit
US20180365129A1 (en) Dynamic instrumentation based on detected errors
KR102195906B1 (en) Apparatus and Method for program analysis dynamically
Saha et al. Finding resource-release omission faults in linux
Dos Reis et al. A contract design
CN112149138B (en) Method and system for detecting program vulnerability of cryptographic algorithm and storage medium
US20180074926A1 (en) Efficient validation of transactional memory in a computer processor
EP3933632B1 (en) Verifying a correct implementation of a confidentiality and integrity policy by a software
Sun et al. Improving the Accuracy of Integer Signedness Error Detection Using Data Flow Analysis

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant