
* launcher now uses client_id instead of core_id * adding overcommit to an example fuzzer * Replace addr_of with &raw across the codebase (#2669) * Replace addr_of with &raw across the codebase * fix fixes * more fix * undo clang fmt? * oops * fix? * allocator fix * more fix * more more * more docs * more fix * mas mas mas * hm * more * fix Frida * needed * more error * qemu * Introduce workspace (again) (#2673) * Trying to redo workspace deps again after #2672 * unused * clippy * Replace addr_of with &raw across the codebase (#2669) * Replace addr_of with &raw across the codebase * fix fixes * more fix * undo clang fmt? * oops * fix? * allocator fix * more fix * more more * more docs * more fix * mas mas mas * hm * more * fix Frida * needed * more error * qemu * Introduce workspace (again) (#2673) * Trying to redo workspace deps again after #2672 * unused * clippy * fixing formatting issues * cloning values to make borrow checker happy * simplifying cfg constraints, removing excessive clippy allows * printing clang version that is used to find inconsistencies between CI and local formatting * some fixes according to the CI * Specifying types * improved logging for formatter * more attempts at logging for the CI formatting * fixing setting LLVM version in formatting in CI * fixing cippy allows * renaming launcher's ClientID to ClientDescription * Lower capped RAND generators (#2671) * Lower capped rand generators * Updated all references to RAND generators * Formatting updates * New RAND bytes generator constructor * Revert "Updated all references to RAND generators" This reverts commit 9daad894b25ec3867daf93c4fe67c03abec1d8c6. * Revert "Formatting updates" This reverts commit ff2a61a366c48b3f313878f62409e51b1e1ed663. * cargo nightly format * Added must_use to with_min_size * fix error '#' is not followed by a macro parameter (#2678) * Use version.workspace (#2682) * LibAFL_QEMU: Don't return a generic Address from Register reads (#2681) * LibAFL_QEMU: Make ReadReg always return GuestReg type * Don't return a generic address * fix fuzzers * fix mips * Add DrCovReader to read DrCov files and DrCov dumper and merge utils (#2680) * Add DrCov Reader * Removed libafl_jumper deps * Fix DrCovWriter, add dump_drcov_addrs * Taplo * Move frida from usize to u64 * DrCov usize=>u64 * Better error print * More u64 * ? * debug * clippy * clippy * Add Merge option to DrCovReader * Add drcov_merge tool * Move folder around * DrCov * More assert * fmt * Move around * Fix print * Add option to read multiple files/full folders * Fix build_all_fuzzers.sh for local runs (#2686) * Add Intel PT tracing support (#2471) * WIP: IntelPT qemu systemmode * use perf-event-open-sys instead of bindgen * intelPT Add enable and disable tracing, add test * Use static_assertions crate * Fix volatiles, finish test * Add Intel PT availability check * Use LibAFL errors in Result * Improve filtering * Add KVM pt_mode check * move static_assertions use * Check for perf_event_open support * Add (empty) IntelPT module * Add IntelPTModule POC * partial ideas to implement intel pt * forgot smth * trace decoding draft * add libipt decoder * use cpuid instead of reading /proc/cpuinfo * investigating nondeterministic behaviour * intel_pt module add thread creation hook * Fully identify deps versions Cargo docs: Although it looks like a specific version of the crate, it actually specifies a range of versions and allows SemVer compatible updates * Move mem image to module, output to file for debug * fixup! Use static_assertions crate * Exclude host kernel from traces * Bump libipt-rs * Callback to get memory as an alterantive to image * WIP Add bootloader fuzzer example * Split availability check: add availability_with_qemu * Move IntelPT to observer * Improve test docs * Clippy happy now * Taplo happy now * Add IntelPTObserver boilerplate * Hook instead of Observer * Clippy & Taplo * Add psb_freq setting * Extremely bad and dirty babyfuzzer stealing * Use thread local cell instead of mutex * Try a trace diff based naive feedback * fix perf aux buffer wrap handling * Use f64 for feedback score * Fix clippy for cargo test * Add config format tests * WIP intelpt babyfuzzer with fork * Fix not wrapped tail offset in split buffer * Baby PT with raw traces diff working * Cache nr_filters * Use Lazy_lock for perf_type * Add baby_fuzzer_intel_pt * restore baby fuzzer * baby_fuzzer with block decoder * instruction decoder instead of block * Fix after upstream merge * OwnedRefMut instead of Cow * Read mem directly instead of going through files * Fix cache lifetime and tail update * clippy * Taplo * Compile caps only on linux * clippy * Fail compilation on unsupported OSes * Add baby_fuzzer_intel_pt to CI * Cleanup * Move intel pt + linux check * fix baby pt * rollback forkexecutor * Remove unused dep * Cleanup * Lints * Compute an edge id instead of using only block ip * Binary only intelPT POC * put linux specific code behind target_os=linux * Clippy & Taplo * fix CI * Disable relocation * No unwrap in decode * No expect in decode * Better logging, smaller aux buffer * add IntelPTBuilder * some lints * Add exclude_hv config * Per CPU tracing and inheritance * Parametrize buffer size * Try not to break commandExecutor API pt.1 * Try not to break commandExecutor API pt.2 * Try not to break commandExecutor API pt.3 * fix baby PT * Support on_crash & on_timeout callbacks for libafl_qemu modules (#2620) * support (unsafe) on_crash / on_timeout callbacks for modules * use libc types in bindgen * Move common code to bolts * Cleanup * Revert changes to backtrace_baby_fuzzers/command_executor * Move intel_pt in one file * Use workspace deps * add nr_addr_filter fallback * Cleaning * Improve decode * Clippy * Improve errors and docs * Impl from<PtError> for libafl::Error * Merge hooks * Docs * Clean command executor * fix baby PT * fix baby PT warnings * decoder fills the map with no vec alloc * WIP command executor intel PT * filter_map() instead of filter().map() * fix docs * fix windows? * Baby lints * Small cleanings * Use personality to disable ASLR at runtime * Fix nix dep * Use prc-maps in babyfuzzer * working ET_DYN elf * Cleanup Cargo.toml * Clean command executor * introduce PtraceCommandConfigurator * Fix clippy & taplo * input via stdin * libipt as workspace dep * Check kernel version * support Arg input location * Reorder stuff * File input * timeout support for PtraceExec * Lints * Move out method not needing self form IntelPT * unimplemented * Lints * Move intel_pt_baby_fuzzer * Move intel_pt_command_executor * Document the need for smp_rmb * Better comment * Readme and Makefile.toml instead of build.rs * Move out from libafl_bolts to libafl_intelpt * Fix hooks * (Almost) fix intel_pt command exec * fix intel_pt command exec debug * Fix baby_fuzzer * &raw over addr_of! * cfg(target_os = "linux") * bolts Cargo.toml leftover * minimum wage README.md * extract join_split_trace from decode * extract decode_block from decode * add 1 to `previous_block_ip` to avoid that all the recursive basic blocks map to 0 * More generic hook * fix windows * Update CI, fmt * No bitbybit * Fix docker? * Fix Apple silicon? * Use old libipt from crates.io --------- Co-authored-by: Romain Malmain <romain.malmain@pm.me> Co-authored-by: Dominik Maier <domenukk@gmail.com> * libafl-fuzz: introduce nyx_mode (#2503) * add nyx_mode * fix frida ci? * damn clippy * clippy * LibAFL: Remove `tui_monitor` from default features (#2685) * No Usermode default * no tui * gg * try fix CI * fmt --------- Co-authored-by: Dominik Maier <dmnk@google.com> * Actually make ConstMapObserver work, introduce `nonnull_raw_mut` macro (#2687) * Actually make ConstMapObserver work * fixes * does that work? * mas * Feature: libafl-fuzzfuzzbench (#2689) * fuzzbench * clippy * fmt * fix unicorn CI? * Move bitfields to bitbybit (#2688) * move to bitbybit * Restore bitbybit dependent code * Clippy * Fix NautilusContext::from_file for python files (#2690) * Bump to 0.14.0 (#2692) * Fix versions in libafl and libafl_intelpt for crates.io (#2693) * Fix versions in libafl and libafl_intelpt for crates * Add libafl_intelpt to publish * StdMOptMutator:🆕 remove unused type parameter (#2695) `I` is unused in `::new` and thus requires callers to explicitly specify any type as it can't be determined by type inference. Clippy's `extra_unused_type_parameters` should pick this up, but is tuned a bit too conservative in order to avoid false positives AFAICT. * Move test_harness from source directory to OUT_DIR (#2694) * remove test_harness from source directory * fmt * Add package.metadata.docs.rs for libafl_intelpt (#2696) * libafl-fuzz: fix cmplog running on inputs more than once (#2697) * libafl-fuzz: fix cmplog running on inputs more than once * fmt * fix afl++ cmplog header * update to latest afl stable commit * Libafl workspace internal deps in workspace Cargo.toml (#2691) * Add internal deps to workspace * libafl: use workspace internal deps * libafl_bolts: use workspace internal deps * 0.14.0 * use workspace internal deps * Fix tui monitor for example fuzzers (#2699) * Fix tui monitor for example fuzzers * New clippy lint * fix * Update pyo3-build-config requirement from 0.22.3 to 0.23.1 (#2701) Updates the requirements on [pyo3-build-config](https://github.com/pyo3/pyo3) to permit the latest version. - [Release notes](https://github.com/pyo3/pyo3/releases) - [Changelog](https://github.com/PyO3/pyo3/blob/main/CHANGELOG.md) - [Commits](https://github.com/pyo3/pyo3/compare/v0.22.3...v0.23.1) --- updated-dependencies: - dependency-name: pyo3-build-config dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * bolts: fix build for tiers 3 platforms. (#2700) cater to platforms knowingly support this feature instead. * Pre init module hooks (#2704) * differenciate pre qemu init and post qemu init hooks * api breakage: Emulator::new_with_qemu is not public anymore. * Fix edge module generators (#2702) * fix generators * fix metadata removal for ExecutionCountRestartHelper (#2705) * Ignore pyo3 update (#2709) * libafl-fuzz: feature-flag nyx mode (#2712) * Bump ctor dependency to make nightly compile again (#2713) * Batched timeout doc (#2716) * timeout doc * clp * FMT * More batched timeout doc (#2717) * timeout doc * clp * FMT * more * fixing an overexited cast * renaming variables * removing unnecessary brackets * fixing imports * fixing imports * renaming more variables * even more variable renaming * removing duplicate clap short options * reverting mistaken variable renaming * comparing the actual cores instead of an enumeration index --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Dominik Maier <domenukk@gmail.com> Co-authored-by: Subhojeet Mukherjee, PhD <57270300+CowBoy4mH3LL@users.noreply.github.com> Co-authored-by: jejuisland87654 <jejuisland87654@gmail.com> Co-authored-by: Marco C. <46560192+Marcondiro@users.noreply.github.com> Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com> Co-authored-by: Romain Malmain <romain.malmain@pm.me> Co-authored-by: Aarnav <aarnav@srlabs.de> Co-authored-by: Dominik Maier <dmnk@google.com> Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com> Co-authored-by: Mrmaxmeier <3913977+Mrmaxmeier@users.noreply.github.com> Co-authored-by: Sharad Khanna <sharad@mineo333.dev> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: David CARLIER <devnexen@gmail.com> Co-authored-by: Henry Chu <henrytech@outlook.com>
544 lines
20 KiB
YAML
544 lines
20 KiB
YAML
name: build and test
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, "pr/**" ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
types: ["labeled", "opened", "synchronize", "reopened"]
|
|
workflow_dispatch:
|
|
merge_group:
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
|
MAIN_LLVM_VERSION: 18
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
common:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ ubuntu-24.04, windows-latest, macOS-latest ]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Install mimetype
|
|
if: runner.os == 'Linux'
|
|
run: sudo apt-get update && sudo apt-get install -y libfile-mimeinfo-perl
|
|
- name: install mdbook
|
|
uses: baptiste0928/cargo-install@v3
|
|
with:
|
|
crate: mdbook
|
|
- name: install linkcheck
|
|
uses: baptiste0928/cargo-install@v3
|
|
with:
|
|
crate: mdbook-linkcheck
|
|
# NOTE: The current crates.io release of mdbook-linkcheck (v0.7.7) is broken
|
|
# => https://github.com/Michael-F-Bryan/mdbook-linkcheck/pull/82#issuecomment-2241058491
|
|
git: https://github.com/Michael-F-Bryan/mdbook-linkcheck.git
|
|
rev: 8c783c5d754d83bcd50c28fb4174854b04ece990
|
|
- name: default nightly
|
|
run: rustup default nightly
|
|
- uses: actions/checkout@v4
|
|
- if: runner.os == 'Linux'
|
|
uses: ./.github/workflows/ubuntu-prepare
|
|
- uses: Swatinem/rust-cache@v2
|
|
with: { shared-key: "ubuntu" }
|
|
if: runner.os == 'Linux'
|
|
- uses: Swatinem/rust-cache@v2
|
|
if: runner.os != 'Linux'
|
|
- name: Check for binary blobs
|
|
if: runner.os == 'Linux'
|
|
run: ./scripts/check_for_blobs.sh
|
|
- name: Build libafl debug
|
|
run: cargo build -p libafl
|
|
- name: Test the book (Linux)
|
|
# TODO: fix books test fail with updated windows-rs
|
|
if: runner.os == 'Linux'
|
|
run: cd docs && mdbook test -L ../target/debug/deps
|
|
- name: Test the book (MacOS)
|
|
if: runner.os == 'MacOS'
|
|
run: cd docs && mdbook test -L ../target/debug/deps $(python3-config --ldflags | cut -d ' ' -f1)
|
|
- name: Run tests
|
|
run: cargo test
|
|
- name: Test libafl no_std
|
|
run: cd libafl && cargo test --no-default-features
|
|
- name: Test libafl_bolts no_std no_alloc
|
|
run: cd libafl_bolts && cargo test --no-default-features
|
|
- name: Test libafl_targets no_std
|
|
run: cd libafl_targets && cargo test --no-default-features
|
|
|
|
ubuntu-doc-build:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/workflows/ubuntu-prepare
|
|
- uses: Swatinem/rust-cache@v2
|
|
# ---- doc check ----
|
|
- name: Build Docs
|
|
run: RUSTFLAGS="--cfg docsrs" cargo +nightly doc --all-features --no-deps
|
|
|
|
ubuntu-doc-test:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/workflows/ubuntu-prepare
|
|
- uses: Swatinem/rust-cache@v2
|
|
# ---- doc check ----
|
|
- name: Test Docs
|
|
run: RUSTFLAGS="--cfg docsrs" cargo +nightly test --doc --all-features
|
|
|
|
ubuntu-miri:
|
|
runs-on: ubuntu-24.04
|
|
if: contains( github.event.pull_request.labels.*.name, 'pre-release')
|
|
steps:
|
|
- name: Add nightly clippy
|
|
run: rustup toolchain install nightly --component miri --allow-downgrade
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/workflows/ubuntu-prepare
|
|
- uses: Swatinem/rust-cache@v2
|
|
# --- miri undefined behavior test --
|
|
- name: Run miri tests
|
|
run: RUST_BACKTRACE=1 MIRIFLAGS="-Zmiri-disable-isolation" cargo +nightly miri test
|
|
|
|
ubuntu:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Remove Dotnet & Haskell
|
|
run: rm -rf /usr/share/dotnet && rm -rf /opt/ghc
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/workflows/ubuntu-prepare
|
|
- uses: Swatinem/rust-cache@v2
|
|
with: { shared-key: "ubuntu" }
|
|
# pcguard edges and pcguard hitcounts are not compatible and we need to build them seperately
|
|
- name: Check pcguard edges
|
|
run: cargo check --features=sancov_pcguard_edges
|
|
- name: run shellcheck
|
|
run: shellcheck ./scripts/*.sh
|
|
# ---- build normal and examples ----
|
|
- name: Run a normal build
|
|
run: cargo build --verbose
|
|
- name: Build examples
|
|
run: cargo build --examples --verbose
|
|
|
|
ubuntu-clippy:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Remove Dotnet & Haskell
|
|
run: rm -rf /usr/share/dotnet && rm -rf /opt/ghc
|
|
- name: Add nightly clippy
|
|
run: rustup toolchain install nightly --component clippy --allow-downgrade && rustup default nightly
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/workflows/ubuntu-prepare
|
|
- uses: Swatinem/rust-cache@v2
|
|
with: { shared-key: "ubuntu" }
|
|
- name: Run clippy
|
|
run: LLVM_CONFIG=llvm-config-${{env.MAIN_LLVM_VERSION}} ./scripts/clippy.sh
|
|
# --- test embedding the libafl_libfuzzer_runtime library
|
|
# Fix me plz
|
|
# - name: Test Build libafl_libfuzzer with embed
|
|
# run: cargo +nightly test --features=embed-runtime --manifest-path libafl_libfuzzer/Cargo.toml
|
|
|
|
ubuntu-check:
|
|
runs-on: ubuntu-24.04
|
|
needs: ubuntu
|
|
strategy:
|
|
matrix:
|
|
instance_idx: [ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17" ]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/workflows/ubuntu-prepare
|
|
- uses: Swatinem/rust-cache@v2
|
|
with: { shared-key: "ubuntu" }
|
|
# ---- build and feature check ----
|
|
# cargo-hack's --feature-powerset would be nice here but libafl has a too many knobs
|
|
- name: Check each feature
|
|
# Skipping `python` as it has to be built with the `maturin` tool
|
|
# `sancov_pcguard_edges` is tested seperatelyc
|
|
run: python3 ./scripts/parallellize_cargo_check.py ${{ matrix.instance_idx }}
|
|
|
|
ubuntu-concolic:
|
|
runs-on: ubuntu-24.04
|
|
needs: ubuntu
|
|
steps:
|
|
- name: Install curl
|
|
run: sudo apt-get update && sudo apt-get install clang
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: actions/checkout@v4
|
|
- uses: Swatinem/rust-cache@v2
|
|
with: { shared-key: "ubuntu" }
|
|
- name: Install smoke test deps
|
|
run: sudo ./libafl_concolic/test/smoke_test_ubuntu_deps.sh
|
|
- name: Run smoke test
|
|
run: ./libafl_concolic/test/smoke_test.sh
|
|
|
|
python-bindings:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Install deps
|
|
run: sudo apt-get update && sudo apt-get install -y lsb-release wget software-properties-common gnupg ninja-build python3-dev python3-pip python3-venv libz3-dev
|
|
- name: Install maturin
|
|
run: cargo install --locked maturin
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/workflows/ubuntu-prepare
|
|
- uses: Swatinem/rust-cache@v2
|
|
with: { shared-key: "ubuntu" }
|
|
- name: Run a maturin build
|
|
run: export LLVM_CONFIG=llvm-config-${{env.MAIN_LLVM_VERSION}} && cd ./bindings/pylibafl && python3 -m venv .env && . .env/bin/activate && pip install --upgrade --force-reinstall . && ./test.sh
|
|
- name: Run python test
|
|
run: . ./bindings/pylibafl/.env/bin/activate # && cd ./fuzzers/binary_only/python_qemu/ && python3 fuzzer.py 2>&1 | grep "Bye"
|
|
|
|
cargo-fmt:
|
|
runs-on: ubuntu-24.04
|
|
env:
|
|
MAIN_LLVM_VERSION: 19
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/workflows/ubuntu-prepare
|
|
- name: Add rustfmt nightly
|
|
shell: bash
|
|
run: rustup component add --toolchain nightly-x86_64-unknown-linux-gnu rustfmt
|
|
- uses: Swatinem/rust-cache@v2
|
|
with: { shared-key: "ubuntu" }
|
|
- name: Installing black
|
|
run: python3 -m pip install black
|
|
- name: Format Check
|
|
run: ./scripts/fmt_all.sh check
|
|
|
|
check-md-links:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install linkspector
|
|
shell: bash
|
|
run: sudo apt-get update && sudo apt-get install -y npm && npm install -g @umbrelladocs/linkspector
|
|
- name: Run linkspector
|
|
shell: bash
|
|
run: ./scripts/check_md_links.sh
|
|
# TODO: Use github action once it's fixed (https://github.com/UmbrellaDocs/action-linkspector/issues/20)
|
|
# - name: Run linkspector
|
|
# uses: umbrelladocs/action-linkspector@v1
|
|
# with:
|
|
# fail_on_error: 'true'
|
|
# config_file: '.github/.linkspector.yml'
|
|
|
|
msrv:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: taiki-e/install-action@cargo-hack
|
|
# Note: We currently only specify minimum rust versions for the default workspace members
|
|
- run: cargo hack check --rust-version -p libafl -p libafl_bolts -p libafl_derive -p libafl_cc -p libafl_targets
|
|
|
|
fuzzers-preflight:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Fuzzer in CI Check
|
|
run: ./scripts/check_tested_fuzzers.sh
|
|
|
|
fuzzers:
|
|
needs:
|
|
- fuzzers-preflight
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
os: [ ubuntu-24.04 ]
|
|
fuzzer:
|
|
# Baby
|
|
- ./fuzzers/baby/baby_fuzzer_swap_differential
|
|
- ./fuzzers/baby/tutorial
|
|
- ./fuzzers/baby/baby_fuzzer
|
|
# - ./fuzzers/baby/backtrace_baby_fuzzers
|
|
- ./fuzzers/baby/baby_fuzzer_unicode
|
|
- ./fuzzers/baby/baby_fuzzer_minimizing
|
|
- ./fuzzers/baby/backtrace_baby_fuzzers/c_code_with_fork_executor
|
|
- ./fuzzers/baby/backtrace_baby_fuzzers/c_code_with_inprocess_executor
|
|
- ./fuzzers/baby/backtrace_baby_fuzzers/rust_code_with_fork_executor
|
|
- ./fuzzers/baby/backtrace_baby_fuzzers/rust_code_with_inprocess_executor
|
|
- ./fuzzers/baby/backtrace_baby_fuzzers/command_executor
|
|
- ./fuzzers/baby/backtrace_baby_fuzzers/forkserver_executor
|
|
- ./fuzzers/baby/baby_fuzzer_custom_executor
|
|
|
|
# Binary-only
|
|
- ./fuzzers/binary_only/fuzzbench_fork_qemu
|
|
- ./fuzzers/binary_only/frida_executable_libpng
|
|
- ./fuzzers/binary_only/frida_windows_gdiplus
|
|
- ./fuzzers/binary_only/frida_libpng
|
|
- ./fuzzers/binary_only/fuzzbench_qemu
|
|
- ./fuzzers/binary_only/intel_pt_baby_fuzzer
|
|
- ./fuzzers/binary_only/intel_pt_command_executor
|
|
- ./fuzzers/binary_only/tinyinst_simple
|
|
|
|
# Forkserver
|
|
- ./fuzzers/forkserver/forkserver_simple
|
|
- ./fuzzers/forkserver/forkserver_libafl_cc
|
|
- ./fuzzers/forkserver/fuzzbench_forkserver
|
|
- ./fuzzers/forkserver/fuzzbench_forkserver_cmplog
|
|
- ./fuzzers/forkserver/libafl-fuzz
|
|
- ./fuzzers/forkserver/baby_fuzzer_with_forkexecutor
|
|
|
|
# Full-system
|
|
- ./fuzzers/full_system/nyx_libxml2_standalone
|
|
- ./fuzzers/full_system/nyx_libxml2_parallel
|
|
|
|
# Structure-aware
|
|
- ./fuzzers/structure_aware/nautilus_sync
|
|
- ./fuzzers/structure_aware/baby_fuzzer_grimoire
|
|
- ./fuzzers/structure_aware/baby_fuzzer_gramatron
|
|
- ./fuzzers/structure_aware/baby_fuzzer_tokens
|
|
- ./fuzzers/structure_aware/baby_fuzzer_multi
|
|
- ./fuzzers/structure_aware/baby_fuzzer_custom_input
|
|
- ./fuzzers/structure_aware/baby_fuzzer_nautilus
|
|
- ./fuzzers/structure_aware/forkserver_simple_nautilus
|
|
|
|
# In-process
|
|
- ./fuzzers/fuzz_anything/cargo_fuzz
|
|
# - ./fuzzers/inprocess/dynamic_analysis
|
|
- ./fuzzers/inprocess/fuzzbench
|
|
- ./fuzzers/inprocess/fuzzbench_text
|
|
- ./fuzzers/inprocess/fuzzbench_ctx
|
|
- ./fuzzers/inprocess/libfuzzer_libmozjpeg
|
|
- ./fuzzers/inprocess/libfuzzer_libpng
|
|
- ./fuzzers/inprocess/libfuzzer_libpng_launcher
|
|
- ./fuzzers/inprocess/libfuzzer_libpng_accounting
|
|
- ./fuzzers/inprocess/libfuzzer_libpng_centralized
|
|
- ./fuzzers/inprocess/libfuzzer_libpng_cmin
|
|
- ./fuzzers/inprocess/libfuzzer_libpng_norestart
|
|
# - ./fuzzers/inprocess/libfuzzer_libpng_tcp_manager
|
|
- ./fuzzers/inprocess/libfuzzer_stb_image_sugar
|
|
- ./fuzzers/inprocess/libfuzzer_stb_image
|
|
# - ./fuzzers/structure_aware/libfuzzer_stb_image_concolic
|
|
# - ./fuzzers/inprocess/libfuzzer_windows_asan
|
|
# - ./fuzzers/inprocess/sqlite_centralized_multi_machine
|
|
|
|
# Fuzz Anything
|
|
- ./fuzzers/fuzz_anything/push_harness
|
|
- ./fuzzers/fuzz_anything/push_stage_harness
|
|
- ./fuzzers/fuzz_anything/libafl_atheris
|
|
- ./fuzzers/fuzz_anything/baby_no_std
|
|
- ./fuzzers/fuzz_anything/baby_fuzzer_wasm
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/workflows/fuzzer-tester-prepare
|
|
- name: Build and run example fuzzers (Linux)
|
|
if: runner.os == 'Linux'
|
|
shell: bash
|
|
run: RUN_ON_CI=1 LLVM_CONFIG=llvm-config-${{env.MAIN_LLVM_VERSION}} ./scripts/test_fuzzer.sh ${{ matrix.fuzzer }}
|
|
|
|
changes:
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
pull-requests: read
|
|
outputs:
|
|
qemu: ${{ steps.filter.outputs.qemu }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dorny/paths-filter@v3
|
|
id: filter
|
|
with:
|
|
filters: |
|
|
qemu:
|
|
- '.github/**'
|
|
- 'libafl/**'
|
|
- 'libafl_bolts/**'
|
|
- 'libafl_targets/**'
|
|
- 'libafl_qemu/**'
|
|
- 'fuzzers/*qemu*/**'
|
|
|
|
fuzzers-qemu:
|
|
needs:
|
|
- changes
|
|
if: ${{ needs.changes.outputs.qemu == 'true' }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-24.04]
|
|
fuzzer:
|
|
# Binary only
|
|
- ./fuzzers/binary_only/qemu_cmin
|
|
- ./fuzzers/binary_only/qemu_coverage
|
|
- ./fuzzers/binary_only/qemu_launcher
|
|
|
|
# Full-system
|
|
- ./fuzzers/full_system/qemu_baremetal
|
|
# - ./fuzzers/full_system/qemu_linux_kernel
|
|
#- ./fuzzers/full_system/qemu_linux_process
|
|
|
|
runs-on: [ self-hosted, qemu ]
|
|
container: registry.gitlab.com/qemu-project/qemu/qemu/ubuntu2204:latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/workflows/qemu-fuzzer-tester-prepare
|
|
- name: Build and run example QEMU fuzzers (Linux)
|
|
if: runner.os == 'Linux'
|
|
shell: bash
|
|
run: RUN_ON_CI=1 LLVM_CONFIG=llvm-config-${{env.MAIN_LLVM_VERSION}} ./scripts/test_fuzzer.sh ${{ matrix.fuzzer }}
|
|
|
|
nostd-build:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: dtolnay/rust-toolchain@nightly
|
|
with:
|
|
components: rust-src
|
|
- name: Add targets
|
|
run: rustup target add arm-linux-androideabi && rustup target add thumbv6m-none-eabi
|
|
- uses: actions/checkout@v4
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: Build aarch64-unknown-none
|
|
run: cd ./fuzzers/fuzz_anything/baby_no_std && cargo +nightly build -Zbuild-std=core,alloc --target aarch64-unknown-none -v --release && cd ../..
|
|
- name: run x86_64 until panic!
|
|
run: cd ./fuzzers/fuzz_anything/baby_no_std && cargo +nightly run || test $? -ne 0 || exit 1
|
|
- name: no_std tests
|
|
run: cd ./libafl && cargo test --no-default-features
|
|
|
|
nostd-clippy:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: dtolnay/rust-toolchain@nightly
|
|
with:
|
|
components: clippy, rust-src
|
|
- name: Add targets
|
|
run: rustup target add arm-linux-androideabi && rustup target add thumbv6m-none-eabi
|
|
- uses: actions/checkout@v4
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: libafl armv6m-none-eabi (32 bit no_std) clippy
|
|
run: cd ./libafl && cargo clippy --target thumbv6m-none-eabi --no-default-features
|
|
- name: Build no_std no_alloc bolts
|
|
run: cd ./libafl_bolts && cargo +nightly build -Zbuild-std=core --target aarch64-unknown-none --no-default-features -v --release && cd ../
|
|
|
|
format-toml:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Install taplo
|
|
run: curl -fsSL https://github.com/tamasfe/taplo/releases/latest/download/taplo-full-linux-x86_64.gz | gzip -d - | install -m 755 /dev/stdin /usr/local/bin/taplo
|
|
- uses: actions/checkout@v4
|
|
- name: Run taplo
|
|
run: taplo format --check
|
|
|
|
build-docker:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Build docker
|
|
run: docker build -t libafl .
|
|
|
|
windows-frida-libpng:
|
|
runs-on: windows-latest
|
|
needs:
|
|
- common
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/workflows/windows-tester-prepare
|
|
- name: Build fuzzers/binary_only/frida_libpng
|
|
run: cd fuzzers/binary_only/frida_libpng/ && cargo make test
|
|
|
|
windows-frida-libfuzzer-stb-image:
|
|
runs-on: windows-latest
|
|
needs:
|
|
- common
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/workflows/windows-tester-prepare
|
|
- name: Build fuzzers/inprocess/libfuzzer_stb_image
|
|
run: cd fuzzers/inprocess/libfuzzer_stb_image && cargo build --release
|
|
|
|
windows-frida-gdiplus:
|
|
runs-on: windows-latest
|
|
needs:
|
|
- common
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/workflows/windows-tester-prepare
|
|
- name: Build fuzzers/binary_only/frida_windows_gdiplus
|
|
run: cd fuzzers/binary_only/frida_windows_gdiplus/ && cargo make test && cargo make test_cmplog
|
|
|
|
windows-tinyinst-simple:
|
|
runs-on: windows-latest
|
|
needs:
|
|
- common
|
|
steps:
|
|
- name: install cxx bridge
|
|
run: cargo install cxxbridge-cmd
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/workflows/windows-tester-prepare
|
|
- name: Build fuzzers/binary_only/tinyinst_simple
|
|
run: cd fuzzers/binary_only/tinyinst_simple/ && cargo make test
|
|
|
|
windows-clippy:
|
|
runs-on: windows-latest
|
|
needs:
|
|
- common
|
|
steps:
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/workflows/windows-tester-prepare
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: Run real clippy, not the fake one
|
|
shell: pwsh
|
|
run: .\scripts\clippy.ps1
|
|
|
|
macos:
|
|
runs-on: macOS-latest
|
|
steps:
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- name: Add nightly clippy
|
|
run: rustup toolchain install nightly --component clippy --allow-downgrade && rustup default nightly
|
|
- name: Install deps
|
|
run: brew install z3 gtk+3 python
|
|
- name: Install cxxbridge
|
|
run: cargo install cxxbridge-cmd
|
|
- uses: actions/checkout@v4
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: MacOS Build
|
|
run: cargo build --verbose
|
|
- name: Increase map sizes
|
|
run: ./scripts/shmem_limits_macos.sh
|
|
- name: Run Tests
|
|
run: cargo test
|
|
- name: Clippy
|
|
run: cargo +nightly clippy --tests --all --exclude libafl_nyx --exclude symcc_runtime --exclude runtime_test
|
|
|
|
ios:
|
|
runs-on: macOS-latest
|
|
steps:
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- name: install ios
|
|
run: rustup target add aarch64-apple-ios
|
|
- uses: actions/checkout@v4
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: Build iOS
|
|
run: PYO3_CROSS_PYTHON_VERSION=$(python3 -c "print('{}.{}'.format(__import__('sys').version_info.major, __import__('sys').version_info.minor))") cargo build --target aarch64-apple-ios && cd libafl_frida && cargo build --target aarch64-apple-ios && cd ..
|
|
|
|
android:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Install curl
|
|
run: sudo apt-get update && sudo apt-get install clang
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: nttld/setup-ndk@v1
|
|
with:
|
|
ndk-version: r25b
|
|
- name: install android
|
|
run: rustup target add aarch64-linux-android
|
|
- name: install cargo ndk
|
|
run: cargo install cargo-ndk
|
|
- uses: actions/checkout@v4
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: Build Android
|
|
run: cd libafl && PYO3_CROSS_PYTHON_VERSION=$(python3 -c "print('{}.{}'.format(__import__('sys').version_info.major, __import__('sys').version_info.minor))") cargo ndk -t arm64-v8a build --release
|
|
|
|
#run: cargo build --target aarch64-linux-android
|
|
# TODO: Figure out how to properly build stuff with clang
|
|
#- name: Add clang path to $PATH env
|
|
# if: runner.os == 'Windows'
|
|
# run: echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
|
|
#- name: Try if clang works
|
|
# run: clang -v
|
|
#- name: Windows Test
|
|
# run: C:\Rust\.cargo\bin\cargo.exe test --verbose
|