panda-re / lava

LAVA: Large-scale Automated Vulnerability Addition

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

build of injected bug failed (LAVA TOOL FAILED)

kburova opened this issue · comments

Hi there,

I'm trying to follow the readme page to use your tool, i'm getting the following error:

...
bug_mining complete 1999.08 seconds
Tue Oct 16 11:22:42 PDT 2018
[everything] Injecting step -- 3 trials
Tue Oct 16 11:22:42 PDT 2018
[everything] Trial 1 -- injecting 50 bugs logging to /home/user/lava/file_user/logs/inject-1.log
docker run lava32 sh -c /usr/bin/python /home/user/projects/lava/scripts/inject.py -m 50 -e 0 -d -bb -t ptr_add,rel_write /home/user/lava/file_user.json
command failed! exit code was 1
========== end of logfile /home/user/lava/file_user/logs/inject-1.log: ==========

cdf.c: In function 'cdf_print_elapsed_time':
cdf.c:1260:29: warning: unused parameter 'data_flow' [-Wunused-parameter]
cdf.c: In function 'cdf_u16tos8':
cdf.c:1295:18: warning: unused parameter 'data_flow' [-Wunused-parameter]
make[3]: *** [apprentice.lo] Error 1
cdf.c: In function 'cdf_tole8':
cdf.c:164:1: warning: control reaches end of non-void function [-Wreturn-type]
cdf.c: In function 'cdf_tole4':
cdf.c:158:1: warning: control reaches end of non-void function [-Wreturn-type]
cdf.c: In function 'cdf_tole2':
cdf.c:152:1: warning: control reaches end of non-void function [-Wreturn-type]
cdf.c: In function 'cdf_getuint32':
cdf.c:141:1: warning: control reaches end of non-void function [-Wreturn-type]
make[3]: *** [cdf.lo] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

= ==================================
build of injected bug failed!!!!!!!
LAVA TOOL FAILED
= ==================================

Traceback (most recent call last):
File "/home/user/projects/lava/scripts/inject.py", line 157, in
project, args, update_db, competition=args.competition)
File "/home/user/projects/lava/scripts/lava.py", line 499, in inject_bugs
raise RuntimeError("Build of injected bug failed")
RuntimeError: Build of injected bug failed

Any suggestions on what could go wrong? Previously I couldn't get panda to work on my Ubuntu 16.04, and I had to comment out network in panda/panda/plugins/config.panda.

Thanks!

I've updated panda from https://github.com/nathanjackson/panda/tree/network-fixes, so I don't have to comment network out. lava still fails but message has changed:
.....
bug_mining complete 1996.28 seconds
Tue Oct 16 16:00:15 PDT 2018
[everything] Injecting step -- 3 trials
Tue Oct 16 16:00:15 PDT 2018
[everything] Trial 1 -- injecting 50 bugs logging to /home/user/lava/file_user/logs/inject-1.log
docker run lava32 sh -c /usr/bin/python /home/user/projects/lava/scripts/inject.py -m 50 -e 0 -d -bb -t ptr_add,rel_write /home/user/lava/file_user.json
command failed! exit code was 1
========== end of logfile /home/user/lava/file_user/logs/inject-1.log: ==========

strlcpy.c:31:1: error: conflicting types for 'strlcpy'
In file included from strlcpy.c:20:0:
file.h:549:8: note: previous declaration of 'strlcpy' was here
make[3]: *** [print.lo] Error 1
make[3]: *** [strlcpy.lo] Error 1
cdf.c: In function 'cdf_tole8':
cdf.c:164:1: warning: control reaches end of non-void function [-Wreturn-type]
cdf.c: In function 'cdf_tole4':
cdf.c:158:1: warning: control reaches end of non-void function [-Wreturn-type]
cdf.c: In function 'cdf_tole2':
cdf.c:152:1: warning: control reaches end of non-void function [-Wreturn-type]
cdf.c: In function 'cdf_getuint32':
cdf.c:141:1: warning: control reaches end of non-void function [-Wreturn-type]
make[3]: *** [cdf.lo] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

= ==================================
build of injected bug failed!!!!!!!
LAVA TOOL FAILED
= ==================================

Traceback (most recent call last):
File "/home/user/projects/lava/scripts/inject.py", line 157, in
project, args, update_db, competition=args.competition)
File "/home/user/projects/lava/scripts/lava.py", line 499, in inject_bugs
raise RuntimeError("Build of injected bug failed")
RuntimeError: Build of injected bug failed

I think this is related to bug #6 – could you try turning off the dataflow stuff and see if that fixes it?

I'm running into the same issue. Can you provide some guidance on turning off the dataflow stuff?

Never mind, I found it. Commenting out line 298 in scripts/lava.py seems to do the trick.

This should be fixed after #9 for the target (file) you were working with. Data-flow should work for you now.