vusec / TIFF

Apache License 2.0
9 stars 4 forks source link

No such file or directory: 'file.taint' #1

Closed zhanggenex closed 4 years ago

zhanggenex commented 4 years ago

I am trying to start this fuzzer, but it seems your code is imcomplete or your instruction is imcomplete.

E: Unable to load libdft-dta.so Traceback (most recent call last): File "a.py", line 9, in f = open('file.taint', "r") IOError: [Errno 2] No such file or directory: 'file.taint' cp: cannot stat '../libdft64/tools/cmp.out': No such file or directory cp: cannot stat '../libdft64/tools/lea.out': No such file or directory cp: cannot stat '../libdft64/tools/err_offset.json': No such file or directory cp: cannot stat '../libdft64/tools/err_arr_offset.json': No such file or directory cp: cannot stat '../libdft64/tools/reward.taint': No such file or directory

This is a problem in TIFF/libdft64/tools/a.py

f = open('file.taint', "r")

There are some files missing.

Please respond to me if you can recall these files, though it is an ancient project:-)

Thanks!

@tosanjay @vivek425ster

vivek425ster commented 4 years ago

@zhanggenex Seems like your build was not successfully. The files which are missing are generated during runtime by the fuzzer.

Can you please run below command first and check whether they are giving any error or not ?

zhanggenex commented 4 years ago

@vivek425ster I went through these steps and got no errors.

Here is the error message when running the fuzzer:

[*] finished common BB. TOtal such BB: 0

443676:42:49.635 - Start Program

[] starting taintflow calculation. [] Executing: ['./run_2.sh', '/home/zhanggen/overflow/lava_corpus/LAVA-M/who/coreutils-8.24-lava-safe/build-qsym/bin/who /home/zhanggen/overflow/TIFF/fuzzer-code/datatemp/who/f3.utmp', 'f3.utmp', '0'] [*] Just about to run ['./run_2.sh', '/home/zhanggen/overflow/lava_corpus/LAVA-M/who/coreutils-8.24-lava-safe/build-qsym/bin/who /home/zhanggen/overflow/TIFF/fuzzer-code/datatemp/who/f3.utmp', 'f3.utmp', '0'] /home/zhanggen/overflow/lava_corpus/LAVA-M/who/coreutils-8.24-lava-safe/build-qsym/bin/who /home/zhanggen/overflow/TIFF/fuzzer-code/datatemp/who/f3.utmp f3.utmp /home/zhanggen/overflow/lava_corpus/LAVA-M/who/coreutils-8.24-lava-safe/build-qsym/bin/who /home/zhanggen/overflow/TIFF/fuzzer-code/datatemp/who/f3.utmp E: Unable to load libdft-dta.so Traceback (most recent call last): File "a.py", line 9, in f = open('file.taint', "r") IOError: [Errno 2] No such file or directory: 'file.taint' cp: cannot stat '../libdft64/tools/cmp.out': No such file or directory cp: cannot stat '../libdft64/tools/lea.out': No such file or directory cp: cannot stat '../libdft64/tools/err_offset.json': No such file or directory cp: cannot stat '../libdft64/tools/err_arr_offset.json': No such file or directory cp: cannot stat '../libdft64/tools/reward.taint': No such file or directory

[*] Run complete..

Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 754, in run self.target(*self.args, **self.__kwargs) File "/home/zhanggen/overflow/TIFF/fuzzer-code/runfuzzer.py", line 807, in main get_taint(config.INITIALD, 1) File "/home/zhanggen/overflow/TIFF/fuzzer-code/runfuzzer.py", line 528, in get_taint config.TAINTMAP[fl]=read_taint(pfl) File "/home/zhanggen/overflow/TIFF/fuzzer-code/runfuzzer.py", line 348, in read_taint cmpFD=open("cmp.out","r") IOError: [Errno 2] No such file or directory: 'cmp.out'

======================================== 443676:42:49.704 - End Program Elapsed time: 0:00:00.068

zhanggenex commented 4 years ago

@vivek425ster Finally, I solved this problem by switching to kernel 3.13. It seems that pin2.13 does not support kenerl > 4. You could update the README if you feel necessary.

tosanjay commented 4 years ago

Hi, Looks like, in your environment, somehow taint engine (libdft-dta.so) is not running. I can suggest following to debug the problem:

  1. Just run any pintool to see if pin itself is able to run on your system (Note: VUzzer64 and TIFF use different PIN versions (hence different kernels versions). VUzzer's code was updated to use latest Pin 3.7 with kernel 5, but it is not the case with TIFF, which still requires Pin 2. with kernel 3..)
  2. If the above works well, i.e. pintool runs, then try the following: $PIN_HOME/pin.sh -t libdft-dta.so -filename 'f3.utmp' -maxoff 1 -x 0 -- home/zhanggen/overflow/lava_corpus/LAVA-M/who/coreutils-8.24-lava-safe/build-qsym/bin/who /home/zhanggen/overflow/TIFF/fuzzer-code/datatemp/who/f3.utmp