Skip to content
Snippets Groups Projects
Commit a5822c7c authored by Ruben ten Hove's avatar Ruben ten Hove
Browse files

various changes

parent 01cb8405
No related branches found
No related tags found
No related merge requests found
name: Publish Docker Images name: Build, test and push container image
on: on:
push: push:
...@@ -9,29 +9,38 @@ on: ...@@ -9,29 +9,38 @@ on:
- '*' - '*'
jobs: jobs:
push_to_registry: build:
name: Push Docker images to Dockerhub name: Build, test and push container image
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
- name: Build image
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
load: true
tags: aflplusplus/aflplusplus:test
- name: Test linux/amd64 image
run: docker run --rm --platform linux/amd64 aflplusplus/aflplusplus:test make tests
- name: Test linux/arm64 image
run: docker run --rm --platform linux/arm64 aflplusplus/aflplusplus:test make tests
- name: Login to Dockerhub - name: Login to Dockerhub
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }} password: ${{ secrets.DOCKER_TOKEN }}
- name: Publish dev as dev to docker.io registry - name: Publish ${{ github.ref_name }} to docker.io registry
uses: docker/build-push-action@v3 uses: docker/build-push-action@v3
with: with:
context: . context: .
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
push: true push: true
tags: aflplusplus/aflplusplus:${{ github.ref_name }} tags: aflplusplus/aflplusplus:${{ github.ref_name }}
if: ${{ github.ref_name == 'dev' }} if: ${{ github.ref_name != 'stable' }}
- name: Publish stable as stable and latest to docker.io registry - name: Publish stable and latest to docker.io registry
uses: docker/build-push-action@v3 uses: docker/build-push-action@v3
with: with:
context: . context: .
...@@ -39,11 +48,3 @@ jobs: ...@@ -39,11 +48,3 @@ jobs:
push: true push: true
tags: aflplusplus/aflplusplus:${{ github.ref_name }},aflplusplus/aflplusplus:latest tags: aflplusplus/aflplusplus:${{ github.ref_name }},aflplusplus/aflplusplus:latest
if: ${{ github.ref_name == 'stable' }} if: ${{ github.ref_name == 'stable' }}
- name: Publish tagged release to docker.io registry
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: aflplusplus/aflplusplus:${{ github.ref_name }}
if: ${{ github.ref_type == 'tag' }}
...@@ -16,7 +16,7 @@ jobs: ...@@ -16,7 +16,7 @@ jobs:
AFL_SKIP_CPUFREQ: 1 AFL_SKIP_CPUFREQ: 1
AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES: 1 AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES: 1
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: debug - name: debug
run: apt-cache search plugin-dev | grep gcc-; echo; apt-cache search clang-format- | grep clang-format- run: apt-cache search plugin-dev | grep gcc-; echo; apt-cache search clang-format- | grep clang-format-
- name: update - name: update
...@@ -38,7 +38,7 @@ jobs: ...@@ -38,7 +38,7 @@ jobs:
AFL_SKIP_CPUFREQ: 1 AFL_SKIP_CPUFREQ: 1
AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES: 1 AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES: 1
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: install - name: install
run: brew install make gcc run: brew install make gcc
- name: fix install - name: fix install
...@@ -51,3 +51,4 @@ jobs: ...@@ -51,3 +51,4 @@ jobs:
run: sudo -E ./afl-system-config; export CC=/usr/local/Cellar/llvm/*/bin/clang; export CXX="$CC"++; export PATH=/usr/local/Cellar/llvm/*/":/usr/local/bin:$PATH"; export LLVM_CONFIG=/usr/local/Cellar/llvm/*/bin/llvm-config; gmake tests run: sudo -E ./afl-system-config; export CC=/usr/local/Cellar/llvm/*/bin/clang; export CXX="$CC"++; export PATH=/usr/local/Cellar/llvm/*/":/usr/local/bin:$PATH"; export LLVM_CONFIG=/usr/local/Cellar/llvm/*/bin/llvm-config; gmake tests
- name: force frida test for MacOS - name: force frida test for MacOS
run: export AFL_PATH=`pwd`; /usr/local/bin/gcc -o test-instr test-instr.c; mkdir in; echo > in/in; AFL_NO_UI=1 ./afl-fuzz -O -i in -o out -V 5 -- ./test-instr run: export AFL_PATH=`pwd`; /usr/local/bin/gcc -o test-instr test-instr.c; mkdir in; echo > in/in; AFL_NO_UI=1 ./afl-fuzz -O -i in -o out -V 5 -- ./test-instr
\ No newline at end of file
...@@ -18,7 +18,7 @@ jobs: ...@@ -18,7 +18,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v1 uses: github/codeql-action/init@v1
......
...@@ -17,7 +17,7 @@ jobs: ...@@ -17,7 +17,7 @@ jobs:
matrix: matrix:
os: [ubuntu-22.04, ubuntu-20.04] os: [ubuntu-22.04, ubuntu-20.04]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Install Rust Toolchain - name: Install Rust Toolchain
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
with: with:
...@@ -27,4 +27,4 @@ jobs: ...@@ -27,4 +27,4 @@ jobs:
- name: Run General Tests - name: Run General Tests
run: cargo test run: cargo test
- name: Run Tests for afl_internals feature flag - name: Run Tests for afl_internals feature flag
run: cd custom_mutator && cargo test --features=afl_internals run: cd custom_mutator && cargo test --features=afl_internals
\ No newline at end of file
...@@ -11,11 +11,11 @@ ARG DEBIAN_FRONTEND=noninteractive ...@@ -11,11 +11,11 @@ ARG DEBIAN_FRONTEND=noninteractive
ENV NO_ARCH_OPT 1 ENV NO_ARCH_OPT 1
RUN apt-get update && \ RUN apt-get update && apt-get full-upgrade -y && \
apt-get -y install --no-install-recommends \ apt-get -y install --no-install-recommends \
make cmake automake \ make cmake automake \
meson ninja-build bison flex \ meson ninja-build bison flex \
xz-utils \ xz-utils libbz2-1.0 \
git \ git \
python3 python3-dev python3-setuptools python-is-python3 \ python3 python3-dev python3-setuptools python-is-python3 \
libtool libtool-bin \ libtool libtool-bin \
...@@ -26,6 +26,9 @@ RUN apt-get update && \ ...@@ -26,6 +26,9 @@ RUN apt-get update && \
gnuplot-nox && \ gnuplot-nox && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
RUN wget -qO- https://sh.rustup.rs | CARGO_HOME=/etc/cargo sh -s -- -y -q --no-modify-path
ENV PATH=$PATH:/etc/cargo/bin
ARG LLVM_VERSION=14 ARG LLVM_VERSION=14
ARG GCC_VERSION=12 ARG GCC_VERSION=12
...@@ -33,7 +36,7 @@ RUN mkdir -p /usr/local/share/keyrings && \ ...@@ -33,7 +36,7 @@ RUN mkdir -p /usr/local/share/keyrings && \
echo "deb [signed-by=/usr/local/share/keyrings/llvm-snapshot.gpg.key] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${LLVM_VERSION} main" > /etc/apt/sources.list.d/llvm.list && \ echo "deb [signed-by=/usr/local/share/keyrings/llvm-snapshot.gpg.key] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${LLVM_VERSION} main" > /etc/apt/sources.list.d/llvm.list && \
wget -qO /usr/local/share/keyrings/llvm-snapshot.gpg.key https://apt.llvm.org/llvm-snapshot.gpg.key wget -qO /usr/local/share/keyrings/llvm-snapshot.gpg.key https://apt.llvm.org/llvm-snapshot.gpg.key
RUN apt-get update && apt-get full-upgrade -y && \ RUN apt-get update && \
apt-get -y install --no-install-recommends \ apt-get -y install --no-install-recommends \
gcc-${GCC_VERSION} g++-${GCC_VERSION} gcc-${GCC_VERSION}-plugin-dev gdb lcov \ gcc-${GCC_VERSION} g++-${GCC_VERSION} gcc-${GCC_VERSION}-plugin-dev gdb lcov \
clang-${LLVM_VERSION} clang-tools-${LLVM_VERSION} libc++1-${LLVM_VERSION} libc++-${LLVM_VERSION}-dev \ clang-${LLVM_VERSION} clang-tools-${LLVM_VERSION} libc++1-${LLVM_VERSION} libc++-${LLVM_VERSION}-dev \
...@@ -50,8 +53,9 @@ RUN if [ "$(dpkg --print-architecture)" = "amd64" ]; then \ ...@@ -50,8 +53,9 @@ RUN if [ "$(dpkg --print-architecture)" = "amd64" ]; then \
gcc-${GCC_VERSION}-multilib gcc-multilib; \ gcc-${GCC_VERSION}-multilib gcc-multilib; \
rm -rf /var/lib/apt/lists/*; \ rm -rf /var/lib/apt/lists/*; \
fi fi
# RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${LLVM_VERSION} 0 && \
# update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${LLVM_VERSION} 0 RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_VERSION} 0 && \
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${GCC_VERSION} 0
ENV LLVM_CONFIG=llvm-config-${LLVM_VERSION} ENV LLVM_CONFIG=llvm-config-${LLVM_VERSION}
ENV AFL_SKIP_CPUFREQ=1 ENV AFL_SKIP_CPUFREQ=1
......
...@@ -610,42 +610,42 @@ endif ...@@ -610,42 +610,42 @@ endif
.PHONY: distrib .PHONY: distrib
distrib: all distrib: all
-$(MAKE) -j4 -f GNUmakefile.llvm $(MAKE) -j4 -f GNUmakefile.llvm
ifneq "$(SYS)" "Darwin" ifneq "$(SYS)" "Darwin"
-$(MAKE) -f GNUmakefile.gcc_plugin $(MAKE) -f GNUmakefile.gcc_plugin
endif endif
-$(MAKE) -C utils/libdislocator $(MAKE) -C utils/libdislocator
-$(MAKE) -C utils/libtokencap $(MAKE) -C utils/libtokencap
-$(MAKE) -C utils/afl_network_proxy $(MAKE) -C utils/afl_network_proxy
-$(MAKE) -C utils/socket_fuzzing $(MAKE) -C utils/socket_fuzzing
-$(MAKE) -C utils/argv_fuzzing $(MAKE) -C utils/argv_fuzzing
# -$(MAKE) -C utils/plot_ui # $(MAKE) -C utils/plot_ui
-$(MAKE) -C frida_mode $(MAKE) -C frida_mode
ifneq "$(SYS)" "Darwin" ifneq "$(SYS)" "Darwin"
ifeq "$(ARCH)" "aarch64" ifeq "$(ARCH)" "aarch64"
-$(MAKE) -C coresight_mode $(MAKE) -C coresight_mode
endif endif
ifeq "$(SYS)" "Linux" ifeq "$(SYS)" "Linux"
ifndef NO_NYX ifndef NO_NYX
-cd nyx_mode && ./build_nyx_support.sh cd nyx_mode && ./build_nyx_support.sh
endif endif
endif endif
-cd qemu_mode && sh ./build_qemu_support.sh cd qemu_mode && sh ./build_qemu_support.sh
-cd unicorn_mode && unset CFLAGS && sh ./build_unicorn_support.sh cd unicorn_mode && unset CFLAGS && sh ./build_unicorn_support.sh
endif endif
.PHONY: binary-only .PHONY: binary-only
binary-only: test_shm test_python ready $(PROGS) binary-only: test_shm test_python ready $(PROGS)
-$(MAKE) -C utils/libdislocator $(MAKE) -C utils/libdislocator
-$(MAKE) -C utils/libtokencap $(MAKE) -C utils/libtokencap
-$(MAKE) -C utils/afl_network_proxy $(MAKE) -C utils/afl_network_proxy
-$(MAKE) -C utils/socket_fuzzing $(MAKE) -C utils/socket_fuzzing
-$(MAKE) -C utils/argv_fuzzing $(MAKE) -C utils/argv_fuzzing
# -$(MAKE) -C utils/plot_ui # $(MAKE) -C utils/plot_ui
-$(MAKE) -C frida_mode $(MAKE) -C frida_mode
ifneq "$(SYS)" "Darwin" ifneq "$(SYS)" "Darwin"
ifeq "$(ARCH)" "aarch64" ifeq "$(ARCH)" "aarch64"
-$(MAKE) -C coresight_mode $(MAKE) -C coresight_mode
endif endif
ifeq "$(SYS)" "Linux" ifeq "$(SYS)" "Linux"
ifndef NO_NYX ifndef NO_NYX
...@@ -658,13 +658,13 @@ endif ...@@ -658,13 +658,13 @@ endif
.PHONY: source-only .PHONY: source-only
source-only: all source-only: all
-$(MAKE) -j4 -f GNUmakefile.llvm $(MAKE) -j4 -f GNUmakefile.llvm
ifneq "$(SYS)" "Darwin" ifneq "$(SYS)" "Darwin"
-$(MAKE) -f GNUmakefile.gcc_plugin $(MAKE) -f GNUmakefile.gcc_plugin
endif endif
-$(MAKE) -C utils/libdislocator $(MAKE) -C utils/libdislocator
-$(MAKE) -C utils/libtokencap $(MAKE) -C utils/libtokencap
# -$(MAKE) -C utils/plot_ui # $(MAKE) -C utils/plot_ui
ifeq "$(SYS)" "Linux" ifeq "$(SYS)" "Linux"
ifndef NO_NYX ifndef NO_NYX
-cd nyx_mode && ./build_nyx_support.sh -cd nyx_mode && ./build_nyx_support.sh
...@@ -712,9 +712,9 @@ install: all $(MANPAGES) ...@@ -712,9 +712,9 @@ install: all $(MANPAGES)
@if [ -f utils/afl_network_proxy/afl-network-server ]; then $(MAKE) -C utils/afl_network_proxy install; fi @if [ -f utils/afl_network_proxy/afl-network-server ]; then $(MAKE) -C utils/afl_network_proxy install; fi
@if [ -f utils/aflpp_driver/libAFLDriver.a ]; then set -e; install -m 644 utils/aflpp_driver/libAFLDriver.a $${DESTDIR}$(HELPER_PATH); fi @if [ -f utils/aflpp_driver/libAFLDriver.a ]; then set -e; install -m 644 utils/aflpp_driver/libAFLDriver.a $${DESTDIR}$(HELPER_PATH); fi
@if [ -f utils/aflpp_driver/libAFLQemuDriver.a ]; then set -e; install -m 644 utils/aflpp_driver/libAFLQemuDriver.a $${DESTDIR}$(HELPER_PATH); fi @if [ -f utils/aflpp_driver/libAFLQemuDriver.a ]; then set -e; install -m 644 utils/aflpp_driver/libAFLQemuDriver.a $${DESTDIR}$(HELPER_PATH); fi
-$(MAKE) -f GNUmakefile.llvm install $(MAKE) -f GNUmakefile.llvm install
ifneq "$(SYS)" "Darwin" ifneq "$(SYS)" "Darwin"
-$(MAKE) -f GNUmakefile.gcc_plugin install $(MAKE) -f GNUmakefile.gcc_plugin install
endif endif
ln -sf afl-cc $${DESTDIR}$(BIN_PATH)/afl-gcc ln -sf afl-cc $${DESTDIR}$(BIN_PATH)/afl-gcc
ln -sf afl-cc $${DESTDIR}$(BIN_PATH)/afl-g++ ln -sf afl-cc $${DESTDIR}$(BIN_PATH)/afl-g++
......
...@@ -122,7 +122,7 @@ test_deps: ...@@ -122,7 +122,7 @@ test_deps:
# @echo "[*] Checking for gcc for plugin support..." # @echo "[*] Checking for gcc for plugin support..."
# @$(CC) -v 2>&1 | grep -q -- --enable-plugin || ( echo "[-] Oops, this gcc has not been configured with plugin support."; exit 1 ) # @$(CC) -v 2>&1 | grep -q -- --enable-plugin || ( echo "[-] Oops, this gcc has not been configured with plugin support."; exit 1 )
@echo "[*] Checking for gcc plugin development header files..." @echo "[*] Checking for gcc plugin development header files..."
@test -d `$(CC) -print-file-name=plugin`/include || ( echo "[-] Oops, can't find gcc header files. Be sure to install 'gcc-X-plugin-dev'."; exit 1 ) -@test -d `$(CC) -print-file-name=plugin`/include || ( echo "[-] Oops, can't find gcc header files. Be sure to install 'gcc-X-plugin-dev'."; exit 1 )
@echo "[*] Checking for './afl-showmap'..." @echo "[*] Checking for './afl-showmap'..."
@test -f ./afl-showmap || ( echo "[-] Oops, can't find './afl-showmap'. Be sure to compile AFL first."; exit 1 ) @test -f ./afl-showmap || ( echo "[-] Oops, can't find './afl-showmap'. Be sure to compile AFL first."; exit 1 )
@echo "[+] All set and ready to build." @echo "[+] All set and ready to build."
......
...@@ -54,7 +54,7 @@ $(GLIBC_LDSO): | $(GLIBC_NAME).tar.xz ...@@ -54,7 +54,7 @@ $(GLIBC_LDSO): | $(GLIBC_NAME).tar.xz
$(MAKE) install $(MAKE) install
$(GLIBC_NAME).tar.xz: $(GLIBC_NAME).tar.xz:
wget -O $@ $(GLIBC_URL_BASE)/$@ wget -qO $@ $(GLIBC_URL_BASE)/$@
clean: clean:
$(MAKE) -C $(CS_TRACE) clean $(MAKE) -C $(CS_TRACE) clean
......
...@@ -128,7 +128,7 @@ git pull >/dev/null 2>&1 ...@@ -128,7 +128,7 @@ git pull >/dev/null 2>&1
sh -c 'git stash && git stash drop' 1>/dev/null 2>/dev/null sh -c 'git stash && git stash drop' 1>/dev/null 2>/dev/null
git checkout "$GRAMMAR_VERSION" || exit 1 git checkout "$GRAMMAR_VERSION" || exit 1
echo "[*] Downloading antlr..." echo "[*] Downloading antlr..."
wget -c https://www.antlr.org/download/antlr-4.8-complete.jar wget -q https://www.antlr.org/download/antlr-4.8-complete.jar
cd .. cd ..
echo echo
......
...@@ -275,7 +275,7 @@ endif ...@@ -275,7 +275,7 @@ endif
else else
$(GUM_DEVKIT_TARBALL): | $(FRIDA_BUILD_DIR) $(GUM_DEVKIT_TARBALL): | $(FRIDA_BUILD_DIR)
wget -O $@ $(GUM_DEVKIT_URL) || curl -L -o $@ $(GUM_DEVKIT_URL) wget -qO $@ $(GUM_DEVKIT_URL) || curl -L -o $@ $(GUM_DEVKIT_URL)
$(GUM_DEVIT_LIBRARY): $(GUM_DEVKIT_TARBALL) $(GUM_DEVIT_LIBRARY): $(GUM_DEVKIT_TARBALL)
tar Jxvfm $(GUM_DEVKIT_TARBALL) -C $(FRIDA_BUILD_DIR) tar Jxvfm $(GUM_DEVKIT_TARBALL) -C $(FRIDA_BUILD_DIR)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment