diff --git a/benchmarks/freetype2_ftfuzzer_libafl/.DS_Store b/benchmarks/freetype2_ftfuzzer_libafl/.DS_Store new file mode 100644 index 000000000..9abe0ee0d Binary files /dev/null and b/benchmarks/freetype2_ftfuzzer_libafl/.DS_Store differ diff --git a/benchmarks/freetype2_ftfuzzer_libafl/Dockerfile b/benchmarks/freetype2_ftfuzzer_libafl/Dockerfile new file mode 100644 index 000000000..55409fcc4 --- /dev/null +++ b/benchmarks/freetype2_ftfuzzer_libafl/Dockerfile @@ -0,0 +1,29 @@ +FROM gcr.io/oss-fuzz-base/base-builder + +# Install necessary dependencies +RUN apt-get update && \ + apt-get upgrade -y && \ + apt-get install -y \ + make \ + autoconf \ + libtool \ + wget + +# Clone necessary repositories +RUN git clone git://git.sv.nongnu.org/freetype/freetype2.git $SRC/freetype2 +RUN git clone https://github.com/unicode-org/text-rendering-tests.git $SRC/TRT +RUN wget https://github.com/libarchive/libarchive/releases/download/v3.4.3/libarchive-3.4.3.tar.xz -P $SRC/ + +# Copy all files into $SRC directory +COPY * $SRC/ + +# Download and extract the seeds tarball into $SRC/seeds +RUN wget https://raw.githubusercontent.com/ardier/fuzzbench/minimized-subsumed-mutants-benchmark-with-seeds/benchmarks/freetype2_ftfuzzer_libafl/seeds.tar -O $SRC/seeds.tar && \ + mkdir -p $SRC/seeds && \ + tar -xvf $SRC/seeds.tar -C $SRC/seeds && \ + rm $SRC/seeds.tar + +# Clean up temporary files +RUN mkdir -p $SRC/corpus +ENV FUZZER_SEEDS="$SRC/seeds" +ENV FUZZER_CORPUS="$SRC/corpus" diff --git a/benchmarks/freetype2_ftfuzzer_libafl/benchmark.yaml b/benchmarks/freetype2_ftfuzzer_libafl/benchmark.yaml new file mode 100644 index 000000000..0bdd0a0d8 --- /dev/null +++ b/benchmarks/freetype2_ftfuzzer_libafl/benchmark.yaml @@ -0,0 +1,18 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +commit: cd02d359a6d0455e9d16b87bf9665961c4699538 +commit_date: 2023-01-28T16:04:38+00:00 +fuzz_target: ftfuzzer +project: freetype2 diff --git a/benchmarks/freetype2_ftfuzzer_libafl/build.sh b/benchmarks/freetype2_ftfuzzer_libafl/build.sh new file mode 100755 index 000000000..01235e380 --- /dev/null +++ b/benchmarks/freetype2_ftfuzzer_libafl/build.sh @@ -0,0 +1,39 @@ +#!/bin/bash -ex +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +mkdir $OUT/seeds +# TRT/fonts is the full seed folder, but they're too big +cp TRT/fonts/TestKERNOne.otf $OUT/seeds/ +cp TRT/fonts/TestGLYFOne.ttf $OUT/seeds/ +cp seeds/* $OUT/seeds/ + +tar xf libarchive-3.4.3.tar.xz + +cd libarchive-3.4.3 +./configure --disable-shared +make clean +make -j $(nproc) +make install +cd .. + +cd freetype2 +./autogen.sh +./configure --with-harfbuzz=no --with-bzip2=no --with-png=no --without-zlib +make clean +make all -j $(nproc) + +$CXX $CXXFLAGS -std=c++11 -I include -I . src/tools/ftfuzzer/ftfuzzer.cc \ + objs/.libs/libfreetype.a $FUZZER_LIB -L /usr/local/lib -larchive \ + -o $OUT/ftfuzzer diff --git a/service/experiment-config.yaml b/service/experiment-config.yaml index b9acb09f8..0e3111a0e 100644 --- a/service/experiment-config.yaml +++ b/service/experiment-config.yaml @@ -2,8 +2,8 @@ # Unless you are a fuzzbench maintainer running this service, this # will not work with your setup. -trials: 20 -max_total_time: 82800 # 23 hours, the default time for preemptible experiments. +trials: 5 +max_total_time: 3600 cloud_project: fuzzbench docker_registry: gcr.io/fuzzbench cloud_compute_zone: us-central1-c diff --git a/service/experiment-requests.yaml b/service/experiment-requests.yaml index fe0efe2a2..da951509f 100644 --- a/service/experiment-requests.yaml +++ b/service/experiment-requests.yaml @@ -20,6 +20,13 @@ # Please add new experiment requests towards the top of this file. # +- experiment: 2024-11-26-afl-mutants + description: "Benchmark afl with freetype2" + fuzzers: + - afl + benchmarks: + - freetype2_ftfuzzer_libafl + - experiment: 2023-06-12-aflpp description: "Benchmark afl++ releases and newmutation" fuzzers: diff --git a/service/gcbrun_experiment.py b/service/gcbrun_experiment.py index f19ab493d..a3154b537 100644 --- a/service/gcbrun_experiment.py +++ b/service/gcbrun_experiment.py @@ -17,6 +17,7 @@ from the last PR comment containing "/gcbrun" and pass it to run_experiment.py which will run an experiment.""" +# dummy comment for experiment import logging import os import sys