afl-cov icon indicating copy to clipboard operation
afl-cov copied to clipboard

Non-zero exit status '1' for CMD: /usr/bin/readelf -a cat

Open zjuchenyuan opened this issue 5 years ago • 0 comments

From your README, to run the program that need AFL_FILE as stdin:

$ cd /path/to/project-gcov/
$ afl-cov -d /path/to/afl-fuzz-output/ --live --coverage-cmd \
"cat AFL_FILE | LD_LIBRARY_PATH=./lib/.libs ./bin/.libs/somebin -a -b -c" \
--code-dir .

https://github.com/mrash/afl-cov/blob/8d14372e97c3ee1ddbdcbfc07218ea436b95cdd1/afl-cov#L906-L913

but this code will treat the first word cat as the exec part, leading to error message:

    Non-zero exit status '1' for CMD: /usr/bin/readelf -a cat

I would recommend change the README to:

afl-cov -d /path/to/afl-fuzz-output/ --live --coverage-cmd \
"LD_LIBRARY_PATH=./lib/.libs ./bin/.libs/somebin -a -b -c < AFL_FILE " \
--code-dir .

or change the code to add a parameter for specifing the exec part.

zjuchenyuan avatar Jun 14 '19 15:06 zjuchenyuan