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

Update LibAFL #1902

Merged
merged 15 commits into from
Oct 13, 2023
6 changes: 3 additions & 3 deletions fuzzers/aflrustrust/builder.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN apt-get update && \
# Uninstall old Rust & Install the latest one.
RUN if which rustup; then rustup self uninstall -y; fi && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /rustup.sh && \
sh /rustup.sh --default-toolchain nightly -y && \
sh /rustup.sh --default-toolchain nightly-2023-09-21 -y && \
rm /rustup.sh

# Download afl++.
Expand All @@ -46,11 +46,11 @@ RUN cd /afl && \
RUN git clone https://github.com/AFLplusplus/LibAFL /libafl

# Checkout a current commit
RUN cd /libafl && git checkout 8bffd28b4c357b315acb9cecd92cbf2b734a625a
RUN cd /libafl && git checkout c103444396697af102dce2b936a00e93017057ba

# Compile libafl.
RUN cd /libafl && \
unset CFLAGS CXXFLAGS && \
cd ./fuzzers/fuzzbench_forkserver && \
PATH="/root/.cargo/bin/:$PATH" cargo build --release
PATH="/root/.cargo/bin/:$PATH" cargo build --profile release-fuzzbench

2 changes: 1 addition & 1 deletion fuzzers/aflrustrust/fuzzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def build():
# Copy to fuzzer to OUT
build_directory = os.environ['OUT']
fuzzer = '/libafl/fuzzers/fuzzbench_forkserver/' \
'target/release/fuzzbench_forkserver'
'target/release-fuzzbench/fuzzbench_forkserver'
shutil.copy(fuzzer, build_directory)


Expand Down
6 changes: 3 additions & 3 deletions fuzzers/libafl/builder.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ FROM $parent_image
# Uninstall old Rust & Install the latest one.
RUN if which rustup; then rustup self uninstall -y; fi && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /rustup.sh && \
sh /rustup.sh --default-toolchain nightly-2023-03-29 -y && \
sh /rustup.sh --default-toolchain nightly-2023-09-21 -y && \
rm /rustup.sh

# Install dependencies.
Expand All @@ -38,15 +38,15 @@ RUN apt-get update && \
RUN git clone https://github.com/AFLplusplus/LibAFL /libafl

# Checkout a current commit
RUN cd /libafl && git checkout 8ff8ae41f1ed2956bb1e906c5c7bd0505ca110c0 || true
RUN cd /libafl && git checkout c103444396697af102dce2b936a00e93017057ba || true
# Note that due a nightly bug it is currently fixed to a known version on top!

# Compile libafl.
RUN cd /libafl && \
unset CFLAGS CXXFLAGS && \
export LIBAFL_EDGES_MAP_SIZE=2621440 && \
cd ./fuzzers/fuzzbench && \
PATH="/root/.cargo/bin/:$PATH" cargo build --release --features no_link_main
PATH="/root/.cargo/bin/:$PATH" cargo build --profile release-fuzzbench --features no_link_main

# Auxiliary weak references.
RUN cd /libafl/fuzzers/fuzzbench && \
Expand Down
6 changes: 4 additions & 2 deletions fuzzers/libafl/fuzzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ def prepare_fuzz_environment(input_corpus):

def build(): # pylint: disable=too-many-branches,too-many-statements
"""Build benchmark."""
os.environ['CC'] = '/libafl/fuzzers/fuzzbench/target/release/libafl_cc'
os.environ['CXX'] = '/libafl/fuzzers/fuzzbench/target/release/libafl_cxx'
os.environ[
'CC'] = '/libafl/fuzzers/fuzzbench/target/release-fuzzbench/libafl_cc'
os.environ[
'CXX'] = '/libafl/fuzzers/fuzzbench/target/release-fuzzbench/libafl_cxx'

os.environ['ASAN_OPTIONS'] = 'abort_on_error=0:allocator_may_return_null=1'
os.environ['UBSAN_OPTIONS'] = 'abort_on_error=0'
Expand Down
56 changes: 0 additions & 56 deletions fuzzers/libafl_forkserver/builder.Dockerfile

This file was deleted.

13 changes: 0 additions & 13 deletions fuzzers/libafl_forkserver/description.md

This file was deleted.

67 changes: 0 additions & 67 deletions fuzzers/libafl_forkserver/fuzzer.py

This file was deleted.

23 changes: 0 additions & 23 deletions fuzzers/libafl_forkserver/runner.Dockerfile

This file was deleted.