Skip to content

Fuzz

Fuzz #14

Workflow file for this run

name: Fuzz
on:
schedule:
- cron: "0 4 * * *"
workflow_dispatch:
jobs:
fuzz:
strategy:
fail-fast: false
matrix:
target: [fuzz_request, fuzz_config]
name: ${{ matrix.target }}
runs-on: ubuntu-latest
timeout-minutes: 240
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install clang
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y clang
- name: Build fuzzer
run: |
clang -g -O1 -std=c99 \
-fsanitize=fuzzer,address,undefined \
-fno-omit-frame-pointer \
\
-o ${{ matrix.target }} \
fuzz/${{ matrix.target }}.c
- name: Run fuzzer
env:
ASAN_OPTIONS: halt_on_error=1:detect_leaks=1
UBSAN_OPTIONS: halt_on_error=1:print_stacktrace=1
run: |
set -euo pipefail
corpus="fuzz/corpus_$(echo "${{ matrix.target }}" | sed 's/^fuzz_//')"
mkdir -p "$corpus"
./${{ matrix.target }} "$corpus" \
-max_total_time=13500 \
-max_len=8192 \
-print_final_stats=1
- name: Upload crash artifacts
if: failure()
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.target }}-crashes
path: |
crash-*
leak-*
timeout-*
if-no-files-found: ignore
- name: Upload corpus
if: always()
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.target }}-corpus
path: fuzz/corpus_*/
if-no-files-found: ignore