Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP6880933B2 - Program test equipment, test control method and test control program - Google Patents
[go: Go Back, main page]

JP6880933B2 - Program test equipment, test control method and test control program - Google Patents

Program test equipment, test control method and test control program Download PDF

Info

Publication number
JP6880933B2
JP6880933B2 JP2017070574A JP2017070574A JP6880933B2 JP 6880933 B2 JP6880933 B2 JP 6880933B2 JP 2017070574 A JP2017070574 A JP 2017070574A JP 2017070574 A JP2017070574 A JP 2017070574A JP 6880933 B2 JP6880933 B2 JP 6880933B2
Authority
JP
Japan
Prior art keywords
test
program
file
target program
input file
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Fee Related
Application number
JP2017070574A
Other languages
Japanese (ja)
Other versions
JP2018173748A (en
Inventor
尚 兒島
尚 兒島
昌隆 坂口
昌隆 坂口
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2017070574A priority Critical patent/JP6880933B2/en
Publication of JP2018173748A publication Critical patent/JP2018173748A/en
Application granted granted Critical
Publication of JP6880933B2 publication Critical patent/JP6880933B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Description

本発明は、プログラムテストの制御技術に関する。 The present invention relates to a control technique for program testing.

ファイルファジングによるプログラムテストでは、正常ファイルの一部を書き換えたファイルを入力してテスト対象プログラムの動作を検証する処理を繰り返す。テスト対象プログラムを実行している最中に例外処理が起きれば、変更箇所がテスト対象プログラムの脆弱性に関わる可能性がある。 In the program test by file fuzzing, the process of inputting a file in which a part of the normal file is rewritten and verifying the operation of the program to be tested is repeated. If exception handling occurs while the program under test is running, the changes may be related to the vulnerability of the program under test.

一方、所定時間が経過しても例外処理が起きない場合には、変更箇所がテスト対象プログラムの脆弱性に関わらないと想定される。但し、例外処理が起きなかったと結論付けるタイミングが問題となる。 On the other hand, if exception handling does not occur even after a predetermined time has passed, it is assumed that the changed part is not related to the vulnerability of the program under test. However, the timing to conclude that exception handling did not occur becomes a problem.

早いタイミングでタイムアウトすると、例外処理の発生を見逃すかもしれない。一方、タイムアウトのタイミングが遅すぎると、テストに要する時間が無駄に長くなる。 If you time out early, you may miss the exception handling. On the other hand, if the timeout timing is too late, the test time will be unnecessarily long.

特開2009−116847号公報JP-A-2009-116847 特表2016−530587号公報Special Table 2016-530587

本発明の目的は、一側面では、入力ファイルにおける変更範囲に応じたタイミングでプログラムテストを終わらせるようにすることである。 An object of the present invention is, on the one hand, to end a program test at a timing according to a change range in an input file.

一態様に係るプログラムテスト装置は、(A)ファイルファジングによるプログラムテストに供される入力ファイルの変更箇所がテスト対象プログラムによって読み込まれたことを検出する検出部と、(B)変更箇所がテスト対象プログラムによって読み込まれたことを検出した時点に基づいて決定したタイミングで、テスト対象プログラムの動作を終了させる停止部とを有する。 In the program test apparatus according to one aspect, (A) a detection unit that detects that a changed part of an input file used for a program test by file fuzzing has been read by a program to be tested, and (B) a changed part is a test target. It has a stop unit that terminates the operation of the program to be tested at a timing determined based on the time when it is detected that the program has been read.

一側面としては、入力ファイルにおける変更範囲に応じたタイミングでプログラムテストを終わらせることができる。 On the one hand, the program test can be completed at the timing according to the change range in the input file.

図1は、オリジナルファイルの例を示す図である。FIG. 1 is a diagram showing an example of an original file. 図2は、入力ファイルの例を示す図である。FIG. 2 is a diagram showing an example of an input file. 図3は、入力ファイルの例を示す図である。FIG. 3 is a diagram showing an example of an input file. 図4は、例外処理の実行を検出する場合のシーケンスを示す図である。FIG. 4 is a diagram showing a sequence when the execution of exception handling is detected. 図5は、入力ファイルのクローズを検出する場合のシーケンスを示す図である。FIG. 5 is a diagram showing a sequence when detecting the closing of the input file. 図6は、タイムアウトを検出する場合のシーケンスを示す図である。FIG. 6 is a diagram showing a sequence when a timeout is detected. 図7は、変更箇所の読み込みを検出する場合のシーケンスを示す図である。FIG. 7 is a diagram showing a sequence when the reading of the changed portion is detected. 図8は、プログラムテスト装置のモジュール構成例を示す図である。FIG. 8 is a diagram showing a module configuration example of the program test device. 図9は、監視結果テーブルの例を示す図である。FIG. 9 is a diagram showing an example of a monitoring result table. 図10は、テスト仕様データの例を示す図である。FIG. 10 is a diagram showing an example of test specification data. 図11は、テスト結果テーブルの例を示す図である。FIG. 11 is a diagram showing an example of a test result table. 図12は、メイン処理フローを示す図である。FIG. 12 is a diagram showing a main processing flow. 図13は、入力ファイル生成処理フローを示す図である。FIG. 13 is a diagram showing an input file generation processing flow. 図14は、メイン処理フローを示す図である。FIG. 14 is a diagram showing a main processing flow. 図15は、コンピュータの機能ブロック図である。FIG. 15 is a functional block diagram of the computer.

まず、ファイルファジングによるプログラムテストに供される入力ファイルの基礎となるオリジナルファイルについて説明する。図1に、オリジナルファイル101の例を示す。オリジナルファイル101は、例えばテスト対象プログラムである画像ビューワに読み込まれる画像ファイルである。オリジナルファイル101は、公開されている画像ファイルの仕様に従っている。つまり、オリジナルファイル101は、正常なファイルである。 First, the original file that is the basis of the input file used for the program test by file fuzzing will be described. FIG. 1 shows an example of the original file 101. The original file 101 is, for example, an image file read into an image viewer, which is a program to be tested. The original file 101 conforms to the specifications of the published image file. That is, the original file 101 is a normal file.

この例におけるオリジナルファイル101は、ヘッダ及び本体を含んでいる。ヘッダに含まれるオフセット0x0000000A乃至0x0000000Dに格納されているコード(0x0049492A)は、本体の先頭オフセットを指すポインタである。テスト対象プログラムは、このポインタに基づいて本体のデータを取得する。尚、この例におけるオフセットは、ファイルの先頭位置を基準(0x00000000)とする相対的なアドレスである。 The original file 101 in this example includes a header and a body. The code (0x0049492A) stored in the offsets 0x0000000000A to 0x0000000000D included in the header is a pointer pointing to the start offset of the main body. The test target program acquires the data of the main body based on this pointer. The offset in this example is a relative address based on the start position of the file (0x00000000000).

テストにおいてテスト対象プログラムに引き渡される入力ファイルは、このようなオリジナルファイル101の一部を変更することによって生成される。入力ファイルをテストファイルということもある。 The input file passed to the program under test in the test is generated by modifying a part of such an original file 101. The input file is sometimes called a test file.

図2に、入力ファイル201の例を示す。1回目に生成される入力ファイル201aにおける変更範囲は、オフセット0x00000000乃至0x00000003である。変更範囲には、置換コード0xFFFFFFFFが設定される。 FIG. 2 shows an example of the input file 201. The range of change in the input file 201a generated for the first time is an offset of 0x00000000000 to 0x00000003. The replacement code 0xFFFFFFFF is set in the change range.

変更範囲は、順次1バイト後方へスライドする。従って、2回目に生成される入力ファイル201bにおける変更範囲は、オフセット0x00000001乃至0x00000004である。3回目に生成される入力ファイル201cにおける変更範囲は、オフセット0x00000002乃至0x00000005である。いずれの場合にも、変更範囲に置換コード0xFFFFFFFFが設定される。 The change range slides backward by 1 byte in sequence. Therefore, the range of change in the input file 201b generated for the second time is an offset of 0x00000001 to 0x00000004. The range of change in the input file 201c generated the third time is an offset of 0x00000002 to 0x00000005. In either case, the replacement code 0xFFFFFFFF is set in the change range.

図3に示すように、8回目に生成される入力ファイル201hにおける変更範囲は、オフセット0x00000007乃至0x0000000Aである。従って、上述したポインタの一部が書き換えられることになる。入力ファイル201hを用いるテストでは、テスト対象プログラムが本体のデータを取得する際に正しく動作せず、例外処理が実行される。 As shown in FIG. 3, the change range in the input file 201h generated for the eighth time is an offset of 0x00000007 to 0x0000000000A. Therefore, a part of the pointer described above is rewritten. In the test using the input file 201h, the program to be tested does not operate correctly when acquiring the data of the main body, and exception handling is executed.

例外処理が実行されれば異常動作が発生したものと看做す。この場合には、当該変更範囲が脆弱性に関わる可能性があると推察される。一方、例外処理が実行されない場合には、正常に動作したものと看做す。従来技術では、テスト対象プログラムを起動してから所定時間が経過した時点で、例外処理が実行されなかったと判断してその回のテストを終える。つまり、タイムアウトによってテスト対象プログラムを停止させ、次回のテストに移る。 If exception handling is executed, it is considered that an abnormal operation has occurred. In this case, it is presumed that the scope of the change may be related to the vulnerability. On the other hand, if exception handling is not executed, it is considered to have operated normally. In the prior art, when a predetermined time elapses after starting the program to be tested, it is determined that the exception handling has not been executed, and the test at that time is completed. In other words, the program under test is stopped by the timeout and the next test is started.

このようにファイルファジングでは、変更範囲が異なる入力ファイル201を用いてテストを繰り返すので、人為的には予測し難い脆弱性を検出し易くなる。 In this way, in file fuzzing, since the test is repeated using the input files 201 having different change ranges, it becomes easy to detect a vulnerability that is difficult to predict artificially.

但し、入力ファイル201における変更箇所が読み出されるタイミングは、変更箇所のオフセットによって異なる。例えば、或る範囲のデータは、早いタイミングで読み出され、別の範囲のデータは、遅いタイミングで読み出される。つまり、変更箇所が読み込まれるタイミングは、入力ファイル201毎に異なる。従って、繰り返されるテストにおいてタイムアウトの基準を一律に定めることは必ずしも妥当でない。或る入力ファイル201を用いるテストでは変更箇所が読み込まれた後も無駄にテストが継続され、別の入力ファイル201を用いるテストでは変更箇所が読み込まれる前にテストが打ち切られるような事態も想定される。つまり、一律に定めたタイムアウトの基準が短い場合には正しく検証が行われないケースが増え、同じくタイムアウトの基準が長い場合にはテストの効率が悪くなるという問題がある。 However, the timing at which the changed portion in the input file 201 is read differs depending on the offset of the changed portion. For example, a range of data is read at an early timing and another range of data is read at a late timing. That is, the timing at which the changed part is read differs for each input file 201. Therefore, it is not always appropriate to set a uniform time-out criterion for repeated tests. In the test using one input file 201, the test is uselessly continued even after the changed part is read, and in the test using another input file 201, the test may be terminated before the changed part is read. File. That is, if the uniformly set timeout standard is short, the verification is not performed correctly in many cases, and if the timeout standard is long, the test efficiency is deteriorated.

尚、画像ファイルを画像ビューワに読み込ませるテストでは、画像が表示された時点でデータの読み込みが完了したことを把握できるので、準備段階でテスト対象プログラムの挙動を分析することによってタイムアウトの基準を設定し易い。一方、出力を伴わない処理に用いられるデータについては、そのデータを用いる処理が完了した時点を外観として把握できないので、テスト対象プログラムの挙動によってタイムアウトの基準を定めることが難しいという問題もある。 In the test of loading the image file into the image viewer, it is possible to know that the data loading is completed when the image is displayed, so the timeout standard is set by analyzing the behavior of the program under test at the preparation stage. Easy to do. On the other hand, for data used for processing that does not involve output, there is also a problem that it is difficult to determine a timeout standard depending on the behavior of the program to be tested because the time when the processing using the data is completed cannot be grasped as an appearance.

ここでは、仕様が公開されている明示的ファイルの例を示したが、仕様が公開されていない暗黙的ファイルに本実施の形態を適用するようにしてもよい。また、ファイルファジングによるテストに供されるオリジナルファイル101及び入力ファイル201は、画像ファイルに限らない。他の形式のファイルがファイルファジングによるプログラムテストに供される場合もある。尚、上述した変更を変異といい、変更箇所と変異箇所といい、変更範囲を変異範囲ということもある。 Here, an example of an explicit file whose specifications are published is shown, but the present embodiment may be applied to an implicit file whose specifications are not published. Further, the original file 101 and the input file 201 used for the test by file fuzzing are not limited to the image file. Files in other formats may be used for program testing by file fuzzing. The above-mentioned changes are called mutations, change points and mutation points, and the change range may be referred to as a mutation range.

本実施の形態では、ファイルファジングによるプログラムテストを行うテスト制御部において1つの異常判定と3つの正常判定とのうちのいずれかを得る。つまり、テスト結果は、4つに分類される。以下、各テスト結果を得る場合のシーケンスについて説明する。 In the present embodiment, one of one abnormality determination and three normal determinations is obtained in the test control unit that performs the program test by file fuzzing. That is, the test results are classified into four. The sequence for obtaining each test result will be described below.

まず、図4を用いて、テスト対象プログラム407における例外処理の実行を検出する場合のシーケンスについて説明する。例外処理が実行された場合に、テスト制御部401は、入力ファイル201を用いる処理によって異常が起きたと判断する。 First, with reference to FIG. 4, a sequence in which the execution of exception handling in the test target program 407 is detected will be described. When the exception handling is executed, the test control unit 401 determines that an abnormality has occurred due to the processing using the input file 201.

テスト制御部401は、オリジナルファイル記憶部403に記憶されているオリジナルファイル101に基づいて入力ファイル201を生成する(S421)。生成された入力ファイル201は入力ファイル記憶部405に記憶される。そして、テスト制御部401は、テスト対象プログラム407を起動する(S423)。 The test control unit 401 generates the input file 201 based on the original file 101 stored in the original file storage unit 403 (S421). The generated input file 201 is stored in the input file storage unit 405. Then, the test control unit 401 starts the test target program 407 (S423).

テスト対象プログラム407は、動作中に入力ファイル201をオープンする(S425)。そして、テスト対象プログラム407は、入力ファイル201のデータを読み込む動作を繰り返す(S427乃至S431)。読み込まれる範囲は、同一であるとは限らない。 The test target program 407 opens the input file 201 during operation (S425). Then, the test target program 407 repeats the operation of reading the data of the input file 201 (S427 to S431). The range to be read is not always the same.

この例では、S431においてデータが読み込まれた後に、テスト対象プログラム407が例外処理を実行するものとする(S433)。テスト制御部401は、例外処理が実行されたことを検出すると(S435)、テスト対象プログラム407を強制終了させる(S437)。そして、テスト制御部401は、テスト結果をテスト結果記憶部409に書き込む(S439)。この例におけるテスト結果は、例外処理の実行を検出したことによる異常判定であることを示す。そして、テスト制御部401は、入力ファイル201を削除して(S441)、次のテストに移る。 In this example, it is assumed that the test target program 407 executes exception handling after the data is read in S431 (S433). When the test control unit 401 detects that the exception handling has been executed (S435), the test control unit 401 forcibly terminates the test target program 407 (S437). Then, the test control unit 401 writes the test result in the test result storage unit 409 (S439). The test result in this example indicates that the abnormality is determined by detecting the execution of exception handling. Then, the test control unit 401 deletes the input file 201 (S441) and moves on to the next test.

続いて、図5を用いて入力ファイル201のクローズを検出する場合のシーケンスについて説明する。本実施の形態では、入力ファイル201がクローズされた時点で、テスト制御部401は、当該入力ファイル201を用いる処理が正常であったものと判断する。 Subsequently, a sequence for detecting the closing of the input file 201 will be described with reference to FIG. In the present embodiment, when the input file 201 is closed, the test control unit 401 determines that the process using the input file 201 is normal.

テスト制御部401は、オリジナルファイル記憶部403に記憶されているオリジナルファイル101に基づいて入力ファイル201を生成する(S501)。生成された入力ファイル201は入力ファイル記憶部405に記憶される。そして、テスト制御部401は、テスト対象プログラム407を起動する(S503)。 The test control unit 401 generates the input file 201 based on the original file 101 stored in the original file storage unit 403 (S501). The generated input file 201 is stored in the input file storage unit 405. Then, the test control unit 401 starts the test target program 407 (S503).

テスト対象プログラム407は、動作中に入力ファイル201をオープンする(S505)。そして、テスト対象プログラム407は、入力ファイル201のデータを読み込む動作を繰り返す(S507乃至S511)。この間に、例外処理は行われないものとする。そして、テスト対象プログラム407は、入力ファイル201をクローズする(S513)。 The test target program 407 opens the input file 201 during operation (S505). Then, the test target program 407 repeats the operation of reading the data of the input file 201 (S507 to S511). During this time, exception handling shall not be performed. Then, the test target program 407 closes the input file 201 (S513).

テスト制御部401は、入力ファイル201がクローズされたことを検出すると(S515)、テスト対象プログラム407を強制終了させる(S517)。そして、テスト制御部401は、テスト結果をテスト結果記憶部409に書き込む(S519)。この例におけるテスト結果は、入力ファイル201のクローズを検出したことによる正常判定であることを示す。そして、テスト制御部401は、入力ファイル201を削除して(S521)、次のテストに移る。 When the test control unit 401 detects that the input file 201 has been closed (S515), the test control unit 401 forcibly terminates the test target program 407 (S517). Then, the test control unit 401 writes the test result in the test result storage unit 409 (S519). The test result in this example indicates that it is a normal judgment by detecting the closing of the input file 201. Then, the test control unit 401 deletes the input file 201 (S521) and moves on to the next test.

続いて、図6を用いてタイムアウトを検出する場合のシーケンスについて説明する。本実施の形態では、テスト対象プログラム407が起動された時点からの経過時間が上限を超えると、テスト制御部401は、当該入力ファイル201を用いる処理が正常であったものと判断する。 Subsequently, a sequence in which a timeout is detected will be described with reference to FIG. In the present embodiment, when the elapsed time from the time when the test target program 407 is started exceeds the upper limit, the test control unit 401 determines that the process using the input file 201 is normal.

テスト制御部401は、オリジナルファイル記憶部403に記憶されているオリジナルファイル101に基づいて入力ファイル201を生成する(S601)。生成された入力ファイル201は入力ファイル記憶部405に記憶される。そして、テスト制御部401は、テスト対象プログラム407を起動する(S603)。 The test control unit 401 generates the input file 201 based on the original file 101 stored in the original file storage unit 403 (S601). The generated input file 201 is stored in the input file storage unit 405. Then, the test control unit 401 starts the test target program 407 (S603).

テスト対象プログラム407は、動作中に入力ファイル201をオープンする(S605)。そして、テスト対象プログラム407は、入力ファイル201のデータを読み込む動作を繰り返す(S607乃至S613)。この間に、例外処理は行われないものとする。 The test target program 407 opens the input file 201 during operation (S605). Then, the test target program 407 repeats the operation of reading the data of the input file 201 (S607 to S613). During this time, exception handling shall not be performed.

この例では、S613におけるデータ読み込みを終えた時点でテスト対象プログラム407の実行時間が上限を超え、テスト制御部401がタイムアウトを検出する(S615)。 In this example, when the data reading in S613 is completed, the execution time of the test target program 407 exceeds the upper limit, and the test control unit 401 detects a timeout (S615).

テスト制御部401は、タイムアウトを検出すると、テスト対象プログラム407を強制終了させる(S617)。そして、テスト制御部401は、テスト結果をテスト結果記憶部409に書き込む(S619)。この例におけるテスト結果は、タイムアウトを検出したことによる正常判定であることを示す。そして、テスト制御部401は、入力ファイル201を削除して(S621)、次のテストに移る。 When the test control unit 401 detects a timeout, the test target program 407 is forcibly terminated (S617). Then, the test control unit 401 writes the test result in the test result storage unit 409 (S619). The test result in this example indicates that it is a normal judgment by detecting a timeout. Then, the test control unit 401 deletes the input file 201 (S621) and moves on to the next test.

続いて、図7を用いて変更箇所の読み込みを検出する場合のシーケンスについて説明する。本実施の形態では、入力ファイル201における変更箇所が読み込まれた時点から所定時間(以下、観察時間という。)が経過するまでに例外処理が実行されなければ、テスト制御部401は、当該入力ファイル201を用いる処理が正常であったものと判断する。 Subsequently, a sequence in the case of detecting the reading of the changed portion will be described with reference to FIG. 7. In the present embodiment, if the exception processing is not executed from the time when the changed part in the input file 201 is read to the time when a predetermined time (hereinafter referred to as observation time) elapses, the test control unit 401 uses the input file. It is determined that the process using 201 was normal.

テスト制御部401は、オリジナルファイル記憶部403に記憶されているオリジナルファイル101に基づいて入力ファイル201を生成する(S701)。生成された入力ファイル201は入力ファイル記憶部405に記憶される。そして、テスト制御部401は、テスト対象プログラム407を起動する(S703)。 The test control unit 401 generates the input file 201 based on the original file 101 stored in the original file storage unit 403 (S701). The generated input file 201 is stored in the input file storage unit 405. Then, the test control unit 401 starts the test target program 407 (S703).

テスト対象プログラム407は、動作中に入力ファイル201をオープンする(S705)。そして、テスト対象プログラム407は、入力ファイル201のデータを読み込む動作を繰り返す(S707及びS709)。この例では、S709において変更箇所が読み込まれたものとする。尚、テスト制御部401は、変更範囲の一部又は全部が読取範囲と重複する場合に入力ファイル201における変更箇所が読み込まれたものと判定する。 The test target program 407 opens the input file 201 during operation (S705). Then, the test target program 407 repeats the operation of reading the data of the input file 201 (S707 and S709). In this example, it is assumed that the changed part is read in S709. The test control unit 401 determines that the changed part in the input file 201 has been read when a part or all of the changed range overlaps with the reading range.

テスト制御部401は、変更箇所の読み込みを検出した後(S711)、観察時間内において例外処理が実行されるか否かを判定する。観察時間内において例外処理の実行を検出した場合には、上述した図4に示したシーケンスの場合と同様に処理される。 After detecting the reading of the changed portion (S711), the test control unit 401 determines whether or not the exception handling is executed within the observation time. When the execution of the exception processing is detected within the observation time, the processing is performed in the same manner as in the case of the sequence shown in FIG. 4 described above.

テスト制御部401は、例外処理が実行されないまま観察時間が経過したと判定すると(S713)、テスト対象プログラム407を強制終了させる(S715)。そして、テスト制御部401は、テスト結果をテスト結果記憶部409に書き込む(S717)。この例におけるテスト結果は、変更箇所の読み込みによる正常判定であることを示す。そして、テスト制御部401は、入力ファイル201を削除して(S719)、次のテストに移る。以上で本実施の形態における概要の説明を終える。 When the test control unit 401 determines that the observation time has elapsed without executing the exception processing (S713), the test control unit 401 forcibly terminates the test target program 407 (S715). Then, the test control unit 401 writes the test result in the test result storage unit 409 (S717). The test result in this example shows that it is a normal judgment by reading the changed part. Then, the test control unit 401 deletes the input file 201 (S719) and moves on to the next test. This is the end of the outline of the present embodiment.

以下、プログラムテスト装置800の動作について説明する。図8に、プログラムテスト装置800のモジュール構成例を示す。プログラムテスト装置800は、上述したテスト制御部401、オリジナルファイル記憶部403、入力ファイル記憶部405、テスト対象プログラム407及びテスト結果記憶部409の他に、OS(オペレーティングシステム)801、監視部805、監視結果記憶部807及びテスト仕様記憶部809を有する。 The operation of the program test apparatus 800 will be described below. FIG. 8 shows a module configuration example of the program test apparatus 800. The program test device 800 includes an OS (operating system) 801 and a monitoring unit 805, in addition to the test control unit 401, the original file storage unit 403, the input file storage unit 405, the test target program 407, and the test result storage unit 409 described above. It has a monitoring result storage unit 807 and a test specification storage unit 809.

テスト制御部401は、ファイルファジングによるプログラムテストを制御する。オリジナルファイル記憶部403は、オリジナルファイル101を記憶する。具体的には、オリジナルファイル記憶部403は、オリジナルファイル101のパスによって特定される。入力ファイル記憶部405は、入力ファイル201を記憶する。具体的には、入力ファイル記憶部405は、入力ファイル201のパスによって特定される。テスト結果記憶部409は、テスト結果テーブルを記憶する。テスト結果テーブルについては、図11を用いて後述する。 The test control unit 401 controls the program test by file fuzzing. The original file storage unit 403 stores the original file 101. Specifically, the original file storage unit 403 is specified by the path of the original file 101. The input file storage unit 405 stores the input file 201. Specifically, the input file storage unit 405 is specified by the path of the input file 201. The test result storage unit 409 stores the test result table. The test result table will be described later with reference to FIG.

OS801は、ファイルシステム803を含んでいる。ファイルシステム803は、ファイル操作を実行する。監視部805は、ファイルシステム803におけるファイル操作を監視する。監視結果記憶部807は、監視結果テーブルを記憶する。監視結果テーブルは、監視部805による監視結果として、ファイルシステム803におけるファイル操作の内容を記録する。監視結果テーブルについては、図9を用いて後述する。テスト仕様記憶部809は、テスト仕様データを記憶する。テスト仕様データについては、図10を用いて後述する。 OS801 includes a file system 803. File system 803 performs file operations. The monitoring unit 805 monitors the file operation in the file system 803. The monitoring result storage unit 807 stores the monitoring result table. The monitoring result table records the contents of the file operation in the file system 803 as the monitoring result by the monitoring unit 805. The monitoring result table will be described later with reference to FIG. The test specification storage unit 809 stores the test specification data. The test specification data will be described later with reference to FIG.

また、テスト制御部401は、生成部821、起動部823、第1検出部825、第2検出部827、第3検出部829、第4検出部831、停止部833、記録処理部835、削除部837及び判定部839を有する。 Further, the test control unit 401 deletes the generation unit 821, the start unit 823, the first detection unit 825, the second detection unit 827, the third detection unit 829, the fourth detection unit 831, the stop unit 833, and the recording processing unit 835. It has a unit 837 and a determination unit 839.

生成部821は、オリジナルファイル101に基づいて入力ファイル201を生成する。起動部823は、テスト対象プログラム407を起動する。第1検出部825は、テスト対象プログラム407における例外処理の実行を検出する。第2検出部827は、入力ファイル201のクローズを検出する。第3検出部829は、タイムアウトを検出する。第4検出部831は、入力ファイル201における変更箇所の読み込みを検出する。停止部833は、テスト対象プログラム407の動作を停止させる。具体的には、停止部833は、テスト対象プログラム407のプロセスを強制終了させる。記録処理部835は、テスト結果を記録する。削除部837は、入力ファイル201を削除する。判定部839は、入力ファイル201における変更箇所が読み込まれた時点から観察時間が過ぎたか否かを判定する。 The generation unit 821 generates the input file 201 based on the original file 101. The start-up unit 823 starts the test target program 407. The first detection unit 825 detects the execution of the exception handling in the test target program 407. The second detection unit 827 detects the closing of the input file 201. The third detection unit 829 detects the timeout. The fourth detection unit 831 detects the reading of the changed part in the input file 201. The stop unit 833 stops the operation of the test target program 407. Specifically, the stop unit 833 forcibly terminates the process of the test target program 407. The recording processing unit 835 records the test result. The deletion unit 837 deletes the input file 201. The determination unit 839 determines whether or not the observation time has passed since the changed portion in the input file 201 was read.

上述したテスト制御部401、監視部805、生成部821、起動部823、第1検出部825、第2検出部827、第3検出部829、第4検出部831、停止部833、記録処理部835、削除部837及び判定部839は、ハードウエア資源(例えば、図15)と、以下で述べる処理をプロセッサに実行させるプログラムとを用いて実現される。 Test control unit 401, monitoring unit 805, generation unit 821, start unit 823, first detection unit 825, second detection unit 827, third detection unit 829, fourth detection unit 831, stop unit 833, recording processing unit. The 835, the deletion unit 837, and the determination unit 839 are realized by using a hardware resource (for example, FIG. 15) and a program that causes the processor to execute the processing described below.

上述したオリジナルファイル記憶部403、入力ファイル記憶部405、テスト結果記憶部409、監視結果記憶部807及びテスト仕様記憶部809は、ハードウエア資源(例えば、図15)を用いて実現される。 The original file storage unit 403, the input file storage unit 405, the test result storage unit 409, the monitoring result storage unit 807, and the test specification storage unit 809 described above are realized by using hardware resources (for example, FIG. 15).

図9に、監視結果テーブルの例を示す。この例における監視結果テーブルは、ファイル操作に対応するレコードを有している。監視結果テーブルのレコードは、プロセス名が格納されるフィールドと、ファイルパスが格納されるフィールドと、操作種別が格納されるフィールドと、先頭オフセットが格納されるフィールドと、サイズ(バイト)が格納されるフィールドとを有している。 FIG. 9 shows an example of the monitoring result table. The monitoring result table in this example has records corresponding to file operations. The record of the monitoring result table stores the field where the process name is stored, the field where the file path is stored, the field where the operation type is stored, the field where the start offset is stored, and the size (bytes). Has a field.

プロセス名は、OS801のファイルシステム803に対してファイル操作を要求したプロセスを特定する。ファイルパスは、ファイルシステム803における操作対象であるファイルが格納されている場所及び当該ファイル名を特定する。操作種別は、ファイル操作の種別を特定する。アクセス範囲は、ファイルリードにおいて読み込まれたデータの範囲及びファイルライトにおいて書き込まれたデータの範囲を特定する。具体的には、アクセス範囲は、先頭オフセット及びサイズによって特定される。 The process name identifies the process that requested the file operation from the file system 803 of OS801. The file path specifies the location where the file to be operated in the file system 803 is stored and the file name. The operation type specifies the type of file operation. The access range specifies the range of data read in file read and the range of data written in file write. Specifically, the access range is specified by the head offset and size.

図10に、テスト仕様データの例を示す。この例におけるテスト仕様データは、テスト仕様に関する項目を含んでいる。具体的には、テスト対象プログラム407のパスが格納されるフィールドと、入力ファイル201のパスが格納されるフィールドと、テスト時間の上限(ms)が格納されるフィールドと、観察時間(ms)が格納されるフィールドと、オリジナルファイル101のパスが格納されるフィールドと、変更サイズ(バイト)が格納されるフィールドと、置換コードが格納されるフィールドと、シフトサイズ(バイト)が格納されるフィールドとを有している。 FIG. 10 shows an example of test specification data. The test specification data in this example includes items related to the test specification. Specifically, the field where the path of the test target program 407 is stored, the field where the path of the input file 201 is stored, the field where the upper limit (ms) of the test time is stored, and the observation time (ms) are. A field to be stored, a field to store the path of the original file 101, a field to store the change size (bytes), a field to store the replacement code, and a field to store the shift size (bytes). have.

テスト対象プログラム407のパスは、テスト対象プログラム407が格納されている場所及びテスト対象プログラム407の名前を特定する。入力ファイル201のパスは、入力ファイル201が格納される場所及び入力ファイル201の名前を特定する。テスト時間の上限は、タイムアウトの基準である。観察時間は、変更箇所の読み込みを検出した後に例外処理が実行されるか否かを判定する期間の長さである。オリジナルファイル101のパスは、オリジナルファイル101が格納されている場所及びオリジナルファイル101の名前を特定する。変更サイズは、変更範囲のデータ長である。置換コードは、変更範囲に設定されるコードである。つまり、変更箇所の内容である。シフトサイズは、入力ファイル201を生成する度に変更範囲をシフトする幅である。 The path of the test target program 407 specifies the location where the test target program 407 is stored and the name of the test target program 407. The path of the input file 201 specifies the location where the input file 201 is stored and the name of the input file 201. The upper limit of test time is a criterion for timeout. The observation time is the length of the period for determining whether or not exception handling is executed after detecting the reading of the changed part. The path of the original file 101 specifies the location where the original file 101 is stored and the name of the original file 101. The change size is the data length of the change range. The replacement code is a code set in the change range. That is, it is the content of the changed part. The shift size is the width at which the change range is shifted each time the input file 201 is generated.

図11に、テスト結果テーブルの例を示す。この例におけるテスト結果テーブルは、各回のテストに対応するレコードを有している。テスト結果テーブルのレコードは、回番号が格納されるフィールドと、先頭オフセットが格納されるフィールドと、サイズ(バイト)が格納されるフィールドと、テスト結果が格納されるフィールドと、現象が格納されるフィールドと、実行オフセットが格納されるフィールドとを有している。 FIG. 11 shows an example of a test result table. The test result table in this example has a record corresponding to each test. The record of the test result table stores the field where the time number is stored, the field where the start offset is stored, the field where the size (bytes) is stored, the field where the test result is stored, and the phenomenon. It has a field and a field in which the execution offset is stored.

回番号は、テストの回を特定する。変更範囲は、当該回の入力ファイル201における変更箇所を特定する。この例における変更範囲は、先頭オフセット及びサイズによって特定される。テスト結果には、例外処理の実行の検出に基づく異常判定である旨のコード、クローズの検出に基づく正常判定である旨のコード、タイムアウトの検出に基づく正常判定である旨のコード又は変更箇所の読み込みに基づく正常判定である旨のコードのいずれかである。テスト結果が例外処理の実行の検出に基づく異常判定である旨のコードである場合には、詳細に係るデータとして、現象のフィールドに例外処理の内容が格納され、実行オフセットのフィールドには実行された例外処理の命令コードのオフセットが格納される。尚、詳細に係るデータは省略するようにしてもよい。 The times number identifies the test times. The change range specifies the changed part in the input file 201 of the time. The range of change in this example is specified by the head offset and size. The test results include a code indicating that the judgment is abnormal based on the detection of exception handling execution, a code indicating that the judgment is normal based on the detection of closing, and a code indicating that the judgment is normal based on the detection of timeout, or changes. It is one of the codes indicating that it is a normal judgment based on reading. If the test result is a code indicating that the error judgment is based on the detection of execution of exception handling, the content of exception handling is stored in the phenomenon field and executed in the execution offset field as detailed data. The offset of the instruction code for exception handling is stored. The detailed data may be omitted.

続いて、テスト制御部401におけるメイン処理について説明する。図12に、メイン処理フローを示す。生成部821は、入力ファイル生成処理を実行する(S1201)。 Subsequently, the main processing in the test control unit 401 will be described. FIG. 12 shows the main processing flow. The generation unit 821 executes the input file generation process (S1201).

図13に、入力ファイル生成処理フローを示す。生成部821は、変更範囲の先頭オフセットを特定する(S1301)。1回目の入力ファイル生成処理における変更範囲の先頭オフセットは、0x00000000である。生成部821は、入力ファイル生成処理の度、前回の先頭オフセットに1を加算して、当回の先頭オフセットを特定する。 FIG. 13 shows an input file generation processing flow. The generation unit 821 specifies the start offset of the change range (S1301). The start offset of the change range in the first input file generation process is 0x00000000000. The generation unit 821 adds 1 to the previous start offset each time the input file is generated, and specifies the start offset of the current time.

生成部821は、オリジナルファイル記憶部403に記憶されているオリジナルファイル101のコピーを入力ファイル記憶部405に作成する(S1303)。生成部821は、コピーファイルにおける変更範囲のコードを置換コードに変換する(S1305)。生成部821は、テスト結果テーブルに新たなレコードを設け、変更範囲を設定する(S1307)。そして、生成部821が入力ファイル生成処理を終えると、呼び出し元のメイン処理に復帰する。 The generation unit 821 creates a copy of the original file 101 stored in the original file storage unit 403 in the input file storage unit 405 (S1303). The generation unit 821 converts the code of the change range in the copy file into a replacement code (S1305). The generation unit 821 sets a new record in the test result table and sets the change range (S1307). Then, when the generation unit 821 finishes the input file generation process, it returns to the main process of the caller.

図12の説明に戻る。起動部823は、テスト対象プログラム407を起動する(S1203)。起動部823は、引数で入力ファイル201のパスをテスト対象プログラム407に渡すようにしてもよい。 Returning to the description of FIG. The activation unit 823 activates the test target program 407 (S1203). The activation unit 823 may pass the path of the input file 201 to the test target program 407 as an argument.

第1検出部825は、例外処理の実行を検出したか否かによって処理を分岐させる(S1205)。具体的には、テスト対象プログラム407が例外処理を実行すると、第1検出部825はOS801からテスト対象プログラム407が例外処理を実行した旨の通知を受ける。第1検出部825は、当該通知を受けた場合に例外処理の実行を検出したと判定する。 The first detection unit 825 branches the processing depending on whether or not the execution of the exception processing is detected (S1205). Specifically, when the test target program 407 executes the exception handling, the first detection unit 825 receives a notification from the OS 801 that the test target program 407 has executed the exception handling. The first detection unit 825 determines that the execution of the exception handling has been detected when the notification is received.

例外処理の実行を検出したと判定した場合には、停止部833は、テスト対象プログラム407を終了させる(S1207)。そして、記録処理部835は、テスト結果を書き込む(S1209)。具体的には、当該回のレコードのテスト結果のフィールドに、例外処理の実行の検出に基づく異常判定である旨のコードが格納される。更に、現象のフィールドに例外処理の内容が格納され、実行オフセットのフィールドには実行された例外処理の命令コードのオフセットが格納される。例外処理の内容及び例外処理の命令コードのオフセットは、上記通知から得られる。 When it is determined that the execution of the exception handling is detected, the stop unit 833 terminates the test target program 407 (S1207). Then, the recording processing unit 835 writes the test result (S1209). Specifically, a code indicating that the abnormality is determined based on the detection of the execution of exception handling is stored in the field of the test result of the record of the relevant time. Further, the content of the exception handling is stored in the phenomenon field, and the offset of the instruction code of the executed exception handling is stored in the execution offset field. The content of exception handling and the offset of the instruction code for exception handling can be obtained from the above notification.

その後、削除部837は、入力ファイル201を削除し(S1211)、端子Aを介して図14に示したS1419の処理に移る。 After that, the deletion unit 837 deletes the input file 201 (S1211), and moves to the process of S1419 shown in FIG. 14 via the terminal A.

一方、S1205において例外処理の実行を検出していないと判定した場合には、第2検出部827は、入力ファイル201のクローズを検出したか否かによって処理を分岐させる(S1213)。具体的には、第2検出部827は、監視結果記憶部807に書き込まれた監視結果、つまりファイルシステム803におけるファイル操作の記録に基づいて、入力ファイル201がクローズされたか否かを判定する。 On the other hand, when it is determined in S1205 that the execution of the exception processing is not detected, the second detection unit 827 branches the processing depending on whether or not the closing of the input file 201 is detected (S1213). Specifically, the second detection unit 827 determines whether or not the input file 201 is closed based on the monitoring result written in the monitoring result storage unit 807, that is, the record of the file operation in the file system 803.

入力ファイル201のクローズを検出したと判定した場合には、停止部833は、テスト対象プログラム407を終了させる(S1215)。そして、記録処理部835は、テスト結果を書き込む(S1217)。具体的には、当該回のレコードのテスト結果のフィールドに、入力ファイル201のクローズの検出に基づく正常判定である旨のコードが格納される。詳細に関するフィールドには、何も格納されない。 When it is determined that the closing of the input file 201 has been detected, the stop unit 833 terminates the test target program 407 (S1215). Then, the recording processing unit 835 writes the test result (S1217). Specifically, a code indicating that the normal determination is made based on the detection of closing of the input file 201 is stored in the field of the test result of the record of the relevant time. Nothing is stored in the detail field.

その後、削除部837は、入力ファイル201を削除し(S1219)、端子Aを介して図14に示したS1419の処理に移る。 After that, the deletion unit 837 deletes the input file 201 (S1219), and moves to the process of S1419 shown in FIG. 14 via the terminal A.

一方、S1213において入力ファイル201のクローズを検出していないと判定した場合には、端子Bを介して図14に示したS1401の処理に移る。 On the other hand, when it is determined in S1213 that the closing of the input file 201 has not been detected, the process proceeds to the process of S1401 shown in FIG. 14 via the terminal B.

図14の説明に移る。第3検出部829は、タイムアウトを検出したか否かによって処理を分岐させる(S1401)。具体的には、第3検出部829は、S1203でテスト対象プログラム407を起動した時点からの経過時間、つまりテスト時間が上限を超えた場合にタイムアウトを検出したと判定する。 The explanation will move to FIG. The third detection unit 829 branches the process depending on whether or not a timeout is detected (S1401). Specifically, the third detection unit 829 determines that the elapsed time from the time when the test target program 407 is started in S1203, that is, the time-out is detected when the test time exceeds the upper limit.

タイムアウトを検出したと判定した場合には、停止部833は、テスト対象プログラム407を終了させる(S1403)。そして、記録処理部835は、テスト結果を書き込む(S1405)。具体的には、当該回のレコードのテスト結果のフィールドに、タイムアウトの検出に基づく正常判定である旨のコードが格納される。詳細に関するフィールドには、何も格納されない。 When it is determined that the time-out has been detected, the stop unit 833 terminates the test target program 407 (S1403). Then, the recording processing unit 835 writes the test result (S1405). Specifically, the code indicating that the normal judgment is made based on the detection of the timeout is stored in the field of the test result of the record of the relevant time. Nothing is stored in the detail field.

その後、削除部837は、入力ファイル201を削除し(S1407)、S1419の処理に移る。 After that, the deletion unit 837 deletes the input file 201 (S1407) and moves to the process of S1419.

一方、S1401においてタイムアウトを検出していないと判定した場合には、第4検出部831は、変更箇所の読み込みを検出したか否かによって処理を分岐させる(S1409)。具体的には、第4検出部831は、監視結果テーブルにリードに係るレコードが追加され、当該レコードにおけるアクセス範囲が入力ファイル201における変更範囲の一部又は全部と重複する場合に、変更箇所の読み込みを検出したと判定する。 On the other hand, when it is determined that the timeout has not been detected in S1401, the fourth detection unit 831 branches the process depending on whether or not the reading of the changed portion is detected (S1409). Specifically, when a record related to a read is added to the monitoring result table and the access range in the record overlaps with a part or all of the change range in the input file 201, the fourth detection unit 831 determines the changed part. It is determined that reading has been detected.

変更箇所の読み込みを検出していないと判定した場合には、端子Dを介して図12のS1205に示した処理に戻って、上述した処理を繰り返す。 If it is determined that the reading of the changed portion has not been detected, the process returns to the process shown in S1205 of FIG. 12 via the terminal D, and the above-mentioned process is repeated.

一方、変更箇所の読み込みを検出したと判定した場合には、判定部839は、変更箇所が読み込まれた時点から観察時間が過ぎたか否かを判定する(S1411)。 On the other hand, if it is determined that the read of the changed portion has been detected, the determination unit 839 determines whether or not the observation time has passed since the changed portion was read (S1411).

変更箇所が読み込まれた時点から観察時間が過ぎていないと判定した場合には、端子Dを介して図12のS1205に示した処理に戻って、上述した処理を繰り返す。 If it is determined that the observation time has not passed since the changed portion was read, the process returns to the process shown in S1205 of FIG. 12 via the terminal D, and the above-mentioned process is repeated.

但し、S1411において変更箇所が読み込まれた時点から観察時間が過ぎていないと判定された場合には、繰り返されるS1409において、第4検出部831は、変更箇所の読み込みを検出したと判定する。そして、繰り返されるS1411において、判定部839は、再び変更箇所が読み込まれた時点から観察時間が過ぎたか否かを判定する(S1411)。観察時間が過ぎるまで、このような処理が繰り返される。この間の繰り返しにおけるS1205の処理で、例外処理の実行を検出したと判定すれば、上述したS1207乃至S1211の処理が実行される。 However, if it is determined in S1411 that the observation time has not passed since the changed portion was read, in the repeated S1409, the fourth detection unit 831 determines that the read of the changed portion has been detected. Then, in the repeated S1411, the determination unit 839 determines whether or not the observation time has passed from the time when the changed portion is read again (S1411). Such a process is repeated until the observation time has passed. If it is determined that the execution of the exception handling is detected in the processing of S1205 in the repetition during this period, the above-mentioned processing of S1207 to S1211 is executed.

繰り返されるS1411において、変更箇所が読み込まれた時点から観察時間が過ぎたと判定された場合に、停止部833は、テスト対象プログラム407を終了させる(S1413)。そして、記録処理部835は、テスト結果を書き込む(S1415)。具体的には、当該回のレコードのテスト結果のフィールドに、変更箇所の読み込みに基づく正常判定である旨のコードが格納される。詳細に関するフィールドには、何も格納されない。 In the repeated S1411, when it is determined that the observation time has passed from the time when the changed portion is read, the stop unit 833 terminates the test target program 407 (S1413). Then, the recording processing unit 835 writes the test result (S1415). Specifically, a code indicating that the normal judgment is made based on the reading of the changed part is stored in the field of the test result of the record of the relevant time. Nothing is stored in the detail field.

その後、削除部837は、入力ファイル201を削除し(S1417)、S1419の処理に移る。 After that, the deletion unit 837 deletes the input file 201 (S1417) and moves to the process of S1419.

S1419において、生成部821は、メイン処理を終了するか否かを判定する。例えばオリジナルファイル101の最後尾のコードを変更する入力ファイル201によるテストを終えた時点でメイン処理を終える。 In S1419, the generation unit 821 determines whether or not to end the main process. For example, the main process ends when the test by the input file 201 that changes the code at the end of the original file 101 is completed.

メイン処理を終了しないと判定した場合には、端子Cを介して図12のS1201に示した処理に戻って、上述した処理を繰り返す。以上で、メイン処理の説明を終える。 When it is determined that the main process is not completed, the process returns to the process shown in S1201 of FIG. 12 via the terminal C, and the above-described process is repeated. This is the end of the explanation of the main process.

本実施の形態によれば、入力ファイルにおける変更範囲に応じたタイミングでプログラムテストを終わらせることができる。従って、正しい検証を効率良く行えるようになる。 According to this embodiment, the program test can be completed at the timing according to the change range in the input file. Therefore, correct verification can be performed efficiently.

以上本発明の一実施の形態を説明したが、本発明はこれに限定されるものではない。例えば、上述の機能ブロック構成はプログラムモジュール構成に一致しない場合もある。 Although one embodiment of the present invention has been described above, the present invention is not limited thereto. For example, the functional block configuration described above may not match the program module configuration.

また、上で説明した各記憶領域の構成は一例であって、上記のような構成でなければならないわけではない。さらに、処理フローにおいても、処理結果が変わらなければ、処理の順番を入れ替えることや複数の処理を並列に実行させるようにしても良い。 Further, the configuration of each storage area described above is an example, and does not have to be the configuration as described above. Further, also in the processing flow, if the processing result does not change, the order of the processing may be changed or a plurality of processing may be executed in parallel.

なお、上で述べたプログラムテスト装置800は、コンピュータ装置であって、図15に示すように、メモリ2501とCPU(Central Processing Unit)2503とハードディスク・ドライブ(HDD:Hard Disk Drive)2505と表示装置2509に接続される表示制御部2507とリムーバブル・ディスク2511用のドライブ装置2513と入力装置2515とネットワークに接続するための通信制御部2517とがバス2519で接続されている。オペレーティングシステム(OS:Operating System)及び本実施例における処理を実施するためのアプリケーション・プログラムは、HDD2505に格納されており、CPU2503により実行される際にはHDD2505からメモリ2501に読み出される。CPU2503は、アプリケーション・プログラムの処理内容に応じて表示制御部2507、通信制御部2517、ドライブ装置2513を制御して、所定の動作を行わせる。また、処理途中のデータについては、主としてメモリ2501に格納されるが、HDD2505に格納されるようにしてもよい。本発明の実施例では、上で述べた処理を実施するためのアプリケーション・プログラムはコンピュータ読み取り可能なリムーバブル・ディスク2511に格納されて頒布され、ドライブ装置2513からHDD2505にインストールされる。インターネットなどのネットワーク及び通信制御部2517を経由して、HDD2505にインストールされる場合もある。このようなコンピュータ装置は、上で述べたCPU2503、メモリ2501などのハードウエアとOS及びアプリケーション・プログラムなどのプログラムとが有機的に協働することにより、上で述べたような各種機能を実現する。 The program test device 800 described above is a computer device, and as shown in FIG. 15, a memory 2501, a CPU (Central Processing Unit) 2503, a hard disk drive (HDD) 2505, and a display device. The display control unit 2507 connected to the 2509, the drive device 2513 for the removable disk 2511, the input device 2515, and the communication control unit 2517 for connecting to the network are connected by a bus 2519. The operating system (OS: Operating System) and the application program for executing the processing in this embodiment are stored in the HDD 2505, and are read from the HDD 2505 to the memory 2501 when executed by the CPU 2503. The CPU 2503 controls the display control unit 2507, the communication control unit 2517, and the drive device 2513 according to the processing contents of the application program to perform a predetermined operation. Further, the data in the process of processing is mainly stored in the memory 2501, but may be stored in the HDD 2505. In an embodiment of the present invention, the application program for performing the above-described processing is stored and distributed on a computer-readable removable disk 2511 and installed from the drive device 2513 to the HDD 2505. It may be installed on the HDD 2505 via a network such as the Internet and a communication control unit 2517. Such a computer device realizes various functions as described above by organically collaborating with the hardware such as the CPU 2503 and the memory 2501 described above and the program such as the OS and the application program. ..

以上述べた本発明の実施の形態をまとめると、以下のようになる。 The embodiments of the present invention described above can be summarized as follows.

本実施の形態に係るプログラムテスト装置は、(A)ファイルファジングによるプログラムテストに供される入力ファイルの変更箇所がテスト対象プログラムによって読み込まれたことを検出する検出部と、(B)変更箇所がテスト対象プログラムによって読み込まれたことを検出した時点に基づいて決定したタイミングで、テスト対象プログラムの動作を終了させる停止部とを有する。 The program test apparatus according to the present embodiment has (A) a detection unit that detects that a changed part of an input file used for a program test by file fuzzing has been read by a program to be tested, and (B) a changed part. It has a stop unit that terminates the operation of the test target program at a timing determined based on the time when it is detected that the test target program has read it.

このようにすれば、入力ファイルにおける変更範囲に応じたタイミングでプログラムテストを終わらせることができる。尚、(A)検出部は、例えば第4検出部831である。 In this way, the program test can be completed at the timing according to the change range in the input file. The detection unit (A) is, for example, the fourth detection unit 831.

なお、上で述べたプログラムテスト装置における処理をコンピュータに行わせるためのプログラムを作成することができ、当該プログラムは、例えばフレキシブルディスク、CD−ROM、光磁気ディスク、半導体メモリ、ハードディスク等のコンピュータ読み取り可能な記憶媒体又は記憶装置に格納されるようにしてもよい。尚、中間的な処理結果は、一般的にメインメモリ等の記憶装置に一時保管される。 It should be noted that a program for causing the computer to perform the processing in the program test apparatus described above can be created, and the program can be read by a computer such as a flexible disk, a CD-ROM, a magneto-optical disk, a semiconductor memory, or a hard disk. It may be stored in a possible storage medium or storage device. The intermediate processing result is generally temporarily stored in a storage device such as a main memory.

以上の実施例を含む実施形態に関し、さらに以下の付記を開示する。 The following additional notes will be further disclosed with respect to the embodiments including the above embodiments.

(付記1)
ファイルファジングによるプログラムテストに供される入力ファイルの変更箇所がテスト対象プログラムによって読み込まれたことを検出する検出部と、
前記変更箇所が前記テスト対象プログラムによって読み込まれたことを検出した時点に基づいて決定したタイミングで、前記テスト対象プログラムの動作を終了させる停止部と
を有するプログラムテスト装置。
(Appendix 1)
A detector that detects that the changed part of the input file used for the program test by file fuzzing has been read by the program under test, and
A program test device having a stop unit that terminates the operation of the test target program at a timing determined based on the time when it is detected that the changed portion has been read by the test target program.

(付記2)
ファイルファジングによるプログラムテストに供される入力ファイルの変更箇所がテスト対象プログラムによって読み込まれたことを検出し、
前記変更箇所が前記テスト対象プログラムによって読み込まれたことを検出した時点に基づいて決定したタイミングで、前記テスト対象プログラムの動作を終了させる
処理を含み、コンピュータにより実行されるテスト制御方法。
(Appendix 2)
Detects that changes in the input file used for program testing by file fuzzing have been read by the program under test,
A test control method executed by a computer including a process of terminating the operation of the test target program at a timing determined based on the time when it is detected that the changed part has been read by the test target program.

(付記3)
ファイルファジングによるプログラムテストに供される入力ファイルの変更箇所がテスト対象プログラムによって読み込まれたことを検出し、
前記変更箇所が前記テスト対象プログラムによって読み込まれたことを検出した時点に基づいて決定したタイミングで、前記テスト対象プログラムの動作を終了させる
処理をコンピュータに実行させるテスト制御プログラム。
(Appendix 3)
Detects that changes in the input file used for program testing by file fuzzing have been read by the program under test,
A test control program that causes a computer to execute a process of terminating the operation of the test target program at a timing determined based on the time when it is detected that the changed part has been read by the test target program.

101 オリジナルファイル 201 入力ファイル
401 テスト制御部 403 オリジナルファイル記憶部
405 入力ファイル記憶部 407 テスト対象プログラム
409 テスト結果記憶部 800 プログラムテスト装置
801 OS 803 ファイルシステム
805 監視部 807 監視結果記憶部
809 テスト仕様記憶部 821 生成部
823 起動部 825 第1検出部
827 第2検出部 829 第3検出部
831 第4検出部 833 停止部
835 記録処理部 837 削除部
839 判定部
101 Original file 201 Input file 401 Test control unit 403 Original file storage unit 405 Input file storage unit 407 Test target program 409 Test result storage unit 800 Program test device 801 OS 803 File system 805 Monitoring unit 807 Monitoring result storage unit 809 Test specification storage Part 821 Generation part 823 Start part 825 1st detection part 827 2nd detection part 829 3rd detection part 831 4th detection part 833 Stop part 835 Recording processing part 837 Delete part 839 Judgment part

Claims (3)

テスト対象プログラムのファイルファジングによるプログラムテストの実行中に前記テスト対象プログラムの、特定の入力ファイル内におけるアクセス範囲を特定し、当該アクセス範囲が、前記特定の入力ファイルの変更箇所を格納するデータ格納部に格納された前記変更箇所の一部又は全部と重複するか否かを判断し、前記アクセス範囲が前記変更箇所の一部又は全部と重複する場合に前記変更箇所がテスト対象プログラムによって読み込まれたことを検出する検出部と、
前記変更箇所が前記テスト対象プログラムによって読み込まれたことを検出した後、所定時間内に例外処理の発生が検出されない場合に、前記テスト対象プログラムの動作を終了させる停止部と
を有するプログラムテスト装置。
A data storage unit that specifies the access range of the test target program in a specific input file during the execution of the program test by file fuzzing of the test target program, and the access range stores the changed part of the specific input file. It is determined whether or not it overlaps with a part or all of the changed part stored in, and when the access range overlaps with a part or all of the changed part, the changed part is read by the test target program. A detector that detects that, and
A program test device having a stop unit that terminates the operation of the test target program when the occurrence of exception handling is not detected within a predetermined time after detecting that the changed part has been read by the test target program.
テスト対象プログラムのファイルファジングによるプログラムテストの実行中に前記テスト対象プログラムの、特定の入力ファイル内におけるアクセス範囲を特定し、当該アクセス範囲が、前記特定の入力ファイルの変更箇所を格納するデータ格納部に格納された前記変更箇所の一部又は全部と重複するか否かを判断し、前記アクセス範囲が前記変更箇所の一部又は全部と重複する場合に前記変更箇所がテスト対象プログラムによって読み込まれたことを検出し、
前記変更箇所が前記テスト対象プログラムによって読み込まれたことを検出した後、所定時間内に例外処理の発生が検出されない場合に、前記テスト対象プログラムの動作を終了させる
処理を含み、コンピュータにより実行されるテスト制御方法。
A data storage unit that specifies the access range of the test target program in a specific input file during the execution of the program test by file fuzzing of the test target program, and the access range stores the changed part of the specific input file. It is determined whether or not it overlaps with a part or all of the changed part stored in, and when the access range overlaps with a part or all of the changed part, the changed part is read by the test target program. Detect that
After detecting that the changed part has been read by the test target program , if the occurrence of exception processing is not detected within a predetermined time, the operation of the test target program is terminated, which is executed by the computer. Test control method.
テスト対象プログラムのファイルファジングによるプログラムテストの実行中に前記テスト対象プログラムの、特定の入力ファイル内におけるアクセス範囲を特定し、当該アクセス範囲が、前記特定の入力ファイルの変更箇所を格納するデータ格納部に格納された前記変更箇所の一部又は全部と重複するか否かを判断し、前記アクセス範囲が前記変更箇所の一部又は全部と重複する場合に前記変更箇所がテスト対象プログラムによって読み込まれたことを検出し、
前記変更箇所が前記テスト対象プログラムによって読み込まれたことを検出した後、所定時間内に例外処理の発生が検出されない場合に、前記テスト対象プログラムの動作を終了させる
処理をコンピュータに実行させるテスト制御プログラム。
A data storage unit that specifies the access range of the test target program in a specific input file during the execution of the program test by file fuzzing of the test target program, and the access range stores the changed part of the specific input file. It is determined whether or not it overlaps with a part or all of the changed part stored in, and when the access range overlaps with a part or all of the changed part, the changed part is read by the test target program. Detect that
A test control program that causes a computer to execute a process of terminating the operation of the test target program when the occurrence of exception processing is not detected within a predetermined time after detecting that the changed part has been read by the test target program. ..
JP2017070574A 2017-03-31 2017-03-31 Program test equipment, test control method and test control program Expired - Fee Related JP6880933B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017070574A JP6880933B2 (en) 2017-03-31 2017-03-31 Program test equipment, test control method and test control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017070574A JP6880933B2 (en) 2017-03-31 2017-03-31 Program test equipment, test control method and test control program

Publications (2)

Publication Number Publication Date
JP2018173748A JP2018173748A (en) 2018-11-08
JP6880933B2 true JP6880933B2 (en) 2021-06-02

Family

ID=64107431

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017070574A Expired - Fee Related JP6880933B2 (en) 2017-03-31 2017-03-31 Program test equipment, test control method and test control program

Country Status (1)

Country Link
JP (1) JP6880933B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2025224853A1 (en) * 2024-04-24 2025-10-30 三菱電機株式会社 Fuzzing test device, fuzzing test method, and fuzzing test program

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100916329B1 (en) * 2007-11-01 2009-09-11 한국전자통신연구원 Software Vulnerability Checking Device and Method

Also Published As

Publication number Publication date
JP2018173748A (en) 2018-11-08

Similar Documents

Publication Publication Date Title
EP2460113B1 (en) Automated unpacking of portable executable files
CN105518622B (en) Method and apparatus for verifying guest code converted in dynamic binary converter
US20150370695A1 (en) Testing optimized binary modules
US20210141907A1 (en) Method and device for patching vulnerability of binary
US9298593B2 (en) Testing a software interface for a streaming hardware device
US20040194063A1 (en) System and method for automated testing of a software module
US8245085B2 (en) Dump output control apparatus and dump output control method
CN104252402A (en) Program debugging method and device
JP7195796B2 (en) Information processing device, control method for information processing device, and program
CN116724291A (en) Load block instructions and store block instructions
US8762773B2 (en) Processing apparatus, data migration method, and computer-readable recording medium having data migration program recorded thereon
JP6880933B2 (en) Program test equipment, test control method and test control program
US20050283770A1 (en) Detecting memory address bounds violations
CN108027736B (en) Runtime code parallelization using out-of-order renaming by pre-allocation of physical registers
CN108628726A (en) Method and device for recording CPU state information
US11113392B2 (en) Executable binary code insertion
JP6834838B2 (en) Computer boot method and computer
JP2018085040A (en) Program test device, program test program and program test method
US20220197544A1 (en) Apparatus and method for selecting storage location based on data usage
CN119292850B (en) Processor verification system and method
KR102385706B1 (en) Apparatus and method for suitability test of virtual network function
US9229725B2 (en) Safe conditional-load and conditional-store operations
Kicinski et al. Xdp hardware offload: Current work, debugging and edge cases
US20210011951A1 (en) Data processing
CN116450211A (en) Method for judging compatibility of virtual machine application to Linux Arm64

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200115

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20201223

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210119

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210226

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20210406

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210419

R150 Certificate of patent or registration of utility model

Ref document number: 6880933

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees