Skip to content

Commit 8cd3767

Browse files
authored
Merge branch 'main' into main
2 parents 40bd080 + 184b69b commit 8cd3767

File tree

510 files changed

+114558
-3172
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

510 files changed

+114558
-3172
lines changed

.github/workflows/build_and_test.yml

Lines changed: 95 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,12 @@ jobs:
6161
- name: Test the book (MacOS)
6262
if: runner.os == 'MacOS'
6363
run: cd docs && mdbook test -L ../target/debug/deps $(python3-config --ldflags | cut -d ' ' -f1)
64-
- name: Run tests
65-
run: cargo test
64+
- name: Run tests (Windows)
65+
if: runner.os == 'Windows'
66+
run: cargo test -- --test-threads 1
67+
- name: Run tests (Linux)
68+
if: runner.os != 'Windows'
69+
run: cargo test -- --test-threads 1
6670
- name: Test libafl no_std
6771
run: cd libafl && cargo test --no-default-features
6872
- name: Test libafl_bolts no_std no_alloc
@@ -370,58 +374,95 @@ jobs:
370374
shell: bash
371375
run: RUN_ON_CI=1 LLVM_CONFIG=llvm-config-${{env.MAIN_LLVM_VERSION}} ./scripts/test_fuzzer.sh ${{ matrix.fuzzer }}
372376

373-
# fuzzers-qemu-user:
374-
# needs:
375-
# - changes
376-
# if: ${{ needs.changes.outputs.qemu == 'true' }}
377-
# strategy:
378-
# matrix:
379-
# os: [ubuntu-24.04]
380-
# fuzzer:
381-
# Binary only
382-
# - ./fuzzers/binary_only/qemu_cmin
383-
# - ./fuzzers/binary_only/qemu_coverage
384-
# - ./fuzzers/binary_only/qemu_launcher
385-
# arch:
386-
# # unless somebody pays us for the servers.
387-
# # - aarch64
388-
# # - arm
389-
# # - i386
390-
# # - ppc
391-
# - x86_64
392-
#
393-
# runs-on: [ self-hosted, qemu ]
394-
# container: registry.gitlab.com/qemu-project/qemu/qemu/ubuntu2204:latest
395-
# steps:
396-
# - uses: actions/checkout@v4
397-
# - uses: ./.github/workflows/qemu-fuzzer-tester-prepare
398-
# - name: Build and run example QEMU fuzzers (Linux)
399-
# if: runner.os == 'Linux'
400-
# shell: bash
401-
# run: ARCH=${{ matrix.arch }} RUN_ON_CI=1 LLVM_CONFIG=llvm-config-${{env.MAIN_LLVM_VERSION}} ./scripts/test_fuzzer.sh ${{ matrix.fuzzer }}
402-
#
403-
# fuzzers-qemu-system:
404-
# needs:
405-
# - changes
406-
# if: ${{ needs.changes.outputs.qemu == 'true' }}
407-
# strategy:
408-
# matrix:
409-
# os: [ubuntu-24.04]
410-
# fuzzer:
411-
# Full-system
412-
# - ./fuzzers/full_system/qemu_baremetal
413-
# - ./fuzzers/full_system/qemu_linux_kernel
414-
# - ./fuzzers/full_system/qemu_linux_process
415-
#
416-
# runs-on: [ self-hosted, qemu ]
417-
# container: registry.gitlab.com/qemu-project/qemu/qemu/ubuntu2204:latest
418-
# steps:
419-
# - uses: actions/checkout@v4
420-
# - uses: ./.github/workflows/qemu-fuzzer-tester-prepare
421-
# - name: Build and run example QEMU fuzzers (Linux)
422-
# if: runner.os == 'Linux'
423-
# shell: bash
424-
# run: RUN_ON_CI=1 LLVM_CONFIG=llvm-config-${{env.MAIN_LLVM_VERSION}} ./scripts/test_fuzzer.sh ${{ matrix.fuzzer }}
377+
fuzzers-qemu-user:
378+
needs:
379+
- changes
380+
if: ${{ needs.changes.outputs.qemu == 'true' }}
381+
strategy:
382+
matrix:
383+
os: [ubuntu-24.04]
384+
fuzzer:
385+
# Binary only
386+
- ./fuzzers/binary_only/qemu_cmin
387+
- ./fuzzers/binary_only/qemu_coverage
388+
- ./fuzzers/binary_only/qemu_launcher
389+
arch:
390+
# unless somebody pays us for the servers.
391+
# - aarch64
392+
# - arm
393+
# - i386
394+
# - ppc
395+
- x86_64
396+
397+
runs-on: [ self-hosted, qemu ]
398+
container: registry.gitlab.com/qemu-project/qemu/qemu/ubuntu2204:latest
399+
steps:
400+
- uses: actions/checkout@v4
401+
- uses: ./.github/workflows/qemu-fuzzer-tester-prepare
402+
- name: Build and run example QEMU fuzzers (Linux)
403+
if: runner.os == 'Linux'
404+
shell: bash
405+
run: ARCH=${{ matrix.arch }} RUN_ON_CI=1 LLVM_CONFIG=llvm-config-${{env.MAIN_LLVM_VERSION}} ./scripts/test_fuzzer.sh ${{ matrix.fuzzer }}
406+
407+
librasan-build:
408+
runs-on: ubuntu-24.04
409+
needs:
410+
- changes
411+
if: ${{ needs.changes.outputs.qemu == 'true' }}
412+
steps:
413+
- uses: actions/checkout@v4
414+
- uses: ./.github/workflows/librasan-prepare
415+
- name: Build
416+
if: runner.os == 'Linux'
417+
shell: bash
418+
run: |
419+
RUN_ON_CI=1 \
420+
LLVM_CONFIG=llvm-config-${{env.MAIN_LLVM_VERSION}} \
421+
just \
422+
-f ./libafl_qemu/librasan/Justfile \
423+
build_everything_dev \
424+
build_x86_64_release
425+
426+
librasan-test:
427+
runs-on: ubuntu-24.04
428+
needs:
429+
- changes
430+
if: ${{ needs.changes.outputs.qemu == 'true' }}
431+
steps:
432+
- uses: actions/checkout@v4
433+
- uses: ./.github/workflows/librasan-prepare
434+
- name: Build
435+
if: runner.os == 'Linux'
436+
shell: bash
437+
run: |
438+
RUN_ON_CI=1 \
439+
LLVM_CONFIG=llvm-config-${{env.MAIN_LLVM_VERSION}} \
440+
just \
441+
-f ./libafl_qemu/librasan/Justfile \
442+
test_everything
443+
444+
fuzzers-qemu-system:
445+
needs:
446+
- changes
447+
if: ${{ needs.changes.outputs.qemu == 'true' }}
448+
strategy:
449+
matrix:
450+
os: [ubuntu-24.04]
451+
fuzzer:
452+
# Full-system
453+
- ./fuzzers/full_system/qemu_baremetal
454+
- ./fuzzers/full_system/qemu_linux_kernel
455+
- ./fuzzers/full_system/qemu_linux_process
456+
457+
runs-on: [ self-hosted, qemu ]
458+
container: registry.gitlab.com/qemu-project/qemu/qemu/ubuntu2204:latest
459+
steps:
460+
- uses: actions/checkout@v4
461+
- uses: ./.github/workflows/qemu-fuzzer-tester-prepare
462+
- name: Build and run example QEMU fuzzers (Linux)
463+
if: runner.os == 'Linux'
464+
shell: bash
465+
run: RUN_ON_CI=1 LLVM_CONFIG=llvm-config-${{env.MAIN_LLVM_VERSION}} ./scripts/test_fuzzer.sh ${{ matrix.fuzzer }}
425466

426467
nostd-build:
427468
runs-on: ubuntu-24.04
@@ -552,8 +593,6 @@ jobs:
552593
run: cargo build --verbose
553594
- name: Increase map sizes
554595
run: ./scripts/shmem_limits_macos.sh
555-
- name: Run Tests
556-
run: cargo test
557596
- name: Clippy
558597
run: cargo +nightly clippy --tests --all --exclude libafl_nyx --exclude symcc_runtime --exclude runtime_test
559598

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Setup QEMU librasan environment
2+
description: Sets up the QEMU librasan environment
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Enable i386
7+
shell: bash
8+
run: sudo dpkg --add-architecture i386
9+
- name: Install QEMU deps
10+
shell: bash
11+
run: |
12+
sudo apt-get update && \
13+
DEBIAN_FRONTEND=noninteractive \
14+
sudo apt-get install -y \
15+
build-essential \
16+
clang-18 \
17+
clang++-18 \
18+
cmake \
19+
curl \
20+
g++-aarch64-linux-gnu \
21+
g++-arm-linux-gnueabi \
22+
g++-i686-linux-gnu \
23+
g++-mipsel-linux-gnu \
24+
g++-powerpc-linux-gnu \
25+
gcc-aarch64-linux-gnu \
26+
gcc-arm-linux-gnueabi \
27+
gcc-i686-linux-gnu \
28+
gcc-mipsel-linux-gnu \
29+
gcc-powerpc-linux-gnu \
30+
gdb \
31+
gdb-multiarch \
32+
git \
33+
gnupg \
34+
libc6-dev:i386 \
35+
libclang-dev \
36+
libgcc-13-dev:i386 \
37+
libglib2.0-dev \
38+
lsb-release \
39+
ninja-build \
40+
python3 \
41+
python3-pip \
42+
python3-venv \
43+
qemu-user \
44+
software-properties-common \
45+
wget
46+
- uses: dtolnay/rust-toolchain@nightly
47+
- name: install just
48+
uses: extractions/setup-just@v2
49+
with:
50+
just-version: 1.39.0
51+
- name: Install cargo-binstall
52+
shell: bash
53+
run: |
54+
curl -L --proto '=https' --tlsv1.2 -sSf \
55+
https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | \
56+
bash
57+
- name: Install nextest
58+
shell: bash
59+
run: |
60+
cargo binstall --no-confirm cargo-nextest
61+
- name: Install Rust Targets
62+
shell: bash
63+
run: |
64+
rustup target add armv7-unknown-linux-gnueabi && \
65+
rustup target add aarch64-unknown-linux-gnu && \
66+
rustup target add i686-unknown-linux-gnu && \
67+
rustup target add powerpc-unknown-linux-gnu
68+
- uses: actions/checkout@v4
69+
with:
70+
submodules: true
71+
fetch-depth: 0
72+
- uses: Swatinem/rust-cache@v2
73+
with: { shared-key: "${{ runner.os }}-shared-fuzzer-cache" }

.github/workflows/ubuntu-prepare/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ runs:
77
shell: bash
88
run: sudo apt-get update && sudo apt-get install -y curl lsb-release wget software-properties-common gnupg ninja-build shellcheck pax-utils nasm libsqlite3-dev libc6-dev libgtk-3-dev gcc g++ gcc-arm-none-eabi gcc-arm-linux-gnueabi g++-arm-linux-gnueabi libslirp-dev libz3-dev build-essential cmake
99
- uses: dtolnay/rust-toolchain@stable
10+
- name: install just
11+
uses: extractions/setup-just@v2
12+
with:
13+
just-version: 1.39.0
1014
- name: Add stable clippy
1115
shell: bash
1216
run: rustup toolchain install stable --component clippy --allow-downgrade

.gitignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
target
22
target-bin
33
out
4-
Cargo.lock
54
vendor
65

6+
# cargo lockfiles except from binaries
7+
**/Cargo.lock
8+
# !fuzzers/**/Cargo.lock
9+
# !utils/**/Cargo.lock
10+
11+
712
.DS_Store
813
.env
914
.vscode
@@ -88,3 +93,6 @@ rustc-ice-*
8893

8994
# log
9095
log
96+
97+
# Coredumps
98+
*.core

Cargo.toml

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ exclude = [
4242
"libafl_libfuzzer_runtime",
4343
"utils/noaslr",
4444
"utils/gdb_qemu",
45-
"utils/libafl_fmt",
45+
"utils/libafl_repo_tools",
4646
"utils/desyscall",
4747
"utils/multi_machine_generator",
4848
"scripts",
@@ -51,35 +51,35 @@ exclude = [
5151
]
5252

5353
[workspace.package]
54-
version = "0.15.1"
54+
version = "0.15.2"
5555
license = "MIT OR Apache-2.0"
5656

5757
[workspace.dependencies]
5858
# Internal deps
59-
libafl = { path = "./libafl", version = "0.15.1", default-features = false }
60-
libafl_bolts = { path = "./libafl_bolts", version = "0.15.1", default-features = false }
61-
libafl_cc = { path = "./libafl_cc", version = "0.15.1", default-features = false }
62-
symcc_runtime = { path = "./libafl_concolic/symcc_runtime", version = "0.15.1", default-features = false }
63-
symcc_libafl = { path = "./libafl_concolic/symcc_libafl", version = "0.15.1", default-features = false }
64-
libafl_derive = { path = "./libafl_derive", version = "0.15.1", default-features = false }
65-
libafl_frida = { path = "./libafl_frida", version = "0.15.1", default-features = false }
66-
libafl_intelpt = { path = "./libafl_intelpt", version = "0.15.1", default-features = false }
67-
libafl_libfuzzer = { path = "./libafl_libfuzzer", version = "0.15.1", default-features = false }
68-
libafl_nyx = { path = "./libafl_nyx", version = "0.15.1", default-features = false }
69-
libafl_targets = { path = "./libafl_targets", version = "0.15.1", default-features = false }
70-
libafl_tinyinst = { path = "./libafl_tinyinst", version = "0.15.1", default-features = false }
71-
libafl_qemu = { path = "./libafl_qemu", version = "0.15.1", default-features = false }
72-
libafl_qemu_build = { path = "./libafl_qemu/libafl_qemu_build", version = "0.15.1", default-features = false }
73-
libafl_qemu_sys = { path = "./libafl_qemu/libafl_qemu_sys", version = "0.15.1", default-features = false }
74-
libafl_sugar = { path = "./libafl_sugar", version = "0.15.1", default-features = false }
75-
dump_constraints = { path = "./libafl_concolic/test/dump_constraints", version = "0.15.1", default-features = false }
76-
runtime_test = { path = "./libafl_concolic/test/runtime_test", version = "0.15.1", default-features = false }
77-
build_and_test_fuzzers = { path = "./utils/build_and_test_fuzzers", version = "0.15.1", default-features = false }
78-
deexit = { path = "./utils/deexit", version = "0.15.1", default-features = false }
79-
drcov_utils = { path = "./utils/drcov_utils", version = "0.15.1", default-features = false }
80-
construct_automata = { path = "./utils/gramatron/construct_automata", version = "0.15.1", default-features = false }
81-
libafl_benches = { path = "./utils/libafl_benches", version = "0.15.1", default-features = false }
82-
libafl_jumper = { path = "./utils/libafl_jumper", version = "0.15.1", default-features = false }
59+
libafl = { path = "./libafl", version = "0.15.2", default-features = false }
60+
libafl_bolts = { path = "./libafl_bolts", version = "0.15.2", default-features = false }
61+
libafl_cc = { path = "./libafl_cc", version = "0.15.2", default-features = false }
62+
symcc_runtime = { path = "./libafl_concolic/symcc_runtime", version = "0.15.2", default-features = false }
63+
symcc_libafl = { path = "./libafl_concolic/symcc_libafl", version = "0.15.2", default-features = false }
64+
libafl_derive = { path = "./libafl_derive", version = "0.15.2", default-features = false }
65+
libafl_frida = { path = "./libafl_frida", version = "0.15.2", default-features = false }
66+
libafl_intelpt = { path = "./libafl_intelpt", version = "0.15.2", default-features = false }
67+
libafl_libfuzzer = { path = "./libafl_libfuzzer", version = "0.15.2", default-features = false }
68+
libafl_nyx = { path = "./libafl_nyx", version = "0.15.2", default-features = false }
69+
libafl_targets = { path = "./libafl_targets", version = "0.15.2", default-features = false }
70+
libafl_tinyinst = { path = "./libafl_tinyinst", version = "0.15.2", default-features = false }
71+
libafl_qemu = { path = "./libafl_qemu", version = "0.15.2", default-features = false }
72+
libafl_qemu_build = { path = "./libafl_qemu/libafl_qemu_build", version = "0.15.2", default-features = false }
73+
libafl_qemu_sys = { path = "./libafl_qemu/libafl_qemu_sys", version = "0.15.2", default-features = false }
74+
libafl_sugar = { path = "./libafl_sugar", version = "0.15.2", default-features = false }
75+
dump_constraints = { path = "./libafl_concolic/test/dump_constraints", version = "0.15.2", default-features = false }
76+
runtime_test = { path = "./libafl_concolic/test/runtime_test", version = "0.15.2", default-features = false }
77+
build_and_test_fuzzers = { path = "./utils/build_and_test_fuzzers", version = "0.15.2", default-features = false }
78+
deexit = { path = "./utils/deexit", version = "0.15.2", default-features = false }
79+
drcov_utils = { path = "./utils/drcov_utils", version = "0.15.2", default-features = false }
80+
construct_automata = { path = "./utils/gramatron/construct_automata", version = "0.15.2", default-features = false }
81+
libafl_benches = { path = "./utils/libafl_benches", version = "0.15.2", default-features = false }
82+
libafl_jumper = { path = "./utils/libafl_jumper", version = "0.15.2", default-features = false }
8383

8484
# External deps
8585
ahash = { version = "0.8.11", default-features = false } # The hash function already used in hashbrown
@@ -96,20 +96,22 @@ cmake = "0.1.51"
9696
document-features = "0.2.10"
9797
fastbloom = { version = "0.9.0", default-features = false }
9898
hashbrown = { version = "0.14.5", default-features = false } # A faster hashmap, nostd compatible
99+
just = "1.40.0"
99100
libc = "0.2.159" # For (*nix) libc
100101
libipt = "0.3.0"
101102
log = "0.4.22"
102103
meminterval = "0.4.1"
103104
mimalloc = { version = "0.1.43", default-features = false }
104105
nix = { version = "0.29.0", default-features = false }
106+
num-derive = { version = "0.4.2", default-features = false }
105107
num_enum = { version = "0.7.3", default-features = false }
106108
num-traits = { version = "0.2.19", default-features = false }
107109
paste = "1.0.15"
108110
postcard = { version = "1.0.10", features = [
109111
"alloc",
110112
], default-features = false } # no_std compatible serde serialization format
111-
pyo3 = "0.23.2"
112-
pyo3-build-config = "0.23.2"
113+
pyo3 = "0.24.0"
114+
pyo3-build-config = "0.24.0"
113115
rangemap = "1.5.1"
114116
regex = "1.10.6"
115117
rustversion = "1.0.17"
@@ -121,11 +123,11 @@ static_assertions = "1.1.0"
121123
strum = "0.27.0"
122124
strum_macros = "0.27.0"
123125
toml = "0.8.19" # For parsing the injections toml file
124-
typed-builder = "0.20.0" # Implement the builder pattern at compiletime
126+
typed-builder = "0.21.0" # Implement the builder pattern at compiletime
125127
typeid = "1.0.0" # Safe type_eq that doesn't rely on std specialization
126128
unicorn-engine = "2.0.1" # Used in libafl_unicorn
127129
uuid = { version = "1.10.0", features = ["serde", "v4"] }
128-
which = "6.0.3"
130+
which = "7.0.2"
129131
windows = "0.59.0"
130132
z3 = "0.12.1"
131133
fs2 = "0.4.3" # Used by OnDisk Corpus for file locking
@@ -171,6 +173,7 @@ similar_names = "allow"
171173
too_many_lines = "allow"
172174
comparison_chain = "allow" # This lint makes **ZERO** sense
173175
unnecessary_debug_formatting = "allow" # :thumbsdown: :thumbsdown: :thumbsdown: :thumbsdown: :thumbsdown: :thumbsdown:
176+
struct_field_names = "allow" # ????
174177

175178
[workspace.lints.rustdoc]
176179
# Deny

0 commit comments

Comments
 (0)