Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
zjuchenyuan opened this issue Jun 14, 2019 · 0 comments
Open

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

zjuchenyuan opened this issue Jun 14, 2019 · 0 comments

Comments

@zjuchenyuan
Copy link

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 .

afl-cov/afl-cov

Lines 906 to 913 in 8d14372

for part in cargs.coverage_cmd.split(' '):
if not part or part[0] == ' ' or part[0] == '-':
continue
if (which(part)):
found_exec = True
if not cargs.disable_gcov_check and is_bin_gcov_enabled(part, cargs):
found_code_cov_binary = True
break

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant