ucsb-seclab / difuze

Fuzzer for Linux Kernel Drivers
BSD 2-Clause "Simplified" License
365 stars 83 forks source link

Post-processing errors on Ubuntu 17.10 #4

Closed nclman closed 5 years ago

nclman commented 6 years ago

Hi, I'm encountering problems with the mediatek example kernel as well as another Samsung kernel, in the post-processing stage.

============================= [+] About to run on 56 ioctl info file(s) [+] Running on file /mediatek/kernel-3.18/ioctl_finder_out/alsps_factory_unlocked_ioctl.txt [+] ioctl name: alsps_factory_unlocked_ioctl Traceback (most recent call last): File "run_all.py", line 496, in main() File "run_all.py", line 429, in main os.mkdir(out_dir + ioctl_name) OSError: [Errno 17] File exists: '/mediatek/kernel-3.18/ioctl_finder_out_ppxml/disp_unlocked_ioctl'

Any help is appreciated.

Machiry commented 6 years ago

Can you paste the command line (along with argument values) you used to invoke the script?

nclman commented 6 years ago

difuze/helper_scripts/post_processing>

python run_all.py -f ~/mediatek/kernel-3.18/ioctl_finder_out -o ~/mediatek/kernel-3.18/ioctl_finder_out_pp -n auto -m 0

Also tried with various values of "-m".

nclman commented 6 years ago

On further analysis, I see that it is because of the two generated files:

kernel-3.18/ioctl_finder_out/disp_unlocked_ioctl_1.txt

kernel-3.18/ioctl_finder_out/disp_unlocked_ioctl.txt

These two files have the same ioctl name: disp_unlocked_ioctl

The post-processor script tries to create a directory the second time but it is already created due to the first file.

How should this case be handled?

Machiry commented 5 years ago

Fixed https://github.com/ucsb-seclab/difuze/commit/0ed97e5a5318d4eebd06463d6c222d7b81644120