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

How to evaluate my fuzzer with Magma? #171

Open
JWH-96 opened this issue Sep 10, 2024 · 6 comments
Open

How to evaluate my fuzzer with Magma? #171

JWH-96 opened this issue Sep 10, 2024 · 6 comments

Comments

@JWH-96
Copy link

JWH-96 commented Sep 10, 2024

I want to evaluate my fuzzer with Magma, but I do not have a public git repo. How can I modify the Docker image to use my local code?Could you please provide detailed implementation steps?

@adrianherrera
Copy link
Member

adrianherrera commented Sep 10, 2024 via email

@JWH-96
Copy link
Author

JWH-96 commented Sep 10, 2024

How should I modify the script files in the fuzzer folder and what should I pay attention to? The script copied from other fuzzers cannot run my fuzzer properly.

@JWH-96
Copy link
Author

JWH-96 commented Sep 10, 2024

Because my fuzzer is implemented based on afl++, but it is different from the version of afl++ in magma. I copied those script files to my fuzzer and encountered the following error。Using the same script to run AFL++, everything is OK。

20240910202710

[20/20] RUN /magma/fuzzers/mesfuzz/instrument.sh --progress=plain --no-cache:
0.439 + CXXFLAGS='-include /magma/magma/src/canary.h -DMAGMA_ENABLE_CANARIES -DMAGMA_FATAL_CANARIES -g -O0 -stdlib=libc++'
0.439 + export OUT=/magma_out/afl
0.439 + OUT=/magma_out/afl
0.439 + export 'LDFLAGS=-L/magma_out -g -L/magma_out/afl'
0.439 + LDFLAGS='-L/magma_out -g -L/magma_out/afl'
0.439 + /magma/magma/build.sh
0.449 + MAGMA_STORAGE=/magma_shared/canaries.raw
0.449 + /magma/fuzzers/mesfuzz/repo/afl-clang-fast -include /magma/magma/src/canary.h -DMAGMA_ENABLE_CANARIES -DMAGMA_FATAL_CANARIES -g -O0 '-DMAGMA_STORAGE="/magma_shared/canaries.raw"' -c /magma/magma/src/canary.c -fPIC -I /magma/magma/src/ -o /magma_out/afl/canary.o -L/magma_out -g -L/magma_out/afl
0.456 /magma/fuzzers/mesfuzz/repo/afl-clang-fast: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.33' not found (required by /magma/fuzzers/mesfuzz/repo/afl-clang-fast) 0.456 /magma/fuzzers/mesfuzz/repo/afl-clang-fast: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.34' not found (required by /magma/fuzzers/mesfuzz/repo/afl-clang-fast)


Dockerfile:86

84 | ENV LDFLAGS -L"${OUT}" -g
85 |
86 | >>> RUN ${FUZZER}/instrument.sh --progress=plain --no-cache
87 |
88 | ENTRYPOINT "${MAGMA}/run.sh"

ERROR: failed to solve: process "/bin/sh -c ${FUZZER}/instrument.sh --progress=plain --no-cache" did not complete successfully: exit code: 1

@adrianherrera
Copy link
Member

adrianherrera commented Sep 10, 2024 via email

@JWH-96
Copy link
Author

JWH-96 commented Sep 11, 2024

Why does the fuzzing process end in just a few seconds when the TIMEOUT is set to 1h?

1
2
3

@adrianherrera
Copy link
Member

adrianherrera commented Sep 11, 2024 via email

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

2 participants