Skip to content

Commit bcc44ee

Browse files
authored
Initial split of LibAFL-Bolts into smaller crates, towards 0.16.0 (#3331)
* Initial split [WIP] * on avance toujours * More more * mas * mas * Still more * mroe fix * Move rust-toolchain file to toml * builds oO * fmt * bring back unused features * no_std * remove once_cell * remove this stuff * more less std * no_std * clippy * More work * fix * fix * make things build again * Fixes all around * more more fix * things * Moar fix * more fix, just fix * Added vibe-coded readmes * more doc * more read * more cleanup * more more more (she cried) * oof hole of worms * more stuff * fixes * more fun * more * more * more fmt * alloc * more fun * more fix * more fix * clip * fixes * undo fmt * fmt * clip * 0.16.0 let's go * update publish.sh * README * More readme
1 parent 732f9c4 commit bcc44ee

File tree

229 files changed

+6117
-2208
lines changed

Some content is hidden

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

229 files changed

+6117
-2208
lines changed

Cargo.lock

Lines changed: 271 additions & 64 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 83 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,122 @@
11
[workspace]
22
resolver = "2"
33
members = [
4-
"crates/libafl",
4+
"crates/build_id2",
5+
"crates/core_affinity2",
6+
"crates/exceptional",
7+
"crates/fast_rands",
58
"crates/libafl_asan",
69
"crates/libafl_asan/libafl_asan_fuzz",
710
"crates/libafl_asan/libafl_asan_libc",
811
"crates/libafl_bolts",
912
"crates/libafl_cc",
10-
"crates/libafl_concolic/symcc_runtime",
1113
"crates/libafl_concolic/symcc_libafl",
14+
"crates/libafl_concolic/symcc_runtime",
15+
"crates/libafl_concolic/test/dump_constraints",
16+
"crates/libafl_concolic/test/runtime_test",
17+
"crates/libafl_core",
1218
"crates/libafl_derive",
1319
"crates/libafl_frida",
1420
"crates/libafl_intelpt",
1521
"crates/libafl_libfuzzer",
1622
"crates/libafl_nyx",
17-
"crates/libafl_unicorn",
18-
"crates/libafl_targets",
19-
"crates/libafl_tinyinst",
2023
"crates/libafl_qemu",
2124
"crates/libafl_qemu/libafl_qemu_build",
2225
"crates/libafl_qemu/libafl_qemu_runner",
2326
"crates/libafl_qemu/libafl_qemu_sys",
2427
"crates/libafl_qemu/libvharness_sys",
2528
"crates/libafl_sugar",
26-
"crates/libafl_concolic/test/dump_constraints",
27-
"crates/libafl_concolic/test/runtime_test",
29+
"crates/libafl_targets",
30+
"crates/libafl_tinyinst",
31+
"crates/libafl_unicorn",
32+
"crates/libafl",
33+
"crates/ll_mp",
34+
"crates/minibsod",
35+
"crates/no_std_time",
36+
"crates/ownedref",
37+
"crates/serde_anymap",
38+
"crates/shmem_providers",
39+
"crates/tuple_list_ex",
2840
"utils/build_and_test_fuzzers",
41+
"utils/ci_runner",
42+
"utils/ci_splitter",
2943
"utils/deexit",
3044
"utils/drcov_utils",
3145
"utils/gramatron/construct_automata",
3246
"utils/libafl_benches",
3347
"utils/libafl_jumper",
34-
"utils/ci_runner",
35-
"utils/ci_splitter",
3648
]
3749

3850
default-members = [
39-
"crates/libafl",
4051
"crates/libafl_bolts",
4152
"crates/libafl_cc",
4253
"crates/libafl_derive",
4354
"crates/libafl_targets",
55+
"crates/libafl",
4456
]
4557

4658
exclude = [
4759
"bindings/pylibafl",
60+
"crates/libafl_libfuzzer_runtime",
4861
"docs",
4962
"fuzzers",
50-
"crates/libafl_libfuzzer_runtime",
51-
"utils/noaslr",
63+
"scripts",
5264
"utils/gdb_qemu",
5365
"utils/libafl_repo_tools",
5466
"utils/multi_machine_generator",
55-
"scripts",
67+
"utils/noaslr",
5668
# additional crates
5769
"crates/libafl_concolic/test/symcc/util/symcc_fuzzing_helper",
5870
]
5971

6072
[workspace.package]
61-
version = "0.15.4"
73+
version = "0.16.0"
6274
license = "MIT OR Apache-2.0"
6375
repository = "https://github.com/AFLplusplus/LibAFL/"
6476
readme = "./README.md"
6577

6678
[workspace.dependencies]
6779
# Internal deps
68-
libafl = { path = "./crates/libafl", version = "0.15.4", default-features = false }
69-
libafl_bolts = { path = "./crates/libafl_bolts", version = "0.15.4", default-features = false }
70-
libafl_cc = { path = "./crates/libafl_cc", version = "0.15.4", default-features = false }
71-
symcc_runtime = { path = "./crates/libafl_concolic/symcc_runtime", version = "0.15.4", default-features = false }
72-
symcc_libafl = { path = "./crates/libafl_concolic/symcc_libafl", version = "0.15.4", default-features = false }
73-
libafl_derive = { path = "./crates/libafl_derive", version = "0.15.4", default-features = false }
74-
libafl_frida = { path = "./crates/libafl_frida", version = "0.15.4", default-features = false }
75-
libafl_intelpt = { path = "./crates/libafl_intelpt", version = "0.15.4", default-features = false }
76-
libafl_libfuzzer = { path = "./crates/libafl_libfuzzer", version = "0.15.4", default-features = false }
77-
libafl_nyx = { path = "./crates/libafl_nyx", version = "0.15.4", default-features = false }
78-
libafl_targets = { path = "./crates/libafl_targets", version = "0.15.4", default-features = false }
79-
libafl_tinyinst = { path = "./crates/libafl_tinyinst", version = "0.15.4", default-features = false }
80-
libafl_qemu = { path = "./crates/libafl_qemu", version = "0.15.4", default-features = false }
81-
libafl_qemu_build = { path = "./crates/libafl_qemu/libafl_qemu_build", version = "0.15.4", default-features = false }
82-
libafl_qemu_sys = { path = "./crates/libafl_qemu/libafl_qemu_sys", version = "0.15.4", default-features = false }
83-
libvharness_sys = { path = "./crates/libafl_qemu/libvharness_sys", version = "0.15.4", default-features = false }
84-
libafl_sugar = { path = "./crates/libafl_sugar", version = "0.15.4", default-features = false }
85-
dump_constraints = { path = "./crates/libafl_concolic/test/dump_constraints", version = "0.15.4", default-features = false }
86-
runtime_test = { path = "./crates/libafl_concolic/test/runtime_test", version = "0.15.4", default-features = false }
87-
build_and_test_fuzzers = { path = "./utils/build_and_test_fuzzers", version = "0.15.4", default-features = false }
88-
deexit = { path = "./utils/deexit", version = "0.15.4", default-features = false }
89-
drcov_utils = { path = "./utils/drcov_utils", version = "0.15.4", default-features = false }
90-
construct_automata = { path = "./utils/gramatron/construct_automata", version = "0.15.4", default-features = false }
91-
libafl_benches = { path = "./utils/libafl_benches", version = "0.15.4", default-features = false }
92-
libafl_jumper = { path = "./utils/libafl_jumper", version = "0.15.4", default-features = false }
80+
build_id2 = { path = "./crates/build_id2", version = "0.16.0", default-features = false }
81+
core_affinity2 = { path = "./crates/core_affinity2", version = "0.16.0", default-features = false }
82+
exceptional = { path = "./crates/exceptional", version = "0.16.0", default-features = false }
83+
fast_rands = { path = "./crates/fast_rands", version = "0.16.0", default-features = false }
84+
libafl = { path = "./crates/libafl", version = "0.16.0", default-features = false }
85+
libafl_bolts = { path = "./crates/libafl_bolts", version = "0.16.0", default-features = false }
86+
libafl_cc = { path = "./crates/libafl_cc", version = "0.16.0", default-features = false }
87+
libafl_core = { path = "./crates/libafl_core", version = "0.16.0", default-features = false }
88+
libafl_derive = { path = "./crates/libafl_derive", version = "0.16.0", default-features = false }
89+
libafl_frida = { path = "./crates/libafl_frida", version = "0.16.0", default-features = false }
90+
libafl_intelpt = { path = "./crates/libafl_intelpt", version = "0.16.0", default-features = false }
91+
libafl_libfuzzer = { path = "./crates/libafl_libfuzzer", version = "0.16.0", default-features = false }
92+
libafl_nyx = { path = "./crates/libafl_nyx", version = "0.16.0", default-features = false }
93+
libafl_qemu = { path = "./crates/libafl_qemu", version = "0.16.0", default-features = false }
94+
libafl_qemu_build = { path = "./crates/libafl_qemu/libafl_qemu_build", version = "0.16.0", default-features = false }
95+
libafl_qemu_sys = { path = "./crates/libafl_qemu/libafl_qemu_sys", version = "0.16.0", default-features = false }
96+
libafl_sugar = { path = "./crates/libafl_sugar", version = "0.16.0", default-features = false }
97+
libafl_targets = { path = "./crates/libafl_targets", version = "0.16.0", default-features = false }
98+
libafl_tinyinst = { path = "./crates/libafl_tinyinst", version = "0.16.0", default-features = false }
99+
ll_mp = { path = "./crates/ll_mp", version = "0.16.0", default-features = false }
100+
minibsod = { path = "./crates/minibsod", version = "0.16.0", default-features = false }
101+
no_std_time = { path = "./crates/no_std_time", version = "0.16.0", default-features = false }
102+
ownedref = { path = "./crates/ownedref", version = "0.16.0", default-features = false }
103+
serde_anymap = { path = "./crates/serde_anymap", version = "0.16.0", default-features = false }
104+
shmem_providers = { path = "./crates/shmem_providers", version = "0.16.0", default-features = false }
105+
tuple_list_ex = { path = "./crates/tuple_list_ex", version = "0.16.0", default-features = false }
106+
107+
# Concolic fuzzing crates
108+
dump_constraints = { path = "./crates/libafl_concolic/test/dump_constraints", version = "0.16.0", default-features = false }
109+
runtime_test = { path = "./crates/libafl_concolic/test/runtime_test", version = "0.16.0", default-features = false }
110+
symcc_libafl = { path = "./crates/libafl_concolic/symcc_libafl", version = "0.16.0", default-features = false }
111+
symcc_runtime = { path = "./crates/libafl_concolic/symcc_runtime", version = "0.16.0", default-features = false }
112+
113+
# Utils
114+
build_and_test_fuzzers = { path = "./utils/build_and_test_fuzzers", version = "0.16.0", default-features = false }
115+
construct_automata = { path = "./utils/gramatron/construct_automata", version = "0.16.0", default-features = false }
116+
deexit = { path = "./utils/deexit", version = "0.16.0", default-features = false }
117+
drcov_utils = { path = "./utils/drcov_utils", version = "0.16.0", default-features = false }
118+
libafl_benches = { path = "./utils/libafl_benches", version = "0.16.0", default-features = false }
119+
libafl_jumper = { path = "./utils/libafl_jumper", version = "0.16.0", default-features = false }
93120

94121
# External deps
95122
ahash = { version = "0.8.12", default-features = false } # The hash function already used in hashbrown
@@ -101,12 +128,16 @@ capstone = "0.13.0" # Disassembler used in libafl_unicorn to provide disassembly
101128
clap = "4.5.49"
102129
cc = "1.2.40"
103130
cmake = "0.1.54"
131+
ctor = "0.4.0"
104132
document-features = "0.2.11"
133+
erased-serde = { version = "0.4.5", default-features = false } # erased serde
105134
fastbloom = { version = "0.14.0", default-features = false }
135+
fs2 = "0.4.3" # Used by OnDisk Corpus for file locking
106136
hashbrown = { version = "0.16.0", default-features = false } # A faster hashmap, nostd compatible
107137
just = "=1.40.0"
108138
libc = "0.2.177" # For (*nix) libc
109139
libipt = { version = "0.4.0", features = ["libipt_master"] }
140+
libvharness_sys = { path = "./crates/libafl_qemu/libvharness_sys", version = "0.16.0", default-features = false }
110141
log = "0.4.28"
111142
meminterval = "0.4.2"
112143
mimalloc = { version = "0.1.48", default-features = false }
@@ -123,21 +154,22 @@ rangemap = "1.6.0"
123154
regex = "1.12.2"
124155
rustversion = "1.0.22"
125156
serde = { version = "1.0.228", default-features = false } # serialization lib
126-
serial_test = { version = "3.2.0", default-features = false }
127157
serde_json = { version = "1.0.145", default-features = false }
128158
serde_yaml = { version = "0.9.34" } # For parsing the injections yaml file
159+
serial_test = { version = "3.2.0", default-features = false }
129160
static_assertions = "1.1.0"
130161
strum = "0.27.2"
131162
strum_macros = "0.27.2"
132163
toml = "0.9.7" # For parsing the injections toml file
164+
tuple_list = { version = "0.1.3" }
133165
typed-builder = "0.22.0" # Implement the builder pattern at compiletime
134166
typeid = "1.0.3" # Safe type_eq that doesn't rely on std specialization
167+
unicorn-engine = "2.0.1" # Used in libafl_unicorn
135168
uuid = { version = "1.18.1", features = ["serde", "v4"] }
136169
which = "8.0.0"
137170
windows = "0.62.1"
138171
windows-core = "0.62.1"
139172
z3 = { version = "0.19.2", default-features = false }
140-
fs2 = "0.4.3" # Used by OnDisk Corpus for file locking
141173

142174
[workspace.lints.rust]
143175
# Deny
@@ -165,21 +197,21 @@ std_instead_of_core = "deny"
165197
cargo = { level = "warn", priority = -1 }
166198

167199
# Allow
168-
negative_feature_names = "allow" # TODO: turn into 'warn' when working
169-
multiple_crate_versions = "allow" # TODO: turn into `warn` when working
170-
unreadable_literal = "allow"
171-
type_repetition_in_bounds = "allow"
172-
missing_errors_doc = "allow"
173200
cast_possible_truncation = "allow"
174-
used_underscore_binding = "allow"
175-
ptr_as_ptr = "allow"
201+
comparison_chain = "allow" # This lint makes **ZERO** sense
202+
missing_errors_doc = "allow"
176203
missing_panics_doc = "allow"
177204
module_name_repetitions = "allow"
178-
unsafe_derive_deserialize = "allow"
205+
multiple_crate_versions = "allow" # TODO: turn into `warn` when working
206+
negative_feature_names = "allow" # TODO: turn into 'warn' when working
207+
ptr_as_ptr = "allow"
179208
similar_names = "allow"
180-
too_many_lines = "allow"
181-
comparison_chain = "allow" # This lint makes **ZERO** sense
182209
struct_field_names = "allow" # ????
210+
too_many_lines = "allow"
211+
type_repetition_in_bounds = "allow"
212+
unreadable_literal = "allow"
213+
unsafe_derive_deserialize = "allow"
214+
used_underscore_binding = "allow"
183215

184216
[workspace.lints.rustdoc]
185217
# Deny

bindings/pylibafl/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "pylibafl"
33
description = "Python bindings for LibAFL"
4-
version = "0.15.4"
4+
version = "0.16.0"
55
license = "MIT OR Apache-2.0"
66
repository = "https://github.com/AFLplusplus/LibAFL/"
77
keywords = ["fuzzing", "testing", "security", "python"]
@@ -11,15 +11,15 @@ categories = ["development-tools::testing", "emulators", "embedded", "os"]
1111
[dependencies]
1212
pyo3 = { version = "0.26.0", features = ["extension-module"] }
1313
pyo3-log = { version = "0.13.1" }
14-
libafl_sugar = { path = "../../crates/libafl_sugar", version = "0.15.4", features = [
14+
libafl_sugar = { path = "../../crates/libafl_sugar", version = "0.16.0", features = [
1515
"python",
1616
] }
17-
libafl_bolts = { path = "../../crates/libafl_bolts", version = "0.15.4", features = [
17+
libafl_bolts = { path = "../../crates/libafl_bolts", version = "0.16.0", features = [
1818
"python",
1919
] }
2020

2121
[target.'cfg(target_os = "linux")'.dependencies]
22-
libafl_qemu = { path = "../../crates/libafl_qemu", version = "0.15.4", features = [
22+
libafl_qemu = { path = "../../crates/libafl_qemu", version = "0.16.0", features = [
2323
"python",
2424
] }
2525

bindings/pylibafl/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "maturin"
44

55
[project]
66
name = "PyLibAFL"
7-
version = "0.15.4"
7+
version = "0.16.0"
88
description = "Advanced Fuzzing Library for Python"
99
readme = "README.md"
1010
requires-python = ">=3.8"

crates/LICENSE-APACHE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../LICENSE-APACHE

crates/LICENSE-MIT

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../LICENSE-MIT

crates/build_id2/Cargo.toml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[package]
2+
name = "build_id2"
3+
version.workspace = true
4+
authors = [
5+
"Andrea Fioraldi <[email protected]>",
6+
"Dominik Maier <[email protected]>",
7+
]
8+
description = "Updated and maintained build id library"
9+
documentation = "https://docs.rs/libafl"
10+
repository = "https://github.com/AFLplusplus/LibAFL/"
11+
readme = "./README.md"
12+
license = "MIT OR Apache-2.0"
13+
keywords = ["os", "build-id"]
14+
edition = "2024"
15+
rust-version = "1.87"
16+
categories = ["os"]
17+
18+
[package.metadata.docs.rs]
19+
features = ["document-features"]
20+
all-features = true
21+
22+
[features]
23+
default = []
24+
25+
[build-dependencies]
26+
rustversion = { workspace = true }
27+
28+
[dev-dependencies]
29+
30+
[dependencies]
31+
uuid = { workspace = true }
32+
ahash = { workspace = true }
33+
34+
[lints]
35+
workspace = true

crates/build_id2/LICENSE-APACHE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../LICENSE-APACHE

crates/build_id2/LICENSE-MIT

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../LICENSE-MIT

0 commit comments

Comments
 (0)