From 1fbb18cb99f3a966f77d9c93b0aa9fd53caf0eec Mon Sep 17 00:00:00 2001 From: Romain Malmain Date: Mon, 7 Oct 2024 12:03:29 +0200 Subject: [PATCH] Versioning unification, dependencies update, logging optimization (#2560) * versioning unification: use x.y.z format everywhere * do not compile low-level logs (< info level) by default in fuzzers * update dependencies to the latest versions * add members to workspace. * use workspace for common dependencies * add vscode native support --------- Co-authored-by: Toka --- .vscode/settings.json | 11 ++ Cargo.toml | 58 ++++++++-- Dockerfile | 3 + bindings/pylibafl/Cargo.toml | 11 +- fuzzers/baby/baby_fuzzer/Cargo.toml | 5 +- .../baby/baby_fuzzer_minimizing/Cargo.toml | 5 +- .../baby_fuzzer_swap_differential/Cargo.toml | 11 +- fuzzers/baby/baby_fuzzer_unicode/Cargo.toml | 5 +- .../c_code_with_fork_executor/Cargo.toml | 9 +- .../c_code_with_inprocess_executor/Cargo.toml | 9 +- .../command_executor/Cargo.toml | 7 +- .../forkserver_executor/Cargo.toml | 5 +- .../rust_code_with_fork_executor/Cargo.toml | 5 +- .../Cargo.toml | 5 +- fuzzers/baby/tutorial/Cargo.toml | 17 +-- .../frida_executable_libpng/Cargo.toml | 25 ++--- fuzzers/binary_only/frida_gdiplus/Cargo.toml | 17 +-- fuzzers/binary_only/frida_libpng/Cargo.toml | 16 +-- .../fuzzbench_fork_qemu/Cargo.toml | 11 +- fuzzers/binary_only/fuzzbench_qemu/Cargo.toml | 11 +- fuzzers/binary_only/qemu_cmin/Cargo.toml | 22 ++-- fuzzers/binary_only/qemu_cmin/build.rs | 26 +++-- fuzzers/binary_only/qemu_coverage/Cargo.toml | 22 ++-- fuzzers/binary_only/qemu_coverage/build.rs | 26 +++-- fuzzers/binary_only/qemu_launcher/Cargo.toml | 22 ++-- fuzzers/binary_only/qemu_launcher/build.rs | 26 +++-- .../binary_only/tinyinst_simple/Cargo.toml | 3 +- .../baby_fuzzer_with_forkexecutor/Cargo.toml | 5 +- .../forkserver_libafl_cc/Cargo.toml | 19 ++-- .../forkserver/forkserver_simple/Cargo.toml | 11 +- .../fuzzbench_forkserver/Cargo.toml | 16 +-- .../fuzzbench_forkserver_cmplog/Cargo.toml | 15 +-- fuzzers/forkserver/libafl-fuzz/Cargo.toml | 5 +- .../nyx_libxml2_parallel/Cargo.toml | 4 +- .../nyx_libxml2_standalone/Cargo.toml | 4 +- fuzzers/full_system/qemu_baremetal/Cargo.toml | 4 +- .../full_system/qemu_linux_kernel/Cargo.toml | 2 +- .../full_system/qemu_linux_process/Cargo.toml | 2 +- .../fuzz_anything/baby_fuzzer_wasm/Cargo.toml | 11 +- .../baby_fuzzer_wasm/pkg/.gitignore | 1 + fuzzers/fuzz_anything/baby_no_std/Cargo.toml | 7 +- fuzzers/fuzz_anything/cargo_fuzz/Cargo.toml | 1 + .../fuzz_anything/libafl_atheris/Cargo.toml | 13 +-- fuzzers/fuzz_anything/push_harness/Cargo.toml | 5 +- .../push_stage_harness/Cargo.toml | 5 +- fuzzers/inprocess/dynamic_analysis/Cargo.toml | 24 +++-- fuzzers/inprocess/fuzzbench/Cargo.toml | 19 ++-- fuzzers/inprocess/fuzzbench_ctx/Cargo.toml | 19 ++-- fuzzers/inprocess/fuzzbench_text/Cargo.toml | 20 ++-- .../inprocess/libfuzzer_libmozjpeg/Cargo.toml | 13 +-- fuzzers/inprocess/libfuzzer_libpng/Cargo.toml | 17 +-- .../libfuzzer_libpng_accounting/Cargo.toml | 16 +-- .../libfuzzer_libpng_centralized/Cargo.toml | 20 ++-- .../libfuzzer_libpng_cmin/Cargo.toml | 19 ++-- .../libfuzzer_libpng_launcher/Cargo.toml | 18 ++-- .../libfuzzer_libpng_norestart/Cargo.toml | 20 ++-- .../libfuzzer_libpng_tcp_manager/Cargo.toml | 16 +-- .../inprocess/libfuzzer_stb_image/Cargo.toml | 11 +- .../libfuzzer_stb_image_sugar/Cargo.toml | 13 +-- .../libfuzzer_windows_asan/Cargo.toml | 11 +- .../Cargo.toml | 12 ++- .../baby_fuzzer_custom_input/Cargo.toml | 7 +- .../baby_fuzzer_gramatron/Cargo.toml | 7 +- .../baby_fuzzer_grimoire/Cargo.toml | 5 +- .../baby_fuzzer_multi/Cargo.toml | 5 +- .../baby_fuzzer_nautilus/Cargo.toml | 5 +- .../baby_fuzzer_tokens/Cargo.toml | 5 +- .../fuzzer/Cargo.toml | 17 +-- .../runtime/Cargo.toml | 1 + .../structure_aware/nautilus_sync/Cargo.toml | 12 +-- libafl/Cargo.toml | 100 ++++++++---------- libafl/src/common/nautilus/grammartec/tree.rs | 2 +- libafl/src/corpus/mod.rs | 4 +- libafl/src/events/launcher.rs | 8 +- libafl/src/events/multi_machine.rs | 4 +- libafl/src/executors/forkserver.rs | 10 +- libafl/src/executors/hooks/windows.rs | 2 +- libafl/src/executors/inprocess_fork/mod.rs | 15 ++- .../src/executors/inprocess_fork/stateful.rs | 16 +-- libafl/src/feedbacks/nautilus.rs | 6 +- libafl/src/generators/gramatron.rs | 2 +- libafl/src/generators/mod.rs | 2 +- libafl/src/generators/nautilus.rs | 2 +- libafl/src/inputs/bytessub.rs | 6 +- libafl/src/inputs/mod.rs | 6 +- libafl/src/inputs/nautilus.rs | 2 +- libafl/src/monitors/tui/ui.rs | 2 +- libafl/src/mutators/gramatron.rs | 4 +- libafl/src/mutators/mutations.rs | 4 +- libafl/src/observers/cmp.rs | 6 +- libafl/src/observers/concolic/observer.rs | 6 +- libafl/src/observers/map/const_map.rs | 20 ++-- libafl/src/observers/map/mod.rs | 24 ++--- libafl/src/observers/map/multi_map.rs | 18 ++-- libafl/src/observers/map/variable_map.rs | 18 ++-- libafl/src/observers/stacktrace.rs | 6 +- libafl/src/observers/value.rs | 14 +-- libafl/src/schedulers/accounting.rs | 3 +- libafl/src/state/mod.rs | 2 +- libafl_bolts/Cargo.toml | 52 +++++---- libafl_bolts/src/lib.rs | 11 +- libafl_bolts/src/minibsod.rs | 24 +++-- libafl_bolts/src/os/windows_exceptions.rs | 47 ++++---- libafl_bolts/src/ownedref.rs | 42 ++++---- libafl_bolts/src/shmem.rs | 2 +- libafl_bolts/src/subrange.rs | 4 +- libafl_bolts/src/tuples.rs | 4 +- libafl_cc/Cargo.toml | 8 +- libafl_concolic/symcc_libafl/Cargo.toml | 6 +- libafl_concolic/symcc_runtime/Cargo.toml | 14 +-- .../test/dump_constraints/Cargo.toml | 2 +- libafl_derive/Cargo.toml | 6 +- libafl_frida/Cargo.toml | 54 +++++----- libafl_frida/src/executor.rs | 9 +- libafl_frida/src/helper.rs | 2 +- libafl_frida/src/utils.rs | 47 ++++---- libafl_libfuzzer/Cargo.toml | 8 +- libafl_libfuzzer/runtime/Cargo.toml.template | 24 +++-- libafl_nyx/Cargo.toml | 4 +- libafl_nyx/build_nyx_support.sh | 6 +- libafl_qemu/Cargo.toml | 62 +++++------ libafl_qemu/libafl_qemu_build/Cargo.toml | 18 ++-- libafl_qemu/libafl_qemu_sys/Cargo.toml | 16 +-- libafl_qemu/src/executor.rs | 21 ++-- libafl_sugar/Cargo.toml | 10 +- libafl_sugar/src/forkserver.rs | 2 +- libafl_sugar/src/inmemory.rs | 2 +- libafl_sugar/src/qemu.rs | 4 +- libafl_targets/Cargo.toml | 24 ++--- libafl_targets/src/cmps/observers/aflpp.rs | 6 +- libafl_targets/src/coverage.rs | 6 +- libafl_targets/src/libfuzzer/mutators.rs | 1 + libafl_tinyinst/Cargo.toml | 4 +- libafl_tinyinst/src/executor.rs | 8 +- scripts/clippy.ps1 | 27 ++++- 135 files changed, 952 insertions(+), 804 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 fuzzers/fuzz_anything/baby_fuzzer_wasm/pkg/.gitignore diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..fed0655398 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "rust-analyzer.cargo.buildScripts.overrideCommand": [ + "cargo", + "check", + "--message-format=json", + ], + "rust-analyzer.check.overrideCommand": [ + "cargo", + "check", + ], +} \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 37ebf6d45c..6cbe630f14 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,8 +4,17 @@ members = [ "libafl", "libafl_bolts", "libafl_cc", + "libafl_concolic/symcc_runtime", + "libafl_concolic/symcc_libafl", "libafl_derive", + "libafl_frida", + "libafl_libfuzzer", + "libafl_nyx", "libafl_targets", + "libafl_tinyinst", + "libafl_qemu", + "libafl_qemu/libafl_qemu_build", + "libafl_qemu/libafl_qemu_sys", "libafl_sugar", "libafl_concolic/test/dump_constraints", "libafl_concolic/test/runtime_test", @@ -25,6 +34,7 @@ default-members = [ exclude = [ "bindings", "fuzzers", + "libafl_libfuzzer_runtime", "utils/noaslr", "utils/gdb_qemu", "utils/libafl_fmt", @@ -32,22 +42,50 @@ exclude = [ "utils/multi_machine_generator", "scripts", # additional crates - "libafl_concolic/symcc_runtime", - "libafl_concolic/symcc_libafl", - "libafl_frida", - "libafl_libfuzzer", - "libafl_libfuzzer_runtime", - "libafl_nyx", - "libafl_qemu", - "libafl_tinyinst", - "libafl_qemu/libafl_qemu_build", - "libafl_qemu/libafl_qemu_sys", "libafl_concolic/test/symcc/util/symcc_fuzzing_helper", ] [workspace.package] version = "0.13.2" +[workspace.dependencies] +ahash = { version = "0.8.11", default-features = false } # The hash function already used in hashbrown +backtrace = { version = "0.3.74", default-features = false } # Used to get the stacktrace in StacktraceObserver +bindgen = "0.70.1" +clap = "4.5.18" +cc = "1.1.21" +document-features = "0.2.10" +hashbrown = { version = "0.14.5", default-features = false } # A faster hashmap, nostd compatible +libc = "0.2.159" # For (*nix) libc +log = "0.4.22" +meminterval = "0.4.1" +mimalloc = { version = "0.1.43", default-features = false } +nix = { version = "0.29.0", default-features = false } +num_enum = { version = "0.7.3", default-features = false } +num-traits = { version = "0.2.19", default-features = false } +paste = "1.0.15" +postcard = { version = "1.0.10", features = [ + "alloc", +], default-features = false } # no_std compatible serde serialization format +pyo3 = "0.22.3" +pyo3-build-config = "0.22.3" +pyo3-log = "0.11.0" +rangemap = "1.5.1" +regex = "1.10.6" +rustversion = "1.0.17" +serde = { version = "1.0.210", default-features = false } # serialization lib +serial_test = { version = "3.1.1", default-features = false } +serde_json = { version = "1.0.128", default-features = false } +serde_yaml = { version = "0.9.34" } # For parsing the injections yaml file +strum = "0.26.3" +strum_macros = "0.26.4" +toml = "0.8.19" # For parsing the injections toml file +typed-builder = "0.20.0" # Implement the builder pattern at compiletime +uuid = { version = "1.10.0", features = ["serde", "v4"] } +which = "6.0.3" +windows = "0.58.0" +z3 = "0.12.1" + [profile.release] lto = true codegen-units = 1 diff --git a/Dockerfile b/Dockerfile index efa975de3c..be4000acf2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,6 +64,9 @@ COPY scripts/dummy.rs libafl_qemu/libafl_qemu_sys/src/lib.rs COPY libafl_sugar/Cargo.toml libafl_sugar/ COPY scripts/dummy.rs libafl_sugar/src/lib.rs +COPY bindings/pylibafl/Cargo.toml bindings/pylibafl/Cargo.toml +COPY bindings/pylibafl/src bindings/pylibafl/src + COPY libafl_cc/Cargo.toml libafl_cc/Cargo.toml COPY libafl_cc/build.rs libafl_cc/build.rs COPY libafl_cc/src libafl_cc/src diff --git a/bindings/pylibafl/Cargo.toml b/bindings/pylibafl/Cargo.toml index 93a1e33bb5..4715de9ba2 100644 --- a/bindings/pylibafl/Cargo.toml +++ b/bindings/pylibafl/Cargo.toml @@ -1,11 +1,16 @@ [package] name = "pylibafl" +description = "Python bindings for LibAFL" version = "0.13.2" +license = "MIT OR Apache-2.0" +repository = "https://github.com/AFLplusplus/LibAFL/" +keywords = ["fuzzing", "testing", "security", "python"] edition = "2021" +categories = ["development-tools::testing", "emulators", "embedded", "os"] [dependencies] -pyo3 = { version = "0.22", features = ["extension-module"] } -pyo3-log = "0.11" +pyo3 = { version = "0.22.3", features = ["extension-module"] } +pyo3-log = { version = "0.11.0" } libafl_sugar = { path = "../../libafl_sugar", version = "0.13.2", features = [ "python", ] } @@ -19,7 +24,7 @@ libafl_qemu = { path = "../../libafl_qemu", version = "0.13.2", features = [ ] } [build-dependencies] -pyo3-build-config = { version = "0.22" } +pyo3-build-config = { version = "0.22.3" } [lib] name = "pylibafl" diff --git a/fuzzers/baby/baby_fuzzer/Cargo.toml b/fuzzers/baby/baby_fuzzer/Cargo.toml index 25be9bb4ad..ca3931fed3 100644 --- a/fuzzers/baby/baby_fuzzer/Cargo.toml +++ b/fuzzers/baby/baby_fuzzer/Cargo.toml @@ -23,5 +23,6 @@ opt-level = 3 debug = true [dependencies] -libafl = { path = "../../../libafl/" } -libafl_bolts = { path = "../../../libafl_bolts/" } +libafl = { path = "../../../libafl" } +libafl_bolts = { path = "../../../libafl_bolts" } +log = { version = "0.4.22", features = ["release_max_level_info"] } diff --git a/fuzzers/baby/baby_fuzzer_minimizing/Cargo.toml b/fuzzers/baby/baby_fuzzer_minimizing/Cargo.toml index fa12705f0b..4336285670 100644 --- a/fuzzers/baby/baby_fuzzer_minimizing/Cargo.toml +++ b/fuzzers/baby/baby_fuzzer_minimizing/Cargo.toml @@ -24,5 +24,6 @@ opt-level = 3 debug = true [dependencies] -libafl = { path = "../../../libafl/", features = ["prelude"] } -libafl_bolts = { path = "../../../libafl_bolts/", features = ["prelude"] } +libafl = { path = "../../../libafl", features = ["prelude"] } +libafl_bolts = { path = "../../../libafl_bolts", features = ["prelude"] } +log = { version = "0.4.22", features = ["release_max_level_info"] } diff --git a/fuzzers/baby/baby_fuzzer_swap_differential/Cargo.toml b/fuzzers/baby/baby_fuzzer_swap_differential/Cargo.toml index 584ecddd0f..a9f50b37b5 100644 --- a/fuzzers/baby/baby_fuzzer_swap_differential/Cargo.toml +++ b/fuzzers/baby/baby_fuzzer_swap_differential/Cargo.toml @@ -20,9 +20,9 @@ opt-level = 3 debug = true [build-dependencies] -anyhow = "1" -bindgen = "0.69.4" -cc = "1.0" +anyhow = "1.0.89" +bindgen = "0.70.1" +cc = "1.1.21" [dependencies] libafl = { path = "../../../libafl" } @@ -33,9 +33,10 @@ libafl_targets = { path = "../../../libafl_targets", features = [ "sancov_cmplog", "pointer_maps", ] } -mimalloc = { version = "*", default-features = false } +log = { version = "0.4.22", features = ["release_max_level_info"] } +mimalloc = { version = "0.1.43", default-features = false } -libafl_cc = { path = "../../../libafl_cc/" } +libafl_cc = { path = "../../../libafl_cc" } [[bin]] name = "fuzzer_sd" diff --git a/fuzzers/baby/baby_fuzzer_unicode/Cargo.toml b/fuzzers/baby/baby_fuzzer_unicode/Cargo.toml index 8d2032e2f9..2a7df6f019 100644 --- a/fuzzers/baby/baby_fuzzer_unicode/Cargo.toml +++ b/fuzzers/baby/baby_fuzzer_unicode/Cargo.toml @@ -23,5 +23,6 @@ opt-level = 3 debug = true [dependencies] -libafl = { path = "../../../libafl/", features = ["unicode"] } -libafl_bolts = { path = "../../../libafl_bolts/" } +libafl = { path = "../../../libafl", features = ["unicode"] } +libafl_bolts = { path = "../../../libafl_bolts" } +log = { version = "0.4.22", features = ["release_max_level_info"] } diff --git a/fuzzers/baby/backtrace_baby_fuzzers/c_code_with_fork_executor/Cargo.toml b/fuzzers/baby/backtrace_baby_fuzzers/c_code_with_fork_executor/Cargo.toml index a1e89e6017..574d205724 100644 --- a/fuzzers/baby/backtrace_baby_fuzzers/c_code_with_fork_executor/Cargo.toml +++ b/fuzzers/baby/backtrace_baby_fuzzers/c_code_with_fork_executor/Cargo.toml @@ -15,9 +15,10 @@ opt-level = 3 debug = true [dependencies] -libafl = { path = "../../../../libafl/" } -libafl_bolts = { path = "../../../../libafl_bolts/" } -libc = "0.2" +libafl = { path = "../../../../libafl" } +libafl_bolts = { path = "../../../../libafl_bolts" } +libc = "0.2.159" +log = { version = "0.4.22", features = ["release_max_level_info"] } [build-dependencies] -cc = "1.0" +cc = "1.1.21" diff --git a/fuzzers/baby/backtrace_baby_fuzzers/c_code_with_inprocess_executor/Cargo.toml b/fuzzers/baby/backtrace_baby_fuzzers/c_code_with_inprocess_executor/Cargo.toml index e0ad38bb54..e54315ee43 100644 --- a/fuzzers/baby/backtrace_baby_fuzzers/c_code_with_inprocess_executor/Cargo.toml +++ b/fuzzers/baby/backtrace_baby_fuzzers/c_code_with_inprocess_executor/Cargo.toml @@ -15,9 +15,10 @@ opt-level = 3 debug = true [dependencies] -libafl = { path = "../../../../libafl/" } -libafl_bolts = { path = "../../../../libafl_bolts/" } -libc = "0.2" +libafl = { path = "../../../../libafl" } +libafl_bolts = { path = "../../../../libafl_bolts" } +libc = "0.2.159" +log = { version = "0.4.22", features = ["release_max_level_info"] } [build-dependencies] -cc = "1.0" +cc = "1.1.21" diff --git a/fuzzers/baby/backtrace_baby_fuzzers/command_executor/Cargo.toml b/fuzzers/baby/backtrace_baby_fuzzers/command_executor/Cargo.toml index 497ba29ce3..c0366b91ad 100644 --- a/fuzzers/baby/backtrace_baby_fuzzers/command_executor/Cargo.toml +++ b/fuzzers/baby/backtrace_baby_fuzzers/command_executor/Cargo.toml @@ -14,8 +14,9 @@ opt-level = 3 debug = true [build-dependencies] -cc = "*" +cc = "1.1.21" [dependencies] -libafl = { path = "../../../../libafl/" } -libafl_bolts = { path = "../../../../libafl_bolts/" } +libafl = { path = "../../../../libafl" } +libafl_bolts = { path = "../../../../libafl_bolts" } +log = { version = "0.4.22", features = ["release_max_level_info"] } diff --git a/fuzzers/baby/backtrace_baby_fuzzers/forkserver_executor/Cargo.toml b/fuzzers/baby/backtrace_baby_fuzzers/forkserver_executor/Cargo.toml index 403adceb0c..4fc1e06a4e 100644 --- a/fuzzers/baby/backtrace_baby_fuzzers/forkserver_executor/Cargo.toml +++ b/fuzzers/baby/backtrace_baby_fuzzers/forkserver_executor/Cargo.toml @@ -14,5 +14,6 @@ codegen-units = 1 opt-level = 3 [dependencies] -libafl = { path = "../../../../libafl/" } -libafl_bolts = { path = "../../../../libafl_bolts/" } +libafl = { path = "../../../../libafl" } +libafl_bolts = { path = "../../../../libafl_bolts" } +log = { version = "0.4.22", features = ["release_max_level_info"] } diff --git a/fuzzers/baby/backtrace_baby_fuzzers/rust_code_with_fork_executor/Cargo.toml b/fuzzers/baby/backtrace_baby_fuzzers/rust_code_with_fork_executor/Cargo.toml index dea49087d0..f3c0253658 100644 --- a/fuzzers/baby/backtrace_baby_fuzzers/rust_code_with_fork_executor/Cargo.toml +++ b/fuzzers/baby/backtrace_baby_fuzzers/rust_code_with_fork_executor/Cargo.toml @@ -18,5 +18,6 @@ opt-level = 3 debug = true [dependencies] -libafl = { path = "../../../../libafl/" } -libafl_bolts = { path = "../../../../libafl_bolts/" } +libafl = { path = "../../../../libafl" } +libafl_bolts = { path = "../../../../libafl_bolts" } +log = { version = "0.4.22", features = ["release_max_level_info"] } diff --git a/fuzzers/baby/backtrace_baby_fuzzers/rust_code_with_inprocess_executor/Cargo.toml b/fuzzers/baby/backtrace_baby_fuzzers/rust_code_with_inprocess_executor/Cargo.toml index a6828cb618..96a092f245 100644 --- a/fuzzers/baby/backtrace_baby_fuzzers/rust_code_with_inprocess_executor/Cargo.toml +++ b/fuzzers/baby/backtrace_baby_fuzzers/rust_code_with_inprocess_executor/Cargo.toml @@ -18,5 +18,6 @@ opt-level = 3 debug = true [dependencies] -libafl = { path = "../../../../libafl/" } -libafl_bolts = { path = "../../../../libafl_bolts/" } +libafl = { path = "../../../../libafl" } +libafl_bolts = { path = "../../../../libafl_bolts" } +log = { version = "0.4.22", features = ["release_max_level_info"] } diff --git a/fuzzers/baby/tutorial/Cargo.toml b/fuzzers/baby/tutorial/Cargo.toml index e091384792..820d65a78b 100644 --- a/fuzzers/baby/tutorial/Cargo.toml +++ b/fuzzers/baby/tutorial/Cargo.toml @@ -18,25 +18,26 @@ opt-level = 3 debug = true [build-dependencies] -cc = { version = "1.0", features = ["parallel"] } -which = "6.0" +cc = { version = "1.1.21", features = ["parallel"] } +which = "6.0.3" [dependencies] -libafl = { path = "../../../libafl/", features = ["default", "rand_trait"] } -libafl_bolts = { path = "../../../libafl_bolts/" } -libafl_targets = { path = "../../../libafl_targets/", features = [ +libafl = { path = "../../../libafl", features = ["default", "rand_trait"] } +libafl_bolts = { path = "../../../libafl_bolts" } +libafl_targets = { path = "../../../libafl_targets", features = [ "sancov_pcguard_hitcounts", "libfuzzer", "sancov_cmplog", ] } -serde = { version = "1.0", default-features = false, features = [ +serde = { version = "1.0.210", default-features = false, features = [ "alloc", ] } # serialization lib -lain = { version = "0.5", features = [ +lain = { version = "0.5.5", features = [ "serde_support", ], git = "https://github.com/AFLplusplus/lain.git", rev = "208e927bcf411f62f8a1f51ac2d9f9423a1ec5d3" } # We're using a lain fork compatible with libafl's rand version # TODO Include it only when building cc -libafl_cc = { path = "../../../libafl_cc/" } +libafl_cc = { path = "../../../libafl_cc" } +log = { version = "0.4.22", features = ["release_max_level_info"] } [lib] name = "tutorial" diff --git a/fuzzers/binary_only/frida_executable_libpng/Cargo.toml b/fuzzers/binary_only/frida_executable_libpng/Cargo.toml index 642ec3c5b5..1dac28f409 100644 --- a/fuzzers/binary_only/frida_executable_libpng/Cargo.toml +++ b/fuzzers/binary_only/frida_executable_libpng/Cargo.toml @@ -18,14 +18,14 @@ opt-level = 3 debug = true [dependencies] -libafl = { path = "../../../libafl/", features = [ +libafl = { path = "../../../libafl", features = [ "std", "llmp_compression", "llmp_bind_public", "frida_cli", ] } #, "llmp_small_maps", "llmp_debug"]} -libafl_bolts = { path = "../../../libafl_bolts/" } -frida-gum = { version = "0.13.6", features = [ +libafl_bolts = { path = "../../../libafl_bolts" } +frida-gum = { version = "0.13.7", features = [ "auto-download", "event-sink", "invocation-listener", @@ -34,13 +34,14 @@ libafl_frida = { path = "../../../libafl_frida", features = ["cmplog"] } libafl_targets = { path = "../../../libafl_targets", features = [ "sancov_cmplog", ] } -libc = "0.2" -libloading = "0.7" -num-traits = "0.2" -rangemap = "1.3" -clap = { version = "4.5", features = ["derive"] } -serde = "1.0" -mimalloc = { version = "*", default-features = false } +libc = "0.2.159" +libloading = "0.8.5" +log = { version = "0.4.22", features = ["release_max_level_info"] } +num-traits = "0.2.19" +rangemap = "1.5.1" +clap = { version = "4.5.18", features = ["derive"] } +serde = "1.0.210" +mimalloc = { version = "0.1.43", default-features = false } -backtrace = "0.3" -color-backtrace = "0.5" +backtrace = "0.3.74" +color-backtrace = "0.6.1" diff --git a/fuzzers/binary_only/frida_gdiplus/Cargo.toml b/fuzzers/binary_only/frida_gdiplus/Cargo.toml index 40d169331a..b2efa111fe 100644 --- a/fuzzers/binary_only/frida_gdiplus/Cargo.toml +++ b/fuzzers/binary_only/frida_gdiplus/Cargo.toml @@ -15,15 +15,15 @@ opt-level = 3 debug = true [dependencies] -libafl = { path = "../../../libafl/", features = [ +libafl = { path = "../../../libafl", features = [ "std", "llmp_compression", "llmp_bind_public", "frida_cli", "errors_backtrace", ] } #, "llmp_small_maps", "llmp_debug"]} -libafl_bolts = { path = "../../../libafl_bolts/" } -frida-gum = { version = "0.13.6", features = [ +libafl_bolts = { path = "../../../libafl_bolts" } +frida-gum = { version = "0.13.7", features = [ "auto-download", "event-sink", "invocation-listener", @@ -32,9 +32,10 @@ libafl_frida = { path = "../../../libafl_frida", features = ["cmplog"] } libafl_targets = { path = "../../../libafl_targets", features = [ "sancov_cmplog", ] } -libloading = "0.7" -mimalloc = { version = "*", default-features = false } +libloading = "0.8.5" +log = { version = "0.4.22", features = ["release_max_level_info"] } +mimalloc = { version = "0.1.43", default-features = false } dlmalloc = { version = "0.2.6", features = ["global"] } -color-backtrace = "0.5" -env_logger = "0.10.0" -iced-x86 = { version = "1.20.0", features = ["code_asm"] } +color-backtrace = "0.6.1" +env_logger = "0.11.5" +iced-x86 = { version = "1.21.0", features = ["code_asm"] } diff --git a/fuzzers/binary_only/frida_libpng/Cargo.toml b/fuzzers/binary_only/frida_libpng/Cargo.toml index 8e3f33e36e..efc3d2ff66 100644 --- a/fuzzers/binary_only/frida_libpng/Cargo.toml +++ b/fuzzers/binary_only/frida_libpng/Cargo.toml @@ -18,15 +18,15 @@ opt-level = 3 debug = true [dependencies] -libafl = { path = "../../../libafl/", features = [ +libafl = { path = "../../../libafl", features = [ "std", "llmp_compression", "llmp_bind_public", "frida_cli", "errors_backtrace", ] } #, "llmp_small_maps", "llmp_debug"]} -libafl_bolts = { path = "../../../libafl_bolts/" } -frida-gum = { version = "0.13.6", features = [ +libafl_bolts = { path = "../../../libafl_bolts" } +frida-gum = { version = "0.13.7", features = [ "auto-download", "event-sink", "invocation-listener", @@ -35,8 +35,8 @@ libafl_frida = { path = "../../../libafl_frida", features = ["cmplog"] } libafl_targets = { path = "../../../libafl_targets", features = [ "sancov_cmplog", ] } -libloading = "0.7" -mimalloc = { version = "*", default-features = false } -color-backtrace = "0.5" -log = "0.4.20" -env_logger = "0.10.0" +libloading = "0.8.5" +log = { version = "0.4.22", features = ["release_max_level_info"] } +mimalloc = { version = "0.1.43", default-features = false } +color-backtrace = "0.6.1" +env_logger = "0.11.5" diff --git a/fuzzers/binary_only/fuzzbench_fork_qemu/Cargo.toml b/fuzzers/binary_only/fuzzbench_fork_qemu/Cargo.toml index d7affa518c..4f4d8043a4 100644 --- a/fuzzers/binary_only/fuzzbench_fork_qemu/Cargo.toml +++ b/fuzzers/binary_only/fuzzbench_fork_qemu/Cargo.toml @@ -23,12 +23,13 @@ debug = false strip = true [dependencies] -libafl = { path = "../../../libafl/" } -libafl_bolts = { path = "../../../libafl_bolts/" } -libafl_qemu = { path = "../../../libafl_qemu/", features = [ +libafl = { path = "../../../libafl" } +libafl_bolts = { path = "../../../libafl_bolts" } +libafl_qemu = { path = "../../../libafl_qemu", features = [ "x86_64", "usermode", ] } -clap = { version = "4.5", features = ["default"] } -nix = { version = "0.29", features = ["fs"] } +log = { version = "0.4.22", features = ["release_max_level_info"] } +clap = { version = "4.5.18", features = ["default"] } +nix = { version = "0.29.0", features = ["fs"] } diff --git a/fuzzers/binary_only/fuzzbench_qemu/Cargo.toml b/fuzzers/binary_only/fuzzbench_qemu/Cargo.toml index e7bd3b6484..c07aa71efa 100644 --- a/fuzzers/binary_only/fuzzbench_qemu/Cargo.toml +++ b/fuzzers/binary_only/fuzzbench_qemu/Cargo.toml @@ -23,12 +23,13 @@ debug = false strip = true [dependencies] -libafl = { path = "../../../libafl/" } -libafl_bolts = { path = "../../../libafl_bolts/" } -libafl_qemu = { path = "../../../libafl_qemu/", features = [ +libafl = { path = "../../../libafl" } +libafl_bolts = { path = "../../../libafl_bolts" } +libafl_qemu = { path = "../../../libafl_qemu", features = [ "x86_64", "usermode", ] } -clap = { version = "4.5", features = ["default"] } -nix = { version = "0.29", features = ["fs"] } +log = { version = "0.4.22", features = ["release_max_level_info"] } +clap = { version = "4.5.18", features = ["default"] } +nix = { version = "0.29.0", features = ["fs"] } diff --git a/fuzzers/binary_only/qemu_cmin/Cargo.toml b/fuzzers/binary_only/qemu_cmin/Cargo.toml index 1d162c8b5c..b2e7ff8557 100644 --- a/fuzzers/binary_only/qemu_cmin/Cargo.toml +++ b/fuzzers/binary_only/qemu_cmin/Cargo.toml @@ -26,19 +26,13 @@ mips = ["libafl_qemu/mips"] ppc = ["libafl_qemu/ppc", "be"] [build-dependencies] -vergen = { version = "8.2.1", features = [ - "build", - "cargo", - "git", - "gitcl", - "rustc", - "si", -] } +vergen = { version = "9.0.1", features = ["build", "cargo", "rustc", "si"] } +vergen-git2 = "1.0.1" [dependencies] -clap = { version = "4.5", features = ["derive", "string"] } -libafl = { path = "../../../libafl/" } -libafl_bolts = { path = "../../../libafl_bolts/" } -libafl_qemu = { path = "../../../libafl_qemu/", features = ["usermode"] } -log = { version = "0.4.20" } -rangemap = { version = "1.3" } +clap = { version = "4.5.18", features = ["derive", "string"] } +libafl = { path = "../../../libafl" } +libafl_bolts = { path = "../../../libafl_bolts" } +libafl_qemu = { path = "../../../libafl_qemu", features = ["usermode"] } +log = { version = "0.4.22", features = ["release_max_level_info"] } +rangemap = { version = "1.5.1" } diff --git a/fuzzers/binary_only/qemu_cmin/build.rs b/fuzzers/binary_only/qemu_cmin/build.rs index 36035345bf..4a3e22ea6a 100644 --- a/fuzzers/binary_only/qemu_cmin/build.rs +++ b/fuzzers/binary_only/qemu_cmin/build.rs @@ -1,4 +1,5 @@ -use vergen::EmitBuilder; +use vergen::{BuildBuilder, CargoBuilder, Emitter, RustcBuilder, SysinfoBuilder}; +use vergen_git2::Git2Builder; #[macro_export] macro_rules! assert_unique_feature { @@ -13,12 +14,23 @@ macro_rules! assert_unique_feature { } fn main() { - EmitBuilder::builder() - .all_build() - .all_cargo() - .all_git() - .all_rustc() - .all_sysinfo() + let build = BuildBuilder::all_build().unwrap(); + let cargo = CargoBuilder::all_cargo().unwrap(); + let git = Git2Builder::all_git().unwrap(); + let rustc = RustcBuilder::all_rustc().unwrap(); + let sysinfo = SysinfoBuilder::all_sysinfo().unwrap(); + + Emitter::default() + .add_instructions(&build) + .unwrap() + .add_instructions(&cargo) + .unwrap() + .add_instructions(&git) + .unwrap() + .add_instructions(&rustc) + .unwrap() + .add_instructions(&sysinfo) + .unwrap() .emit() .unwrap(); diff --git a/fuzzers/binary_only/qemu_coverage/Cargo.toml b/fuzzers/binary_only/qemu_coverage/Cargo.toml index 33808fa372..8142d69e8b 100644 --- a/fuzzers/binary_only/qemu_coverage/Cargo.toml +++ b/fuzzers/binary_only/qemu_coverage/Cargo.toml @@ -26,19 +26,13 @@ mips = ["libafl_qemu/mips"] ppc = ["libafl_qemu/ppc", "be"] [build-dependencies] -vergen = { version = "8.2.1", features = [ - "build", - "cargo", - "git", - "gitcl", - "rustc", - "si", -] } +vergen = { version = "9.0.1", features = ["build", "cargo", "rustc", "si"] } +vergen-git2 = "1.0.1" [dependencies] -clap = { version = "4.5", features = ["derive", "string"] } -libafl = { path = "../../../libafl/" } -libafl_bolts = { path = "../../../libafl_bolts/" } -libafl_qemu = { path = "../../../libafl_qemu/", features = ["usermode"] } -log = { version = "0.4.20" } -rangemap = { version = "1.3" } +clap = { version = "4.5.18", features = ["derive", "string"] } +libafl = { path = "../../../libafl" } +libafl_bolts = { path = "../../../libafl_bolts" } +libafl_qemu = { path = "../../../libafl_qemu", features = ["usermode"] } +log = { version = "0.4.22", features = ["release_max_level_info"] } +rangemap = { version = "1.5.1" } diff --git a/fuzzers/binary_only/qemu_coverage/build.rs b/fuzzers/binary_only/qemu_coverage/build.rs index 36035345bf..4a3e22ea6a 100644 --- a/fuzzers/binary_only/qemu_coverage/build.rs +++ b/fuzzers/binary_only/qemu_coverage/build.rs @@ -1,4 +1,5 @@ -use vergen::EmitBuilder; +use vergen::{BuildBuilder, CargoBuilder, Emitter, RustcBuilder, SysinfoBuilder}; +use vergen_git2::Git2Builder; #[macro_export] macro_rules! assert_unique_feature { @@ -13,12 +14,23 @@ macro_rules! assert_unique_feature { } fn main() { - EmitBuilder::builder() - .all_build() - .all_cargo() - .all_git() - .all_rustc() - .all_sysinfo() + let build = BuildBuilder::all_build().unwrap(); + let cargo = CargoBuilder::all_cargo().unwrap(); + let git = Git2Builder::all_git().unwrap(); + let rustc = RustcBuilder::all_rustc().unwrap(); + let sysinfo = SysinfoBuilder::all_sysinfo().unwrap(); + + Emitter::default() + .add_instructions(&build) + .unwrap() + .add_instructions(&cargo) + .unwrap() + .add_instructions(&git) + .unwrap() + .add_instructions(&rustc) + .unwrap() + .add_instructions(&sysinfo) + .unwrap() .emit() .unwrap(); diff --git a/fuzzers/binary_only/qemu_launcher/Cargo.toml b/fuzzers/binary_only/qemu_launcher/Cargo.toml index 5809f5676a..5a04546dd3 100644 --- a/fuzzers/binary_only/qemu_launcher/Cargo.toml +++ b/fuzzers/binary_only/qemu_launcher/Cargo.toml @@ -37,24 +37,18 @@ opt-level = 3 debug = true [build-dependencies] -vergen = { version = "8.2", features = [ - "build", - "cargo", - "git", - "gitcl", - "rustc", - "si", -] } +vergen = { version = "9.0.1", features = ["build", "cargo", "rustc", "si"] } +vergen-git2 = "1.0.1" [dependencies] -clap = { version = "4.3", features = ["derive", "string"] } +clap = { version = "4.5.18", features = ["derive", "string"] } libafl = { path = "../../../libafl" } libafl_bolts = { path = "../../../libafl_bolts", features = [ "errors_backtrace", ] } libafl_qemu = { path = "../../../libafl_qemu", features = ["usermode"] } -log = { version = "0.4.20" } -nix = { version = "0.29", features = ["fs"] } -rangemap = { version = "1.3" } -readonly = { version = "0.2.10" } -typed-builder = { version = "0.19" } +log = { version = "0.4.22", features = ["release_max_level_info"] } +nix = { version = "0.29.0", features = ["fs"] } +rangemap = { version = "1.5.1" } +readonly = { version = "0.2.12" } +typed-builder = { version = "0.20.0" } diff --git a/fuzzers/binary_only/qemu_launcher/build.rs b/fuzzers/binary_only/qemu_launcher/build.rs index 6f93e95067..0f20f30922 100644 --- a/fuzzers/binary_only/qemu_launcher/build.rs +++ b/fuzzers/binary_only/qemu_launcher/build.rs @@ -1,4 +1,5 @@ -use vergen::EmitBuilder; +use vergen::{BuildBuilder, CargoBuilder, Emitter, RustcBuilder, SysinfoBuilder}; +use vergen_git2::Git2Builder; #[macro_export] macro_rules! assert_unique_feature { @@ -13,12 +14,23 @@ macro_rules! assert_unique_feature { } fn main() { - EmitBuilder::builder() - .all_build() - .all_cargo() - .all_git() - .all_rustc() - .all_sysinfo() + let build = BuildBuilder::all_build().unwrap(); + let cargo = CargoBuilder::all_cargo().unwrap(); + let git = Git2Builder::all_git().unwrap(); + let rustc = RustcBuilder::all_rustc().unwrap(); + let sysinfo = SysinfoBuilder::all_sysinfo().unwrap(); + + Emitter::default() + .add_instructions(&build) + .unwrap() + .add_instructions(&cargo) + .unwrap() + .add_instructions(&git) + .unwrap() + .add_instructions(&rustc) + .unwrap() + .add_instructions(&sysinfo) + .unwrap() .emit() .unwrap(); diff --git a/fuzzers/binary_only/tinyinst_simple/Cargo.toml b/fuzzers/binary_only/tinyinst_simple/Cargo.toml index 3a051ee16e..93cd950768 100644 --- a/fuzzers/binary_only/tinyinst_simple/Cargo.toml +++ b/fuzzers/binary_only/tinyinst_simple/Cargo.toml @@ -5,8 +5,9 @@ edition = "2021" [dependencies] libafl = { path = "../../../libafl", features = ["introspection"] } -libafl_bolts = { path = "../../../libafl_bolts/" } +libafl_bolts = { path = "../../../libafl_bolts" } libafl_tinyinst = { path = "../../../libafl_tinyinst" } +log = { version = "0.4.22", features = ["release_max_level_info"] } [profile.release] codegen-units = 1 diff --git a/fuzzers/forkserver/baby_fuzzer_with_forkexecutor/Cargo.toml b/fuzzers/forkserver/baby_fuzzer_with_forkexecutor/Cargo.toml index 6b866b60cf..ee926351bf 100644 --- a/fuzzers/forkserver/baby_fuzzer_with_forkexecutor/Cargo.toml +++ b/fuzzers/forkserver/baby_fuzzer_with_forkexecutor/Cargo.toml @@ -22,5 +22,6 @@ opt-level = 3 debug = true [dependencies] -libafl = { path = "../../../libafl/" } -libafl_bolts = { path = "../../../libafl_bolts/" } +libafl = { path = "../../../libafl" } +libafl_bolts = { path = "../../../libafl_bolts" } +log = { version = "0.4.22", features = ["release_max_level_info"] } diff --git a/fuzzers/forkserver/forkserver_libafl_cc/Cargo.toml b/fuzzers/forkserver/forkserver_libafl_cc/Cargo.toml index c75e232c46..ac74b11ab2 100644 --- a/fuzzers/forkserver/forkserver_libafl_cc/Cargo.toml +++ b/fuzzers/forkserver/forkserver_libafl_cc/Cargo.toml @@ -17,21 +17,22 @@ opt-level = 3 debug = true [build-dependencies] -cc = { version = "1.0", features = ["parallel"] } -which = { version = "6.0" } +cc = { version = "1.1.21", features = ["parallel"] } +which = { version = "6.0.3" } [dependencies] -clap = { version = "4.5", features = ["derive"] } -nix = { version = "0.29", features = ["signal"] } -libafl = { path = "../../../libafl/" } -libafl_bolts = { path = "../../../libafl_bolts/" } -libafl_cc = { path = "../../../libafl_cc/" } -libafl_targets = { path = "../../../libafl_targets/", features = [ +clap = { version = "4.5.18", features = ["derive"] } +nix = { version = "0.29.0", features = ["signal"] } +libafl = { path = "../../../libafl" } +libafl_bolts = { path = "../../../libafl_bolts" } +libafl_cc = { path = "../../../libafl_cc" } +libafl_targets = { path = "../../../libafl_targets", features = [ "sancov_pcguard_hitcounts", "libfuzzer", "pointer_maps", ] } -env_logger = "0.11" +log = { version = "0.4.22", features = ["release_max_level_info"] } +env_logger = "0.11.5" [lib] name = "libforkserver_libafl_cc" diff --git a/fuzzers/forkserver/forkserver_simple/Cargo.toml b/fuzzers/forkserver/forkserver_simple/Cargo.toml index 952e566ba5..80397d13b1 100644 --- a/fuzzers/forkserver/forkserver_simple/Cargo.toml +++ b/fuzzers/forkserver/forkserver_simple/Cargo.toml @@ -16,8 +16,9 @@ codegen-units = 1 opt-level = 3 [dependencies] -env_logger = "0.11" -libafl = { path = "../../../libafl/", features = ["std", "derive"] } -libafl_bolts = { path = "../../../libafl_bolts/" } -clap = { version = "4.0", features = ["derive"] } -nix = { version = "0.29", features = ["signal"] } +clap = { version = "4.5.18", features = ["derive"] } +env_logger = "0.11.5" +libafl = { path = "../../../libafl", features = ["std", "derive"] } +libafl_bolts = { path = "../../../libafl_bolts" } +log = { version = "0.4.22", features = ["release_max_level_info"] } +nix = { version = "0.29.0", features = ["signal"] } diff --git a/fuzzers/forkserver/fuzzbench_forkserver/Cargo.toml b/fuzzers/forkserver/fuzzbench_forkserver/Cargo.toml index aa4e9a7b57..024cdfe888 100644 --- a/fuzzers/forkserver/fuzzbench_forkserver/Cargo.toml +++ b/fuzzers/forkserver/fuzzbench_forkserver/Cargo.toml @@ -19,12 +19,14 @@ debug = false strip = true [build-dependencies] -cc = { version = "1.0", features = ["parallel"] } -which = "6.0" +cc = { version = "1.1.22", features = ["parallel"] } +which = "6.0.3" [dependencies] -libafl = { path = "../../../libafl/" } -libafl_bolts = { path = "../../../libafl_bolts/" } -libafl_targets = { path = "../../../libafl_targets/" } -clap = { version = "4.5", features = ["default"] } -nix = { version = "0.29", features = ["signal"] } +libafl = { path = "../../../libafl" } +libafl_bolts = { path = "../../../libafl_bolts" } +libafl_targets = { path = "../../../libafl_targets" } + +log = { version = "0.4.22", features = ["release_max_level_info"] } +clap = { version = "4.5.18", features = ["default"] } +nix = { version = "0.29.0", features = ["signal"] } diff --git a/fuzzers/forkserver/fuzzbench_forkserver_cmplog/Cargo.toml b/fuzzers/forkserver/fuzzbench_forkserver_cmplog/Cargo.toml index 081afdc49d..300e042c11 100644 --- a/fuzzers/forkserver/fuzzbench_forkserver_cmplog/Cargo.toml +++ b/fuzzers/forkserver/fuzzbench_forkserver_cmplog/Cargo.toml @@ -19,12 +19,13 @@ debug = false strip = true [build-dependencies] -cc = { version = "1.0", features = ["parallel"] } -which = "6.0" +cc = { version = "1.1.21", features = ["parallel"] } +which = "6.0.3" [dependencies] -libafl = { path = "../../../libafl/" } -libafl_bolts = { path = "../../../libafl_bolts/" } -libafl_targets = { path = "../../../libafl_targets/" } -clap = { version = "4.5", features = ["default"] } -nix = { version = "0.29", features = ["signal"] } +libafl = { path = "../../../libafl" } +libafl_bolts = { path = "../../../libafl_bolts" } +libafl_targets = { path = "../../../libafl_targets" } +log = { version = "0.4.22", features = ["release_max_level_info"] } +clap = { version = "4.5.18", features = ["default"] } +nix = { version = "0.29.0", features = ["signal"] } diff --git a/fuzzers/forkserver/libafl-fuzz/Cargo.toml b/fuzzers/forkserver/libafl-fuzz/Cargo.toml index a3cd39c416..2b6bff3ebb 100644 --- a/fuzzers/forkserver/libafl-fuzz/Cargo.toml +++ b/fuzzers/forkserver/libafl-fuzz/Cargo.toml @@ -12,7 +12,7 @@ categories = ["development-tools::testing"] edition = "2021" [dependencies] -clap = { version = "4.5", features = ["derive", "env"] } +clap = { version = "4.5.18", features = ["derive", "env"] } env_logger = "0.11.3" libafl = { path = "../../../libafl", features = [ "std", @@ -26,8 +26,9 @@ libafl_bolts = { path = "../../../libafl_bolts", features = [ "errors_backtrace", ] } libafl_targets = { path = "../../../libafl_targets" } +log = { version = "0.4.22", features = ["release_max_level_info"] } memmap2 = "0.9.4" -nix = { version = "0.29", features = ["fs"] } +nix = { version = "0.29.0", features = ["fs"] } regex = "1.10.5" serde = { version = "1.0.117", features = ["derive"] } diff --git a/fuzzers/full_system/nyx_libxml2_parallel/Cargo.toml b/fuzzers/full_system/nyx_libxml2_parallel/Cargo.toml index 33cf56b667..36bc9840c0 100644 --- a/fuzzers/full_system/nyx_libxml2_parallel/Cargo.toml +++ b/fuzzers/full_system/nyx_libxml2_parallel/Cargo.toml @@ -6,10 +6,12 @@ default-run = "nyx_libxml2_parallel" [dependencies] libafl = { path = "../../../libafl" } -libafl_bolts = { path = "../../../libafl_bolts/" } +libafl_bolts = { path = "../../../libafl_bolts" } libafl_cc = { path = "../../../libafl_cc" } libafl_nyx = { path = "../../../libafl_nyx" } +log = { version = "0.4.22", features = ["release_max_level_info"] } + [profile.release] codegen-units = 1 opt-level = 3 diff --git a/fuzzers/full_system/nyx_libxml2_standalone/Cargo.toml b/fuzzers/full_system/nyx_libxml2_standalone/Cargo.toml index 7afca7a5d4..e09c4e39bf 100644 --- a/fuzzers/full_system/nyx_libxml2_standalone/Cargo.toml +++ b/fuzzers/full_system/nyx_libxml2_standalone/Cargo.toml @@ -6,10 +6,12 @@ default-run = "nyx_libxml2_standalone" [dependencies] libafl = { path = "../../../libafl" } -libafl_bolts = { path = "../../../libafl_bolts/" } +libafl_bolts = { path = "../../../libafl_bolts" } libafl_cc = { path = "../../../libafl_cc" } libafl_nyx = { path = "../../../libafl_nyx" } +log = { version = "0.4.22", features = ["release_max_level_info"] } + [profile.release] codegen-units = 1 opt-level = 3 diff --git a/fuzzers/full_system/qemu_baremetal/Cargo.toml b/fuzzers/full_system/qemu_baremetal/Cargo.toml index 4f48d9b4da..d86057ddfd 100644 --- a/fuzzers/full_system/qemu_baremetal/Cargo.toml +++ b/fuzzers/full_system/qemu_baremetal/Cargo.toml @@ -36,7 +36,9 @@ libafl_qemu_sys = { path = "../../../libafl_qemu/libafl_qemu_sys", features = [ "arm", "systemmode", ] } -env_logger = "*" + +env_logger = "0.11.5" +log = { version = "0.4.22", features = ["release_max_level_info"] } [build-dependencies] libafl_qemu_build = { path = "../../../libafl_qemu/libafl_qemu_build" } diff --git a/fuzzers/full_system/qemu_linux_kernel/Cargo.toml b/fuzzers/full_system/qemu_linux_kernel/Cargo.toml index 69e1dea4a7..b5ceac49a0 100644 --- a/fuzzers/full_system/qemu_linux_kernel/Cargo.toml +++ b/fuzzers/full_system/qemu_linux_kernel/Cargo.toml @@ -29,7 +29,7 @@ libafl_qemu_sys = { path = "../../../../../libafl_qemu/libafl_qemu_sys", feature "systemmode", #"paranoid_debug" ] } -env_logger = "*" +env_logger = "0.11.5" [build-dependencies] libafl_qemu_build = { path = "../../../../../libafl_qemu/libafl_qemu_build" } diff --git a/fuzzers/full_system/qemu_linux_process/Cargo.toml b/fuzzers/full_system/qemu_linux_process/Cargo.toml index f60e43b740..1b24c2e7c8 100644 --- a/fuzzers/full_system/qemu_linux_process/Cargo.toml +++ b/fuzzers/full_system/qemu_linux_process/Cargo.toml @@ -26,7 +26,7 @@ libafl_qemu_sys = { path = "../../../../../libafl_qemu/libafl_qemu_sys", feature "systemmode", # "paranoid_debug" ] } -env_logger = "*" +env_logger = "0.11.5" [build-dependencies] libafl_qemu_build = { path = "../../../../../libafl_qemu/libafl_qemu_build" } diff --git a/fuzzers/fuzz_anything/baby_fuzzer_wasm/Cargo.toml b/fuzzers/fuzz_anything/baby_fuzzer_wasm/Cargo.toml index fb47149fec..a8f82b66d6 100644 --- a/fuzzers/fuzz_anything/baby_fuzzer_wasm/Cargo.toml +++ b/fuzzers/fuzz_anything/baby_fuzzer_wasm/Cargo.toml @@ -11,8 +11,9 @@ crate-type = ["cdylib", "rlib"] default = ["console_error_panic_hook"] [dependencies] -js-sys = "0.3" -wasm-bindgen = "0.2.63" +js-sys = "0.3.70" +log = { version = "0.4.22", features = ["release_max_level_info"] } +wasm-bindgen = "0.2.93" libafl = { path = "../../../libafl", default-features = false } libafl_bolts = { path = "../../../libafl_bolts", default-features = false } @@ -21,9 +22,9 @@ libafl_bolts = { path = "../../../libafl_bolts", default-features = false } # logging them with `console.error`. This is great for development, but requires # all the `std::fmt` and `std::panicking` infrastructure, so isn't great for # code size when deploying. -console_error_panic_hook = { version = "0.1.6", optional = true } +console_error_panic_hook = { version = "0.1.7", optional = true } -web-sys = { version = "0.3", features = [ +web-sys = { version = "0.3.70", features = [ 'console', 'Window', 'Performance', @@ -31,7 +32,7 @@ web-sys = { version = "0.3", features = [ ] } [dev-dependencies] -wasm-bindgen-test = "0.3.13" +wasm-bindgen-test = "0.3.43" [profile.release] opt-level = 3 diff --git a/fuzzers/fuzz_anything/baby_fuzzer_wasm/pkg/.gitignore b/fuzzers/fuzz_anything/baby_fuzzer_wasm/pkg/.gitignore new file mode 100644 index 0000000000..f59ec20aab --- /dev/null +++ b/fuzzers/fuzz_anything/baby_fuzzer_wasm/pkg/.gitignore @@ -0,0 +1 @@ +* \ No newline at end of file diff --git a/fuzzers/fuzz_anything/baby_no_std/Cargo.toml b/fuzzers/fuzz_anything/baby_no_std/Cargo.toml index 1a7d2e1556..6bafe9093c 100644 --- a/fuzzers/fuzz_anything/baby_no_std/Cargo.toml +++ b/fuzzers/fuzz_anything/baby_no_std/Cargo.toml @@ -18,9 +18,10 @@ opt-level = 3 debug = true [dependencies] -libafl = { default-features = false, path = "../../../libafl/" } -libafl_bolts = { default-features = false, path = "../../../libafl_bolts/" } +libafl = { default-features = false, path = "../../../libafl" } +libafl_bolts = { default-features = false, path = "../../../libafl_bolts" } +log = { version = "0.4.22", features = ["release_max_level_info"] } static-alloc = "0.2.3" [target.'cfg(unix)'.dependencies] -libc = "0.2" +libc = "0.2.159" diff --git a/fuzzers/fuzz_anything/cargo_fuzz/Cargo.toml b/fuzzers/fuzz_anything/cargo_fuzz/Cargo.toml index ae1155068b..6aa77a7ac7 100644 --- a/fuzzers/fuzz_anything/cargo_fuzz/Cargo.toml +++ b/fuzzers/fuzz_anything/cargo_fuzz/Cargo.toml @@ -20,3 +20,4 @@ categories = [ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +log = { version = "0.4.22", features = ["release_max_level_info"] } diff --git a/fuzzers/fuzz_anything/libafl_atheris/Cargo.toml b/fuzzers/fuzz_anything/libafl_atheris/Cargo.toml index 5bb19b9788..c6a21e510a 100644 --- a/fuzzers/fuzz_anything/libafl_atheris/Cargo.toml +++ b/fuzzers/fuzz_anything/libafl_atheris/Cargo.toml @@ -18,19 +18,20 @@ opt-level = 3 debug = true [build-dependencies] -cc = { version = "1.0", features = ["parallel"] } -which = "6.0" +cc = { version = "1.1.21", features = ["parallel"] } +which = "6.0.3" [dependencies] -libafl = { path = "../../../libafl/" } -libafl_bolts = { path = "../../../libafl_bolts/" } -libafl_targets = { path = "../../../libafl_targets/", features = [ +libafl = { path = "../../../libafl" } +libafl_bolts = { path = "../../../libafl_bolts" } +libafl_targets = { path = "../../../libafl_targets", features = [ "pointer_maps", "sancov_cmplog", "libfuzzer", "sancov_8bit", ] } -clap = { version = "4.5", features = ["default"] } +log = { version = "0.4.22", features = ["release_max_level_info"] } +clap = { version = "4.5.18", features = ["default"] } [lib] name = "afl_atheris" diff --git a/fuzzers/fuzz_anything/push_harness/Cargo.toml b/fuzzers/fuzz_anything/push_harness/Cargo.toml index b9ed4f559c..6844f8e4b3 100644 --- a/fuzzers/fuzz_anything/push_harness/Cargo.toml +++ b/fuzzers/fuzz_anything/push_harness/Cargo.toml @@ -22,6 +22,7 @@ opt-level = 3 debug = true [dependencies] -libafl = { path = "../../../libafl/" } -libafl_bolts = { path = "../../../libafl_bolts/" } +libafl = { path = "../../../libafl" } +libafl_bolts = { path = "../../../libafl_bolts" } +log = { version = "0.4.22", features = ["release_max_level_info"] } klo-routines = { version = "0.1.0", git = "https://github.com/andreafioraldi/klo-routines.git", rev = "b8e2fb6" } diff --git a/fuzzers/fuzz_anything/push_stage_harness/Cargo.toml b/fuzzers/fuzz_anything/push_stage_harness/Cargo.toml index 0cd47ab47d..ac39ff0a4f 100644 --- a/fuzzers/fuzz_anything/push_stage_harness/Cargo.toml +++ b/fuzzers/fuzz_anything/push_stage_harness/Cargo.toml @@ -22,5 +22,6 @@ opt-level = 3 debug = true [dependencies] -libafl = { path = "../../../libafl/" } -libafl_bolts = { path = "../../../libafl_bolts/" } +libafl = { path = "../../../libafl" } +libafl_bolts = { path = "../../../libafl_bolts" } +log = { version = "0.4.22", features = ["release_max_level_info"] } diff --git a/fuzzers/inprocess/dynamic_analysis/Cargo.toml b/fuzzers/inprocess/dynamic_analysis/Cargo.toml index 0c7789e70d..00d6a5452c 100644 --- a/fuzzers/inprocess/dynamic_analysis/Cargo.toml +++ b/fuzzers/inprocess/dynamic_analysis/Cargo.toml @@ -24,25 +24,27 @@ debug = false strip = true [build-dependencies] -cc = { version = "1.0", features = ["parallel"] } -which = "6.0" +cc = { version = "1.1.21", features = ["parallel"] } +which = "6.0.3" [dependencies] -env_logger = "0.11" -once_cell = "1.19" -libafl = { path = "../../../libafl/" } -libafl_bolts = { path = "../../../libafl_bolts/" } -libafl_targets = { path = "../../../libafl_targets/", features = [ +env_logger = "0.11.5" +once_cell = "1.19.0" +libafl = { path = "../../../libafl" } +libafl_bolts = { path = "../../../libafl_bolts" } +libafl_targets = { path = "../../../libafl_targets", features = [ "sancov_pcguard_hitcounts", "sancov_cmplog", "libfuzzer", "function-logging", ] } # TODO Include it only when building cc -libafl_cc = { path = "../../../libafl_cc/" } -clap = { version = "4.5", features = ["default"] } -nix = { version = "0.29", features = ["fs"] } -mimalloc = { version = "*", default-features = false } +libafl_cc = { path = "../../../libafl_cc" } + +clap = { version = "4.5.18", features = ["default"] } +log = { version = "0.4.22", features = ["release_max_level_info"] } +nix = { version = "0.29.0", features = ["fs"] } +mimalloc = { version = "0.1.43", default-features = false } [lib] name = "fuzzbench" diff --git a/fuzzers/inprocess/fuzzbench/Cargo.toml b/fuzzers/inprocess/fuzzbench/Cargo.toml index 270677c7b6..bc836b134c 100644 --- a/fuzzers/inprocess/fuzzbench/Cargo.toml +++ b/fuzzers/inprocess/fuzzbench/Cargo.toml @@ -24,22 +24,23 @@ debug = false strip = true [build-dependencies] -cc = { version = "1.0", features = ["parallel"] } -which = "6.0" +cc = { version = "1.0.106", features = ["parallel"] } +which = "6.0.3" [dependencies] -libafl = { path = "../../../libafl/" } -libafl_bolts = { path = "../../../libafl_bolts/" } -libafl_targets = { path = "../../../libafl_targets/", features = [ +libafl = { path = "../../../libafl" } +libafl_bolts = { path = "../../../libafl_bolts" } +libafl_targets = { path = "../../../libafl_targets", features = [ "sancov_pcguard_hitcounts", "sancov_cmplog", "libfuzzer", ] } # TODO Include it only when building cc -libafl_cc = { path = "../../../libafl_cc/" } -clap = { version = "4.5", features = ["default"] } -nix = { version = "0.29", features = ["fs"] } -mimalloc = { version = "*", default-features = false } +libafl_cc = { path = "../../../libafl_cc" } +log = { version = "0.4.22", features = ["release_max_level_info"] } +clap = { version = "4.5.18", features = ["default"] } +nix = { version = "0.29.0", features = ["fs"] } +mimalloc = { version = "0.1.43", default-features = false } [lib] name = "fuzzbench" diff --git a/fuzzers/inprocess/fuzzbench_ctx/Cargo.toml b/fuzzers/inprocess/fuzzbench_ctx/Cargo.toml index 54b75f1873..db73077c8d 100644 --- a/fuzzers/inprocess/fuzzbench_ctx/Cargo.toml +++ b/fuzzers/inprocess/fuzzbench_ctx/Cargo.toml @@ -24,23 +24,24 @@ debug = false strip = true [build-dependencies] -cc = { version = "1.0", features = ["parallel"] } -which = "6.0" +cc = { version = "1.1.21", features = ["parallel"] } +which = "6.0.3" [dependencies] -libafl = { path = "../../../libafl/" } -libafl_bolts = { path = "../../../libafl_bolts/" } -libafl_targets = { path = "../../../libafl_targets/", features = [ +libafl = { path = "../../../libafl" } +libafl_bolts = { path = "../../../libafl_bolts" } +libafl_targets = { path = "../../../libafl_targets", features = [ "sancov_pcguard_hitcounts", "sancov_cmplog", "libfuzzer", "sancov_ctx", ] } # TODO Include it only when building cc -libafl_cc = { path = "../../../libafl_cc/" } -clap = { version = "4.5", features = ["default"] } -nix = { version = "0.29", features = ["fs"] } -mimalloc = { version = "*", default-features = false } +libafl_cc = { path = "../../../libafl_cc" } +log = { version = "0.4.22", features = ["release_max_level_info"] } +clap = { version = "4.5.18", features = ["default"] } +nix = { version = "0.29.0", features = ["fs"] } +mimalloc = { version = "0.1.43", default-features = false } [lib] name = "fuzzbench" diff --git a/fuzzers/inprocess/fuzzbench_text/Cargo.toml b/fuzzers/inprocess/fuzzbench_text/Cargo.toml index 078d370293..406b5a58cd 100644 --- a/fuzzers/inprocess/fuzzbench_text/Cargo.toml +++ b/fuzzers/inprocess/fuzzbench_text/Cargo.toml @@ -19,24 +19,24 @@ opt-level = 3 debug = true [build-dependencies] -cc = { version = "1.0", features = ["parallel"] } -which = "6.0" +cc = { version = "1.1.21", features = ["parallel"] } +which = "6.0.3" [dependencies] -libafl = { path = "../../../libafl/" } -libafl_bolts = { path = "../../../libafl_bolts/" } -libafl_targets = { path = "../../../libafl_targets/", features = [ +libafl = { path = "../../../libafl" } +libafl_bolts = { path = "../../../libafl_bolts" } +libafl_targets = { path = "../../../libafl_targets", features = [ "sancov_pcguard_hitcounts", "sancov_cmplog", "libfuzzer", ] } # TODO Include it only when building cc -libafl_cc = { path = "../../../libafl_cc/" } -clap = { version = "4.5", features = ["default"] } -nix = { version = "0.29", features = ["fs"] } -mimalloc = { version = "*", default-features = false } +libafl_cc = { path = "../../../libafl_cc" } +log = { version = "0.4.22", features = ["release_max_level_info"] } +clap = { version = "4.5.18", features = ["default"] } +nix = { version = "0.29.0", features = ["fs"] } +mimalloc = { version = "0.1.43", default-features = false } content_inspector = "0.2.4" -#log = "0.4" [lib] name = "fuzzbench" diff --git a/fuzzers/inprocess/libfuzzer_libmozjpeg/Cargo.toml b/fuzzers/inprocess/libfuzzer_libmozjpeg/Cargo.toml index c628ebb985..d7f390091f 100644 --- a/fuzzers/inprocess/libfuzzer_libmozjpeg/Cargo.toml +++ b/fuzzers/inprocess/libfuzzer_libmozjpeg/Cargo.toml @@ -18,19 +18,20 @@ opt-level = 3 debug = true [dependencies] -libafl = { path = "../../../libafl/" } -libafl_bolts = { path = "../../../libafl_bolts/" } -libafl_targets = { path = "../../../libafl_targets/", features = [ +libafl = { path = "../../../libafl" } +libafl_bolts = { path = "../../../libafl_bolts" } +libafl_targets = { path = "../../../libafl_targets", features = [ "sancov_pcguard_edges", "sancov_value_profile", "libfuzzer", ] } # TODO Include it only when building cc -libafl_cc = { path = "../../../libafl_cc/" } -mimalloc = { version = "*", default-features = false } +libafl_cc = { path = "../../../libafl_cc" } +log = { version = "0.4.22", features = ["release_max_level_info"] } +mimalloc = { version = "0.1.43", default-features = false } [build-dependencies] -cc = { version = "1.0", features = ["parallel"] } +cc = { version = "1.1.21", features = ["parallel"] } [lib] name = "libfuzzer_libmozjpeg" diff --git a/fuzzers/inprocess/libfuzzer_libpng/Cargo.toml b/fuzzers/inprocess/libfuzzer_libpng/Cargo.toml index 580f8dd5c8..4aefdb6952 100644 --- a/fuzzers/inprocess/libfuzzer_libpng/Cargo.toml +++ b/fuzzers/inprocess/libfuzzer_libpng/Cargo.toml @@ -20,21 +20,22 @@ opt-level = 3 debug = true [build-dependencies] -cc = { version = "1.0", features = ["parallel"] } -which = "6.0" +cc = { version = "1.1.21", features = ["parallel"] } +which = "6.0.3" [dependencies] -libafl = { path = "../../../libafl/", features = ["default"] } -# libafl = { path = "../../../libafl/", features = ["default"] } -libafl_bolts = { path = "../../../libafl_bolts/" } -libafl_targets = { path = "../../../libafl_targets/", features = [ +libafl = { path = "../../../libafl", features = ["default"] } +libafl_bolts = { path = "../../../libafl_bolts" } +libafl_targets = { path = "../../../libafl_targets", features = [ "sancov_pcguard_hitcounts", "libfuzzer", "sancov_cmplog", ] } # TODO Include it only when building cc -libafl_cc = { path = "../../../libafl_cc/" } -mimalloc = { version = "*", default-features = false } +libafl_cc = { path = "../../../libafl_cc" } + +log = { version = "0.4.22", features = ["release_max_level_info"] } +mimalloc = { version = "0.1.43", default-features = false } [lib] name = "libfuzzer_libpng" diff --git a/fuzzers/inprocess/libfuzzer_libpng_accounting/Cargo.toml b/fuzzers/inprocess/libfuzzer_libpng_accounting/Cargo.toml index 0ed21d2055..7e48d6ccce 100644 --- a/fuzzers/inprocess/libfuzzer_libpng_accounting/Cargo.toml +++ b/fuzzers/inprocess/libfuzzer_libpng_accounting/Cargo.toml @@ -18,29 +18,31 @@ opt-level = 3 debug = true [build-dependencies] -cc = { version = "1.0", features = ["parallel"] } -which = "6.0" +cc = { version = "1.1.21", features = ["parallel"] } +which = "6.0.3" [dependencies] -libafl = { path = "../../../libafl/", features = [ +libafl = { path = "../../../libafl", features = [ "std", "derive", "llmp_compression", "introspection", ] } -libafl_bolts = { path = "../../../libafl_bolts/", features = [ +libafl_bolts = { path = "../../../libafl_bolts", features = [ "std", "derive", "llmp_compression", ] } -libafl_targets = { path = "../../../libafl_targets/", features = [ +libafl_targets = { path = "../../../libafl_targets", features = [ "sancov_pcguard_hitcounts", "libfuzzer", ] } # TODO Include it only when building cc libafl_cc = { path = "../../../libafl_cc/" } -clap = { version = "4.5", features = ["derive"] } -mimalloc = { version = "*", default-features = false } + +clap = { version = "4.5.18", features = ["derive"] } +log = { version = "0.4.22", features = ["release_max_level_info"] } +mimalloc = { version = "0.1.43", default-features = false } [lib] name = "libfuzzer_libpng" diff --git a/fuzzers/inprocess/libfuzzer_libpng_centralized/Cargo.toml b/fuzzers/inprocess/libfuzzer_libpng_centralized/Cargo.toml index d40e87d3d1..2f7f9ef8f8 100644 --- a/fuzzers/inprocess/libfuzzer_libpng_centralized/Cargo.toml +++ b/fuzzers/inprocess/libfuzzer_libpng_centralized/Cargo.toml @@ -18,11 +18,11 @@ opt-level = 3 debug = true [build-dependencies] -cc = { version = "1.0", features = ["parallel"] } -which = "6.0" +cc = { version = "1.1.21", features = ["parallel"] } +which = "6.0.3" [dependencies] -libafl = { path = "../../../libafl/", features = [ +libafl = { path = "../../../libafl", features = [ "std", "derive", "rand_trait", @@ -32,18 +32,20 @@ libafl = { path = "../../../libafl/", features = [ "regex", "scalability_introspection", ] } -libafl_bolts = { path = "../../../libafl_bolts/", features = [ +libafl_bolts = { path = "../../../libafl_bolts", features = [ "errors_backtrace", ] } -libafl_targets = { path = "../../../libafl_targets/", features = [ +libafl_targets = { path = "../../../libafl_targets", features = [ "sancov_pcguard_hitcounts", "libfuzzer", ] } # TODO Include it only when building cc -libafl_cc = { path = "../../../libafl_cc/" } -clap = { version = "4.5", features = ["derive"] } -mimalloc = { version = "*", default-features = false } -env_logger = "0.10" +libafl_cc = { path = "../../../libafl_cc" } + +clap = { version = "4.5.18", features = ["derive"] } +log = { version = "0.4.22", features = ["release_max_level_info"] } +mimalloc = { version = "0.1.43", default-features = false } +env_logger = "0.11.5" [lib] name = "libfuzzer_libpng" diff --git a/fuzzers/inprocess/libfuzzer_libpng_cmin/Cargo.toml b/fuzzers/inprocess/libfuzzer_libpng_cmin/Cargo.toml index f14315cc40..8d857aee3a 100644 --- a/fuzzers/inprocess/libfuzzer_libpng_cmin/Cargo.toml +++ b/fuzzers/inprocess/libfuzzer_libpng_cmin/Cargo.toml @@ -21,22 +21,23 @@ opt-level = 3 debug = true [build-dependencies] -cc = { version = "1.0", features = ["parallel"] } -which = "6.0" +cc = { version = "1.1.21", features = ["parallel"] } +which = "6.0.3" [dependencies] -env_logger = "0.10" -libafl = { path = "../../../libafl/", features = ["default", "cmin"] } -# libafl = { path = "../../../libafl/", features = ["default"] } -libafl_bolts = { path = "../../../libafl_bolts/" } -libafl_targets = { path = "../../../libafl_targets/", features = [ +libafl = { path = "../../../libafl", features = ["default", "cmin"] } +libafl_bolts = { path = "../../../libafl_bolts" } +libafl_targets = { path = "../../../libafl_targets", features = [ "sancov_pcguard_hitcounts", "libfuzzer", "sancov_cmplog", ] } # TODO Include it only when building cc -libafl_cc = { path = "../../../libafl_cc/" } -mimalloc = { version = "*", default-features = false } +libafl_cc = { path = "../../../libafl_cc" } + +env_logger = "0.11.5" +log = { version = "0.4.22", features = ["release_max_level_info"] } +mimalloc = { version = "0.1.43", default-features = false } [lib] name = "libfuzzer_libpng" diff --git a/fuzzers/inprocess/libfuzzer_libpng_launcher/Cargo.toml b/fuzzers/inprocess/libfuzzer_libpng_launcher/Cargo.toml index b6e3b4c583..7b0d116c55 100644 --- a/fuzzers/inprocess/libfuzzer_libpng_launcher/Cargo.toml +++ b/fuzzers/inprocess/libfuzzer_libpng_launcher/Cargo.toml @@ -18,25 +18,27 @@ opt-level = 3 debug = true [build-dependencies] -cc = { version = "1.0", features = ["parallel"] } -which = "6.0" +cc = { version = "1.1.21", features = ["parallel"] } +which = "6.0.3" [dependencies] -libafl = { path = "../../../libafl/", features = [ +libafl = { path = "../../../libafl", features = [ "std", "derive", "llmp_compression", "introspection", ] } -libafl_bolts = { path = "../../../libafl_bolts/" } -libafl_targets = { path = "../../../libafl_targets/", features = [ +libafl_bolts = { path = "../../../libafl_bolts" } +libafl_targets = { path = "../../../libafl_targets", features = [ "sancov_pcguard_hitcounts", "libfuzzer", ] } # TODO Include it only when building cc -libafl_cc = { path = "../../../libafl_cc/" } -clap = { version = "4.5", features = ["derive"] } -mimalloc = { version = "*", default-features = false } +libafl_cc = { path = "../../../libafl_cc" } + +clap = { version = "4.5.18", features = ["derive"] } +log = { version = "0.4.22", features = ["release_max_level_info"] } +mimalloc = { version = "0.1.43", default-features = false } [lib] name = "libfuzzer_libpng" diff --git a/fuzzers/inprocess/libfuzzer_libpng_norestart/Cargo.toml b/fuzzers/inprocess/libfuzzer_libpng_norestart/Cargo.toml index c595ef902e..977298828f 100644 --- a/fuzzers/inprocess/libfuzzer_libpng_norestart/Cargo.toml +++ b/fuzzers/inprocess/libfuzzer_libpng_norestart/Cargo.toml @@ -18,23 +18,25 @@ opt-level = 3 debug = true [build-dependencies] -cc = { version = "1.0", features = ["parallel"] } -which = "6.0" +cc = { version = "1.1.21", features = ["parallel"] } +which = "6.0.3" [dependencies] -env_logger = "0.10" -libafl = { path = "../../../libafl/" } -libafl_bolts = { path = "../../../libafl_bolts/", features = [ +env_logger = "0.11.5" +libafl = { path = "../../../libafl" } +libafl_bolts = { path = "../../../libafl_bolts", features = [ "errors_backtrace", ] } -libafl_targets = { path = "../../../libafl_targets/", features = [ +libafl_targets = { path = "../../../libafl_targets", features = [ "sancov_pcguard_hitcounts", "libfuzzer", ] } # TODO Include it only when building cc -libafl_cc = { path = "../../../libafl_cc/" } -clap = { version = "4.5", features = ["derive"] } -mimalloc = { version = "*", default-features = false } +libafl_cc = { path = "../../../libafl_cc" } + +clap = { version = "4.5.18", features = ["derive"] } +log = { version = "0.4.22", features = ["release_max_level_info"] } +mimalloc = { version = "0.1.43", default-features = false } [lib] name = "libfuzzer_libpng" diff --git a/fuzzers/inprocess/libfuzzer_libpng_tcp_manager/Cargo.toml b/fuzzers/inprocess/libfuzzer_libpng_tcp_manager/Cargo.toml index 0997f4b22d..990258a9df 100644 --- a/fuzzers/inprocess/libfuzzer_libpng_tcp_manager/Cargo.toml +++ b/fuzzers/inprocess/libfuzzer_libpng_tcp_manager/Cargo.toml @@ -20,21 +20,23 @@ opt-level = 3 debug = true [build-dependencies] -cc = { version = "1.0", features = ["parallel"] } -which = "6.0" +cc = { version = "1.1.21", features = ["parallel"] } +which = "6.0.3" [dependencies] -libafl = { path = "../../../libafl/", features = ["default", "tcp_manager"] } +libafl = { path = "../../../libafl", features = ["default", "tcp_manager"] } # libafl = { path = "../../../libafl/", features = ["default"] } -libafl_bolts = { path = "../../../libafl_bolts/" } -libafl_targets = { path = "../../../libafl_targets/", features = [ +libafl_bolts = { path = "../../../libafl_bolts" } +libafl_targets = { path = "../../../libafl_targets", features = [ "sancov_pcguard_hitcounts", "libfuzzer", "sancov_cmplog", ] } # TODO Include it only when building cc -libafl_cc = { path = "../../../libafl_cc/" } -mimalloc = { version = "*", default-features = false } +libafl_cc = { path = "../../../libafl_cc" } + +log = { version = "0.4.22", features = ["release_max_level_info"] } +mimalloc = { version = "0.1.43", default-features = false } [lib] name = "libfuzzer_libpng" diff --git a/fuzzers/inprocess/libfuzzer_stb_image/Cargo.toml b/fuzzers/inprocess/libfuzzer_stb_image/Cargo.toml index d2795d2ff3..ef48119d17 100644 --- a/fuzzers/inprocess/libfuzzer_stb_image/Cargo.toml +++ b/fuzzers/inprocess/libfuzzer_stb_image/Cargo.toml @@ -19,15 +19,16 @@ opt-level = 3 debug = true [dependencies] -libafl = { path = "../../../libafl/" } -libafl_bolts = { path = "../../../libafl_bolts/" } -libafl_targets = { path = "../../../libafl_targets/", features = [ +libafl = { path = "../../../libafl" } +libafl_bolts = { path = "../../../libafl_bolts" } +libafl_targets = { path = "../../../libafl_targets", features = [ "sancov_pcguard_edges", "sancov_cmplog", "libfuzzer", "libfuzzer_no_link_main", ] } -mimalloc = { version = "*", default-features = false } +log = { version = "0.4.22", features = ["release_max_level_info"] } +mimalloc = { version = "0.1.43", default-features = false } [build-dependencies] -cc = { version = "1.0", features = ["parallel"] } +cc = { version = "1.1.21", features = ["parallel"] } diff --git a/fuzzers/inprocess/libfuzzer_stb_image_sugar/Cargo.toml b/fuzzers/inprocess/libfuzzer_stb_image_sugar/Cargo.toml index 257031fecc..3c5d684e95 100644 --- a/fuzzers/inprocess/libfuzzer_stb_image_sugar/Cargo.toml +++ b/fuzzers/inprocess/libfuzzer_stb_image_sugar/Cargo.toml @@ -26,15 +26,16 @@ opt-level = 3 debug = true [dependencies] -libafl = { path = "../../../libafl/" } -libafl_bolts = { path = "../../../libafl_bolts/" } -libafl_targets = { path = "../../../libafl_targets/", features = [ +libafl = { path = "../../../libafl" } +libafl_bolts = { path = "../../../libafl_bolts" } +libafl_targets = { path = "../../../libafl_targets", features = [ "sancov_pcguard_edges", "sancov_cmplog", "libfuzzer", ] } -libafl_sugar = { path = "../../../libafl_sugar/" } -mimalloc = { version = "*", default-features = false } +libafl_sugar = { path = "../../../libafl_sugar" } +log = { version = "0.4.22", features = ["release_max_level_info"] } +mimalloc = { version = "0.1.43", default-features = false } [build-dependencies] -cc = { version = "1.0", features = ["parallel"] } +cc = { version = "1.1.21", features = ["parallel"] } diff --git a/fuzzers/inprocess/libfuzzer_windows_asan/Cargo.toml b/fuzzers/inprocess/libfuzzer_windows_asan/Cargo.toml index d4ed3d84f9..b7e9d4ab7b 100644 --- a/fuzzers/inprocess/libfuzzer_windows_asan/Cargo.toml +++ b/fuzzers/inprocess/libfuzzer_windows_asan/Cargo.toml @@ -14,16 +14,17 @@ opt-level = 3 debug = true [dependencies] -libafl = { path = "../../../libafl/" } -libafl_bolts = { path = "../../../libafl_bolts/" } -libafl_targets = { path = "../../../libafl_targets/", features = [ +libafl = { path = "../../../libafl" } +libafl_bolts = { path = "../../../libafl_bolts" } +libafl_targets = { path = "../../../libafl_targets", features = [ "libfuzzer", "sancov_pcguard_edges", ] } -libafl_cc = { path = "../../../libafl_cc/" } +libafl_cc = { path = "../../../libafl_cc" } +log = { version = "0.4.22", features = ["release_max_level_info"] } [build-dependencies] -cc = { version = "1.0" } +cc = { version = "1.1.21" } [lib] name = "libfuzzer_windows_asan" diff --git a/fuzzers/inprocess/sqlite_centralized_multi_machine/Cargo.toml b/fuzzers/inprocess/sqlite_centralized_multi_machine/Cargo.toml index a681c1ddb6..fdadefc791 100644 --- a/fuzzers/inprocess/sqlite_centralized_multi_machine/Cargo.toml +++ b/fuzzers/inprocess/sqlite_centralized_multi_machine/Cargo.toml @@ -19,8 +19,8 @@ opt-level = 3 debug = true [build-dependencies] -cc = { version = "1.0", features = ["parallel"] } -which = "6.0" +cc = { version = "1.1.21", features = ["parallel"] } +which = "6.0.3" [dependencies] # no llmp compression for now, better perfs. @@ -54,9 +54,11 @@ libafl_targets = { path = "../../../libafl_targets", features = [ ] } # TODO Include it only when building cc libafl_cc = { path = "../../../libafl_cc" } -clap = { version = "4.5", features = ["derive"] } -mimalloc = { version = "*", default-features = false } -env_logger = "0.11" + +clap = { version = "4.5.18", features = ["derive"] } +log = { version = "0.4.22", features = ["release_max_level_info"] } +mimalloc = { version = "0.1.43", default-features = false } +env_logger = "0.11.5" [lib] name = "libfuzzer_libpng" diff --git a/fuzzers/structure_aware/baby_fuzzer_custom_input/Cargo.toml b/fuzzers/structure_aware/baby_fuzzer_custom_input/Cargo.toml index e27cbfe32e..8068461b0c 100644 --- a/fuzzers/structure_aware/baby_fuzzer_custom_input/Cargo.toml +++ b/fuzzers/structure_aware/baby_fuzzer_custom_input/Cargo.toml @@ -19,6 +19,7 @@ opt-level = 3 debug = true [dependencies] -libafl = { path = "../../../libafl/" } -libafl_bolts = { path = "../../../libafl_bolts/" } -serde = "*" +libafl = { path = "../../../libafl" } +libafl_bolts = { path = "../../../libafl_bolts" } +log = { version = "0.4.22", features = ["release_max_level_info"] } +serde = "1.0.210" diff --git a/fuzzers/structure_aware/baby_fuzzer_gramatron/Cargo.toml b/fuzzers/structure_aware/baby_fuzzer_gramatron/Cargo.toml index 93bdc36d64..8d092bf0b8 100644 --- a/fuzzers/structure_aware/baby_fuzzer_gramatron/Cargo.toml +++ b/fuzzers/structure_aware/baby_fuzzer_gramatron/Cargo.toml @@ -22,8 +22,9 @@ opt-level = 3 debug = true [dependencies] -libafl = { path = "../../../libafl/" } -libafl_bolts = { path = "../../../libafl_bolts/" } -postcard = { version = "1.0", features = [ +libafl = { path = "../../../libafl" } +libafl_bolts = { path = "../../../libafl_bolts" } +log = { version = "0.4.22", features = ["release_max_level_info"] } +postcard = { version = "1.0.10", features = [ "alloc", ], default-features = false } # no_std compatible serde serialization format diff --git a/fuzzers/structure_aware/baby_fuzzer_grimoire/Cargo.toml b/fuzzers/structure_aware/baby_fuzzer_grimoire/Cargo.toml index 1becc20fce..ece7ae7cdf 100644 --- a/fuzzers/structure_aware/baby_fuzzer_grimoire/Cargo.toml +++ b/fuzzers/structure_aware/baby_fuzzer_grimoire/Cargo.toml @@ -22,5 +22,6 @@ opt-level = 3 debug = true [dependencies] -libafl = { path = "../../../libafl/" } -libafl_bolts = { path = "../../../libafl_bolts/" } +libafl = { path = "../../../libafl" } +libafl_bolts = { path = "../../../libafl_bolts" } +log = { version = "0.4.22", features = ["release_max_level_info"] } diff --git a/fuzzers/structure_aware/baby_fuzzer_multi/Cargo.toml b/fuzzers/structure_aware/baby_fuzzer_multi/Cargo.toml index b835a32d04..b51ebf91bb 100644 --- a/fuzzers/structure_aware/baby_fuzzer_multi/Cargo.toml +++ b/fuzzers/structure_aware/baby_fuzzer_multi/Cargo.toml @@ -24,5 +24,6 @@ opt-level = 3 debug = true [dependencies] -libafl = { path = "../../../libafl/", features = ["multipart_inputs"] } -libafl_bolts = { path = "../../../libafl_bolts/" } +libafl = { path = "../../../libafl", features = ["multipart_inputs"] } +libafl_bolts = { path = "../../../libafl_bolts" } +log = { version = "0.4.22", features = ["release_max_level_info"] } diff --git a/fuzzers/structure_aware/baby_fuzzer_nautilus/Cargo.toml b/fuzzers/structure_aware/baby_fuzzer_nautilus/Cargo.toml index 560fe0e841..48596616c5 100644 --- a/fuzzers/structure_aware/baby_fuzzer_nautilus/Cargo.toml +++ b/fuzzers/structure_aware/baby_fuzzer_nautilus/Cargo.toml @@ -22,5 +22,6 @@ opt-level = 3 debug = true [dependencies] -libafl = { path = "../../../libafl/", features = ["default", "nautilus"] } -libafl_bolts = { path = "../../../libafl_bolts/" } +libafl = { path = "../../../libafl", features = ["default", "nautilus"] } +libafl_bolts = { path = "../../../libafl_bolts" } +log = { version = "0.4.22", features = ["release_max_level_info"] } diff --git a/fuzzers/structure_aware/baby_fuzzer_tokens/Cargo.toml b/fuzzers/structure_aware/baby_fuzzer_tokens/Cargo.toml index 8793205dfe..185d253486 100644 --- a/fuzzers/structure_aware/baby_fuzzer_tokens/Cargo.toml +++ b/fuzzers/structure_aware/baby_fuzzer_tokens/Cargo.toml @@ -22,5 +22,6 @@ opt-level = 3 debug = true [dependencies] -libafl = { path = "../../../libafl/" } -libafl_bolts = { path = "../../../libafl_bolts/" } +libafl = { path = "../../../libafl" } +libafl_bolts = { path = "../../../libafl_bolts" } +log = { version = "0.4.22", features = ["release_max_level_info"] } diff --git a/fuzzers/structure_aware/libfuzzer_stb_image_concolic/fuzzer/Cargo.toml b/fuzzers/structure_aware/libfuzzer_stb_image_concolic/fuzzer/Cargo.toml index 666c67742f..91ce02be04 100644 --- a/fuzzers/structure_aware/libfuzzer_stb_image_concolic/fuzzer/Cargo.toml +++ b/fuzzers/structure_aware/libfuzzer_stb_image_concolic/fuzzer/Cargo.toml @@ -20,18 +20,19 @@ opt-level = 3 debug = true [dependencies] -libafl = { path = "../../../../libafl/", features = ["concolic_mutation"] } -libafl_bolts = { path = "../../../../libafl_bolts/" } -libafl_targets = { path = "../../../../libafl_targets/", features = [ +libafl = { path = "../../../../libafl", features = ["concolic_mutation"] } +libafl_bolts = { path = "../../../../libafl_bolts" } +libafl_targets = { path = "../../../../libafl_targets", features = [ "sancov_pcguard_edges", "sancov_cmplog", "libfuzzer", ] } -clap = { version = "4.0", features = ["derive"] } -mimalloc = { version = "*", default-features = false } +clap = { version = "4.5.18", features = ["derive"] } +log = { version = "0.4.22", features = ["release_max_level_info"] } +mimalloc = { version = "0.1.43", default-features = false } [build-dependencies] -cc = { version = "1.0", features = ["parallel"] } -cmake = "0.1" -which = "4.4" +cc = { version = "1.1.22", features = ["parallel"] } +cmake = "0.1.51" +which = "6.0.3" symcc_libafl = { path = "../../../../libafl_concolic/symcc_libafl" } diff --git a/fuzzers/structure_aware/libfuzzer_stb_image_concolic/runtime/Cargo.toml b/fuzzers/structure_aware/libfuzzer_stb_image_concolic/runtime/Cargo.toml index 95de7a26ee..3336fec2ca 100644 --- a/fuzzers/structure_aware/libfuzzer_stb_image_concolic/runtime/Cargo.toml +++ b/fuzzers/structure_aware/libfuzzer_stb_image_concolic/runtime/Cargo.toml @@ -20,4 +20,5 @@ panic = "abort" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +log = { version = "0.4.22", features = ["release_max_level_info"] } symcc_runtime = { path = "../../../../libafl_concolic/symcc_runtime" } diff --git a/fuzzers/structure_aware/nautilus_sync/Cargo.toml b/fuzzers/structure_aware/nautilus_sync/Cargo.toml index 1e7f71f50a..236bd260a2 100644 --- a/fuzzers/structure_aware/nautilus_sync/Cargo.toml +++ b/fuzzers/structure_aware/nautilus_sync/Cargo.toml @@ -23,16 +23,16 @@ opt-level = 3 debug = true [dependencies] -libafl = { path = "../../../libafl/", features = ["default", "nautilus"] } -libafl_bolts = { path = "../../../libafl_bolts/" } -libafl_targets = { path = "../../../libafl_targets/", features = [ +libafl = { path = "../../../libafl", features = ["default", "nautilus"] } +libafl_bolts = { path = "../../../libafl_bolts" } +libafl_targets = { path = "../../../libafl_targets", features = [ "sancov_pcguard_hitcounts", "libfuzzer", ] } # TODO Include it only when building cc -libafl_cc = { path = "../../../libafl_cc/" } -clap = { version = "4.5", features = ["derive"] } -mimalloc = { version = "*", default-features = false } +libafl_cc = { path = "../../../libafl_cc" } +clap = { version = "4.5.18", features = ["derive"] } +mimalloc = { version = "0.1.43", default-features = false } [lib] name = "nautilus_sync" diff --git a/libafl/Cargo.toml b/libafl/Cargo.toml index 88753194fd..d462ae3f9c 100644 --- a/libafl/Cargo.toml +++ b/libafl/Cargo.toml @@ -187,12 +187,14 @@ nautilus = [ ] [build-dependencies] -rustversion = "1.0" +rustversion = "1.0.17" [dev-dependencies] -serde_json = { version = "1.0", default-features = false, features = ["alloc"] } +serde_json = { workspace = true, default-features = false, features = [ + "alloc", +] } # clippy-suggested optimised byte counter -bytecount = "0.6.3" +bytecount = "0.6.8" [dependencies] libafl_bolts = { version = "0.13.2", path = "../libafl_bolts", default-features = false, features = [ @@ -200,45 +202,40 @@ libafl_bolts = { version = "0.13.2", path = "../libafl_bolts", default-features ] } libafl_derive = { version = "0.13.2", path = "../libafl_derive", optional = true } -rustversion = "1.0" +rustversion = { workspace = true } tuple_list = { version = "0.1.3" } -hashbrown = { version = "0.14", features = [ +hashbrown = { workspace = true, features = [ "serde", "ahash", ], default-features = false } # A faster hashmap, nostd compatible -num-traits = { version = "0.2", default-features = false } -serde = { version = "1.0", default-features = false, features = [ - "alloc", - "derive", -] } # serialization lib -postcard = { version = "1.0", features = [ - "alloc", -], default-features = false } # no_std compatible serde serialization format -bincode = { version = "1.3", optional = true } -c2rust-bitfields = { version = "0.18", features = ["no_std"] } -ahash = { version = "0.8", default-features = false } # The hash function already used in hashbrown -meminterval = { version = "0.4", features = ["serde"] } -backtrace = { version = "0.3", optional = true } # Used to get the stacktrace in StacktraceObserver -typed-builder = { version = "0.18", optional = true } # Implement the builder pattern at compiletime +num-traits = { workspace = true, default-features = false } +serde = { workspace = true, features = ["alloc"] } # serialization lib +postcard = { workspace = true } # no_std compatible serde serialization format +bincode = { version = "1.3.3", optional = true } +c2rust-bitfields = { version = "0.19.0", features = ["no_std"] } +ahash = { workspace = true } # The hash function already used in hashbrown +meminterval = { workspace = true, features = ["serde"] } +backtrace = { workspace = true, optional = true } # Used to get the stacktrace in StacktraceObserver +typed-builder = { workspace = true, optional = true } # Implement the builder pattern at compiletime -serde_json = { version = "1.0", optional = true, default-features = false, features = [ +serde_json = { workspace = true, optional = true, default-features = false, features = [ "alloc", ] } -nix = { version = "0.29", optional = true } -regex = { version = "1", optional = true } -uuid = { version = "1.8", optional = true, features = ["serde", "v4"] } -libm = "0.2" -ratatui = { version = "0.26", default-features = false, features = [ +nix = { workspace = true, default-features = true, optional = true } +regex = { workspace = true, optional = true } +uuid = { workspace = true, optional = true, features = ["serde", "v4"] } +libm = "0.2.8" +ratatui = { version = "0.28.1", default-features = false, features = [ 'crossterm', ], optional = true } # Commandline rendering, for TUI Monitor -crossterm = { version = "0.27", optional = true } +crossterm = { version = "0.28.1", optional = true } -prometheus-client = { version = "0.22", optional = true } # For the prometheus monitor -tide = { version = "0.16", optional = true } -async-std = { version = "1.12", features = ["attributes"], optional = true } -futures = { version = "0.3", optional = true } -log = { version = "0.4" } -tokio = { version = "1.38", optional = true, features = [ +prometheus-client = { version = "0.22.3", optional = true } # For the prometheus monitor +tide = { version = "0.16.0", optional = true } +async-std = { version = "1.13.0", features = ["attributes"], optional = true } +futures = { version = "0.3.30", optional = true } +log = { workspace = true } +tokio = { version = "1.40.0", optional = true, features = [ "sync", "net", "rt", @@ -247,42 +244,42 @@ tokio = { version = "1.38", optional = true, features = [ "rt-multi-thread", "time", ] } # used for TCP Event Manager and multi-machine -enumflags2 = { version = "0.7", optional = true } +enumflags2 = { version = "0.7.10", optional = true } -wait-timeout = { version = "0.2", optional = true } # used by CommandExecutor to wait for child process +wait-timeout = { version = "0.2.0", optional = true } # used by CommandExecutor to wait for child process -concat-idents = { version = "1.1.3", optional = true } +concat-idents = { version = "1.1.5", optional = true } -libcasr = { version = "2.7", optional = true } +libcasr = { version = "2.12.1", optional = true } -bitvec = { version = "1.0", optional = true, features = [ +bitvec = { version = "1.0.1", optional = true, features = [ "serde", ] } # used for string range storage -arrayvec = { version = "0.7.4", optional = true, default-features = false } # used for fixed-len collects +arrayvec = { version = "0.7.6", optional = true, default-features = false } # used for fixed-len collects -const_format = "0.2.32" # used for providing helpful compiler output -const_panic = "0.2.8" # similarly, for formatting const panic output +const_format = "0.2.33" # used for providing helpful compiler output +const_panic = "0.2.9" # similarly, for formatting const panic output -pyo3 = { version = "0.22", optional = true } # For nautilus -regex-syntax = { version = "0.8.3", optional = true } # For nautilus +pyo3 = { workspace = true, optional = true } # For nautilus +regex-syntax = { version = "0.8.4", optional = true } # For nautilus # optional-dev deps (change when target.'cfg(accessible(::std))'.test-dependencies will be stable) -serial_test = { version = "3", optional = true, default-features = false, features = [ +serial_test = { workspace = true, optional = true, default-features = false, features = [ "logging", ] } # Document all features of this crate (for `cargo doc`) -document-features = { version = "0.2", optional = true } +document-features = { workspace = true, optional = true } # Optional -clap = { version = "4.5", optional = true } +clap = { workspace = true, optional = true } [target.'cfg(unix)'.dependencies] -libc = "0.2" # For (*nix) libc -z3 = { version = "0.12.0", optional = true } # for concolic mutation +libc = { workspace = true } # For (*nix) libc +z3 = { workspace = true, optional = true } # for concolic mutation [target.'cfg(windows)'.dependencies] -windows = { version = "0.51.1", features = [ +windows = { workspace = true, features = [ "Win32_Foundation", "Win32_System_Threading", "Win32_System_Diagnostics_Debug", @@ -293,9 +290,4 @@ windows = { version = "0.51.1", features = [ ] } [target.'cfg(windows)'.build-dependencies] -windows = "0.51.1" - -#[profile.release] -#lto = true -#opt-level = 3 -#debug = true +windows = { workspace = true } diff --git a/libafl/src/common/nautilus/grammartec/tree.rs b/libafl/src/common/nautilus/grammartec/tree.rs index d88a6701eb..30ea6992df 100644 --- a/libafl/src/common/nautilus/grammartec/tree.rs +++ b/libafl/src/common/nautilus/grammartec/tree.rs @@ -434,7 +434,7 @@ impl<'a> TreeMutation<'a> { } } -impl<'a> TreeLike for TreeMutation<'a> { +impl TreeLike for TreeMutation<'_> { fn get_rule_id(&self, n: NodeId) -> RuleId { self.get_at(n).id() } diff --git a/libafl/src/corpus/mod.rs b/libafl/src/corpus/mod.rs index 206e267c9b..f90d7b3802 100644 --- a/libafl/src/corpus/mod.rs +++ b/libafl/src/corpus/mod.rs @@ -222,7 +222,7 @@ where cur_back: Option, } -impl<'a, C> Iterator for CorpusIdIterator<'a, C> +impl Iterator for CorpusIdIterator<'_, C> where C: Corpus, { @@ -238,7 +238,7 @@ where } } -impl<'a, C> DoubleEndedIterator for CorpusIdIterator<'a, C> +impl DoubleEndedIterator for CorpusIdIterator<'_, C> where C: Corpus, { diff --git a/libafl/src/events/launcher.rs b/libafl/src/events/launcher.rs index 13081d3b1c..95f8abde1f 100644 --- a/libafl/src/events/launcher.rs +++ b/libafl/src/events/launcher.rs @@ -166,7 +166,7 @@ impl Debug for Launcher<'_, CF, MT, SP> { } } -impl<'a, CF, MT, SP> Launcher<'a, CF, MT, SP> +impl Launcher<'_, CF, MT, SP> where MT: Monitor + Clone, SP: ShMemProvider, @@ -194,7 +194,7 @@ where } #[cfg(feature = "std")] -impl<'a, CF, MT, SP> Launcher<'a, CF, MT, SP> +impl Launcher<'_, CF, MT, SP> where MT: Monitor + Clone, SP: ShMemProvider, @@ -568,7 +568,7 @@ impl Debug for CentralizedLauncher<'_, CF, MF, MT, SP> { pub type StdCentralizedInnerMgr = LlmpRestartingEventManager<(), S, SP>; #[cfg(all(unix, feature = "std", feature = "fork"))] -impl<'a, CF, MF, MT, SP> CentralizedLauncher<'a, CF, MF, MT, SP> +impl CentralizedLauncher<'_, CF, MF, MT, SP> where MT: Monitor + Clone + 'static, SP: ShMemProvider + 'static, @@ -612,7 +612,7 @@ where } #[cfg(all(unix, feature = "std", feature = "fork"))] -impl<'a, CF, MF, MT, SP> CentralizedLauncher<'a, CF, MF, MT, SP> +impl CentralizedLauncher<'_, CF, MF, MT, SP> where MT: Monitor + Clone + 'static, SP: ShMemProvider + 'static, diff --git a/libafl/src/events/multi_machine.rs b/libafl/src/events/multi_machine.rs index 63597fe615..f55e41ea24 100644 --- a/libafl/src/events/multi_machine.rs +++ b/libafl/src/events/multi_machine.rs @@ -63,8 +63,8 @@ where } /// We do not use raw pointers, so no problem with thead-safety -unsafe impl<'a, I: Input> Send for MultiMachineMsg<'a, I> {} -unsafe impl<'a, I: Input> Sync for MultiMachineMsg<'a, I> {} +unsafe impl Send for MultiMachineMsg<'_, I> {} +unsafe impl Sync for MultiMachineMsg<'_, I> {} impl<'a, I> MultiMachineMsg<'a, I> where diff --git a/libafl/src/executors/forkserver.rs b/libafl/src/executors/forkserver.rs index a8ba42458a..645a3bacc0 100644 --- a/libafl/src/executors/forkserver.rs +++ b/libafl/src/executors/forkserver.rs @@ -845,9 +845,9 @@ where if Self::is_old_forkserver(version_status) { log::info!("Old fork server model is used by the target, this still works though."); - self.initialize_old_forkserver(version_status, &map, &mut forkserver)?; + self.initialize_old_forkserver(version_status, map.as_ref(), &mut forkserver)?; } else { - self.initialize_forkserver(version_status, &map, &mut forkserver)?; + self.initialize_forkserver(version_status, map.as_ref(), &mut forkserver)?; } Ok((forkserver, input_file, map)) } @@ -862,7 +862,7 @@ where fn initialize_forkserver( &mut self, status: i32, - map: &Option, + map: Option<&SP::ShMem>, forkserver: &mut Forkserver, ) -> Result<(), Error> { let keep = status; @@ -968,7 +968,7 @@ where fn initialize_old_forkserver( &mut self, status: i32, - map: &Option, + map: Option<&SP::ShMem>, forkserver: &mut Forkserver, ) -> Result<(), Error> { if status & FS_OPT_ENABLED == FS_OPT_ENABLED && status & FS_OPT_MAPSIZE == FS_OPT_MAPSIZE { @@ -1347,7 +1347,7 @@ impl<'a> ForkserverExecutorBuilder<'a, UnixShMemProvider> { } } -impl<'a> Default for ForkserverExecutorBuilder<'a, UnixShMemProvider> { +impl Default for ForkserverExecutorBuilder<'_, UnixShMemProvider> { fn default() -> Self { Self::new() } diff --git a/libafl/src/executors/hooks/windows.rs b/libafl/src/executors/hooks/windows.rs index eed08c5ae3..b6063c557d 100644 --- a/libafl/src/executors/hooks/windows.rs +++ b/libafl/src/executors/hooks/windows.rs @@ -157,7 +157,7 @@ pub mod windows_exception_handler { impl ExceptionHandler for InProcessExecutorHandlerData { /// # Safety - /// Will dereference EXCEPTION_POINTERS and access `GLOBAL_STATE`. + /// Will dereference `EXCEPTION_POINTERS` and access `GLOBAL_STATE`. #[allow(clippy::not_unsafe_ptr_arg_deref)] unsafe fn handle( &mut self, diff --git a/libafl/src/executors/inprocess_fork/mod.rs b/libafl/src/executors/inprocess_fork/mod.rs index 834b3bdfc9..77c561db21 100644 --- a/libafl/src/executors/inprocess_fork/mod.rs +++ b/libafl/src/executors/inprocess_fork/mod.rs @@ -99,8 +99,7 @@ where inner: GenericInProcessForkExecutorInner, } -impl<'a, H, HT, OT, S, SP, EM, Z> Debug - for GenericInProcessForkExecutor<'a, H, HT, OT, S, SP, EM, Z> +impl Debug for GenericInProcessForkExecutor<'_, H, HT, OT, S, SP, EM, Z> where H: FnMut(&S::Input) -> ExitKind + ?Sized, OT: ObserversTuple + Debug, @@ -127,8 +126,8 @@ where } } -impl<'a, H, HT, OT, S, SP, EM, Z> UsesState - for GenericInProcessForkExecutor<'a, H, HT, OT, S, SP, EM, Z> +impl UsesState + for GenericInProcessForkExecutor<'_, H, HT, OT, S, SP, EM, Z> where H: FnMut(&S::Input) -> ExitKind + ?Sized, OT: ObserversTuple, @@ -141,8 +140,8 @@ where type State = S; } -impl<'a, EM, H, HT, OT, S, SP, Z> Executor - for GenericInProcessForkExecutor<'a, H, HT, OT, S, SP, EM, Z> +impl Executor + for GenericInProcessForkExecutor<'_, H, HT, OT, S, SP, EM, Z> where H: FnMut(&S::Input) -> ExitKind + ?Sized, OT: ObserversTuple + Debug, @@ -234,8 +233,8 @@ where { } } -impl<'a, H, HT, OT, S, SP, EM, Z> HasObservers - for GenericInProcessForkExecutor<'a, H, HT, OT, S, SP, EM, Z> +impl HasObservers + for GenericInProcessForkExecutor<'_, H, HT, OT, S, SP, EM, Z> where H: FnMut(&S::Input) -> ExitKind + ?Sized, HT: ExecutorHooksTuple, diff --git a/libafl/src/executors/inprocess_fork/stateful.rs b/libafl/src/executors/inprocess_fork/stateful.rs index 72d6ee0a34..2bff436020 100644 --- a/libafl/src/executors/inprocess_fork/stateful.rs +++ b/libafl/src/executors/inprocess_fork/stateful.rs @@ -85,8 +85,8 @@ where phantom: PhantomData, } -impl<'a, H, HT, OT, S, SP, ES, EM, Z> Debug - for StatefulGenericInProcessForkExecutor<'a, H, HT, OT, S, SP, ES, EM, Z> +impl Debug + for StatefulGenericInProcessForkExecutor<'_, H, HT, OT, S, SP, ES, EM, Z> where H: FnMut(&S::Input, &mut ES) -> ExitKind + ?Sized, OT: ObserversTuple + Debug, @@ -113,8 +113,8 @@ where } } -impl<'a, H, HT, OT, S, SP, ES, EM, Z> UsesState - for StatefulGenericInProcessForkExecutor<'a, H, HT, OT, S, SP, ES, EM, Z> +impl UsesState + for StatefulGenericInProcessForkExecutor<'_, H, HT, OT, S, SP, ES, EM, Z> where H: FnMut(&S::Input, &mut ES) -> ExitKind + ?Sized, OT: ObserversTuple, @@ -127,8 +127,8 @@ where type State = S; } -impl<'a, EM, H, HT, OT, S, SP, Z, ES, OF> Executor - for StatefulGenericInProcessForkExecutor<'a, H, HT, OT, S, SP, ES, EM, Z> +impl Executor + for StatefulGenericInProcessForkExecutor<'_, H, HT, OT, S, SP, ES, EM, Z> where H: FnMut(&S::Input, &mut ES) -> ExitKind + ?Sized, OT: ObserversTuple + Debug, @@ -225,8 +225,8 @@ where } } -impl<'a, H, HT, OT, S, SP, ES, EM, Z> HasObservers - for StatefulGenericInProcessForkExecutor<'a, H, HT, OT, S, SP, ES, EM, Z> +impl HasObservers + for StatefulGenericInProcessForkExecutor<'_, H, HT, OT, S, SP, ES, EM, Z> where H: FnMut(&S::Input, &mut ES) -> ExitKind + ?Sized, HT: ExecutorHooksTuple, diff --git a/libafl/src/feedbacks/nautilus.rs b/libafl/src/feedbacks/nautilus.rs index 88d062cad5..eb83f17e85 100644 --- a/libafl/src/feedbacks/nautilus.rs +++ b/libafl/src/feedbacks/nautilus.rs @@ -62,16 +62,16 @@ impl<'a> NautilusFeedback<'a> { } } -impl<'a> Named for NautilusFeedback<'a> { +impl Named for NautilusFeedback<'_> { fn name(&self) -> &Cow<'static, str> { static NAME: Cow<'static, str> = Cow::Borrowed("NautilusFeedback"); &NAME } } -impl<'a, S> StateInitializer for NautilusFeedback<'a> {} +impl StateInitializer for NautilusFeedback<'_> {} -impl<'a, EM, OT, S> Feedback for NautilusFeedback<'a> +impl Feedback for NautilusFeedback<'_> where S: HasMetadata + HasCorpus, S::Corpus: Corpus, diff --git a/libafl/src/generators/gramatron.rs b/libafl/src/generators/gramatron.rs index b308671886..f8677e0fcf 100644 --- a/libafl/src/generators/gramatron.rs +++ b/libafl/src/generators/gramatron.rs @@ -39,7 +39,7 @@ pub struct GramatronGenerator<'a, S> { phantom: PhantomData, } -impl<'a, S> Generator for GramatronGenerator<'a, S> +impl Generator for GramatronGenerator<'_, S> where S: HasRand, { diff --git a/libafl/src/generators/mod.rs b/libafl/src/generators/mod.rs index 00e34dd1e9..355f28a170 100644 --- a/libafl/src/generators/mod.rs +++ b/libafl/src/generators/mod.rs @@ -61,7 +61,7 @@ impl<'a, I, S, G> GeneratorIter<'a, I, S, G> { } } -impl<'a, I, S, G> Iterator for GeneratorIter<'a, I, S, G> +impl Iterator for GeneratorIter<'_, I, S, G> where G: Generator, { diff --git a/libafl/src/generators/nautilus.rs b/libafl/src/generators/nautilus.rs index f905afea24..e73968286d 100644 --- a/libafl/src/generators/nautilus.rs +++ b/libafl/src/generators/nautilus.rs @@ -107,7 +107,7 @@ impl Debug for NautilusGenerator<'_> { } } -impl<'a, S: HasRand> Generator for NautilusGenerator<'a> { +impl Generator for NautilusGenerator<'_> { fn generate(&mut self, state: &mut S) -> Result { let nonterm = self.nonterminal("START"); let len = self.ctx.get_random_len_for_nt(&nonterm); diff --git a/libafl/src/inputs/bytessub.rs b/libafl/src/inputs/bytessub.rs index 5b60b27bf4..0dcd104a59 100644 --- a/libafl/src/inputs/bytessub.rs +++ b/libafl/src/inputs/bytessub.rs @@ -96,7 +96,7 @@ where } } -impl<'a, I> HasMutatorBytes for BytesSubInput<'a, I> +impl HasMutatorBytes for BytesSubInput<'_, I> where I: HasMutatorBytes, { @@ -192,7 +192,7 @@ where } } -impl<'a, I> HasLen for BytesSubInput<'a, I> +impl HasLen for BytesSubInput<'_, I> where I: HasMutatorBytes, { @@ -202,7 +202,7 @@ where } } -impl<'a, I> MappedInput for BytesSubInput<'a, I> { +impl MappedInput for BytesSubInput<'_, I> { type Type<'b> = BytesSubInput<'b, I> where diff --git a/libafl/src/inputs/mod.rs b/libafl/src/inputs/mod.rs index 43fc9f806d..c0a3a1bd6c 100644 --- a/libafl/src/inputs/mod.rs +++ b/libafl/src/inputs/mod.rs @@ -219,13 +219,13 @@ impl<'a> From<&'a mut Vec> for MutVecInput<'a> { } } -impl<'a> HasLen for MutVecInput<'a> { +impl HasLen for MutVecInput<'_> { fn len(&self) -> usize { self.0.len() } } -impl<'a> HasMutatorBytes for MutVecInput<'a> { +impl HasMutatorBytes for MutVecInput<'_> { fn bytes(&self) -> &[u8] { self.0 } @@ -258,7 +258,7 @@ impl<'a> HasMutatorBytes for MutVecInput<'a> { } } -impl<'a> MappedInput for MutVecInput<'a> { +impl MappedInput for MutVecInput<'_> { type Type<'b> = MutVecInput<'b> where diff --git a/libafl/src/inputs/nautilus.rs b/libafl/src/inputs/nautilus.rs index fef0156fcf..76fed4a4b0 100644 --- a/libafl/src/inputs/nautilus.rs +++ b/libafl/src/inputs/nautilus.rs @@ -127,7 +127,7 @@ impl<'a> NautilusToBytesInputConverter<'a> { } } -impl<'a> InputConverter for NautilusToBytesInputConverter<'a> { +impl InputConverter for NautilusToBytesInputConverter<'_> { type From = NautilusInput; type To = BytesInput; diff --git a/libafl/src/monitors/tui/ui.rs b/libafl/src/monitors/tui/ui.rs index a74014b8ad..e4c07c9116 100644 --- a/libafl/src/monitors/tui/ui.rs +++ b/libafl/src/monitors/tui/ui.rs @@ -116,7 +116,7 @@ impl TuiUi { } else { [Constraint::Percentage(50), Constraint::Percentage(50)].as_ref() }) - .split(f.size()); + .split(f.area()); let top_body = body[0]; let mid_body = body[1]; diff --git a/libafl/src/mutators/gramatron.rs b/libafl/src/mutators/gramatron.rs index cb74a975de..78681785f9 100644 --- a/libafl/src/mutators/gramatron.rs +++ b/libafl/src/mutators/gramatron.rs @@ -32,7 +32,7 @@ where generator: &'a GramatronGenerator<'a, S>, } -impl<'a, S> Mutator for GramatronRandomMutator<'a, S> +impl Mutator for GramatronRandomMutator<'_, S> where S: HasRand + HasMetadata, { @@ -58,7 +58,7 @@ where } } -impl<'a, S> Named for GramatronRandomMutator<'a, S> +impl Named for GramatronRandomMutator<'_, S> where S: HasRand + HasMetadata, { diff --git a/libafl/src/mutators/mutations.rs b/libafl/src/mutators/mutations.rs index ee226cc738..b06bdea786 100644 --- a/libafl/src/mutators/mutations.rs +++ b/libafl/src/mutators/mutations.rs @@ -1297,7 +1297,7 @@ trait IntoOptionBytes { Self: 'a; } -impl<'a> IntoOptionBytes for &'a [u8] { +impl IntoOptionBytes for &[u8] { type Type<'b> = &'b [u8]; fn into_option_bytes<'b>(self) -> Option<&'b [u8]> @@ -1308,7 +1308,7 @@ impl<'a> IntoOptionBytes for &'a [u8] { } } -impl<'a> IntoOptionBytes for Option<&'a [u8]> { +impl IntoOptionBytes for Option<&[u8]> { type Type<'b> = Option<&'b [u8]>; fn into_option_bytes<'b>(self) -> Option<&'b [u8]> diff --git a/libafl/src/observers/cmp.rs b/libafl/src/observers/cmp.rs index d030cfcafd..de83ac5b22 100644 --- a/libafl/src/observers/cmp.rs +++ b/libafl/src/observers/cmp.rs @@ -226,7 +226,7 @@ pub struct StdCmpObserver<'a, CM> { add_meta: bool, } -impl<'a, CM> CmpObserver for StdCmpObserver<'a, CM> +impl CmpObserver for StdCmpObserver<'_, CM> where CM: HasLen, { @@ -249,7 +249,7 @@ where } } -impl<'a, CM, I, S> Observer for StdCmpObserver<'a, CM> +impl Observer for StdCmpObserver<'_, CM> where CM: Serialize + CmpMap + HasLen, S: HasMetadata, @@ -270,7 +270,7 @@ where } } -impl<'a, CM> Named for StdCmpObserver<'a, CM> { +impl Named for StdCmpObserver<'_, CM> { fn name(&self) -> &Cow<'static, str> { &self.name } diff --git a/libafl/src/observers/concolic/observer.rs b/libafl/src/observers/concolic/observer.rs index 5689308a9a..8365cc014e 100644 --- a/libafl/src/observers/concolic/observer.rs +++ b/libafl/src/observers/concolic/observer.rs @@ -16,9 +16,9 @@ pub struct ConcolicObserver<'map> { name: Cow<'static, str>, } -impl<'map, I, S> Observer for ConcolicObserver<'map> {} +impl Observer for ConcolicObserver<'_> {} -impl<'map> ConcolicObserver<'map> { +impl ConcolicObserver<'_> { /// Create the concolic observer metadata for this run #[must_use] pub fn create_metadata_from_current_map(&self) -> ConcolicMetadata { @@ -28,7 +28,7 @@ impl<'map> ConcolicObserver<'map> { } } -impl<'map> Named for ConcolicObserver<'map> { +impl Named for ConcolicObserver<'_> { fn name(&self) -> &Cow<'static, str> { &self.name } diff --git a/libafl/src/observers/map/const_map.rs b/libafl/src/observers/map/const_map.rs index b89e603b0e..109f615864 100644 --- a/libafl/src/observers/map/const_map.rs +++ b/libafl/src/observers/map/const_map.rs @@ -26,7 +26,7 @@ pub struct ConstMapObserver<'a, T, const N: usize> { name: Cow<'static, str>, } -impl<'a, I, S, T, const N: usize> Observer for ConstMapObserver<'a, T, N> +impl Observer for ConstMapObserver<'_, T, N> where Self: MapObserver, { @@ -36,21 +36,21 @@ where } } -impl<'a, T, const N: usize> Named for ConstMapObserver<'a, T, N> { +impl Named for ConstMapObserver<'_, T, N> { #[inline] fn name(&self) -> &Cow<'static, str> { &self.name } } -impl<'a, T, const N: usize> HasLen for ConstMapObserver<'a, T, N> { +impl HasLen for ConstMapObserver<'_, T, N> { #[inline] fn len(&self) -> usize { N } } -impl<'a, T, const N: usize> Hash for ConstMapObserver<'a, T, N> +impl Hash for ConstMapObserver<'_, T, N> where T: Hash, { @@ -59,19 +59,19 @@ where self.map.as_slice().hash(hasher); } } -impl<'a, T, const N: usize> AsRef for ConstMapObserver<'a, T, N> { +impl AsRef for ConstMapObserver<'_, T, N> { fn as_ref(&self) -> &Self { self } } -impl<'a, T, const N: usize> AsMut for ConstMapObserver<'a, T, N> { +impl AsMut for ConstMapObserver<'_, T, N> { fn as_mut(&mut self) -> &mut Self { self } } -impl<'a, T, const N: usize> MapObserver for ConstMapObserver<'a, T, N> +impl MapObserver for ConstMapObserver<'_, T, N> where T: PartialEq + Copy + Hash + Serialize + DeserializeOwned + Debug + 'static, { @@ -147,14 +147,14 @@ where } } -impl<'a, T, const N: usize> Deref for ConstMapObserver<'a, T, N> { +impl Deref for ConstMapObserver<'_, T, N> { type Target = [T]; fn deref(&self) -> &[T] { &self.map } } -impl<'a, T, const N: usize> DerefMut for ConstMapObserver<'a, T, N> { +impl DerefMut for ConstMapObserver<'_, T, N> { fn deref_mut(&mut self) -> &mut [T] { &mut self.map } @@ -192,7 +192,7 @@ where } } -impl<'a, T, const N: usize> ConstMapObserver<'a, T, N> +impl ConstMapObserver<'_, T, N> where T: Default + Clone, { diff --git a/libafl/src/observers/map/mod.rs b/libafl/src/observers/map/mod.rs index 513f18062e..d6d21c7bc8 100644 --- a/libafl/src/observers/map/mod.rs +++ b/libafl/src/observers/map/mod.rs @@ -414,7 +414,7 @@ pub struct StdMapObserver<'a, T, const DIFFERENTIAL: bool> { name: Cow<'static, str>, } -impl<'a, I, S, T> Observer for StdMapObserver<'a, T, false> +impl Observer for StdMapObserver<'_, T, false> where Self: MapObserver, { @@ -424,23 +424,23 @@ where } } -impl<'a, I, S, T> Observer for StdMapObserver<'a, T, true> {} +impl Observer for StdMapObserver<'_, T, true> {} -impl<'a, T, const DIFFERENTIAL: bool> Named for StdMapObserver<'a, T, DIFFERENTIAL> { +impl Named for StdMapObserver<'_, T, DIFFERENTIAL> { #[inline] fn name(&self) -> &Cow<'static, str> { &self.name } } -impl<'a, T, const DIFFERENTIAL: bool> HasLen for StdMapObserver<'a, T, DIFFERENTIAL> { +impl HasLen for StdMapObserver<'_, T, DIFFERENTIAL> { #[inline] fn len(&self) -> usize { self.map.as_slice().len() } } -impl<'a, T, const DIFFERENTIAL: bool> Hash for StdMapObserver<'a, T, DIFFERENTIAL> +impl Hash for StdMapObserver<'_, T, DIFFERENTIAL> where T: Hash, { @@ -450,19 +450,19 @@ where } } -impl<'a, T, const DIFFERENTIAL: bool> AsRef for StdMapObserver<'a, T, DIFFERENTIAL> { +impl AsRef for StdMapObserver<'_, T, DIFFERENTIAL> { fn as_ref(&self) -> &Self { self } } -impl<'a, T, const DIFFERENTIAL: bool> AsMut for StdMapObserver<'a, T, DIFFERENTIAL> { +impl AsMut for StdMapObserver<'_, T, DIFFERENTIAL> { fn as_mut(&mut self) -> &mut Self { self } } -impl<'a, T, const DIFFERENTIAL: bool> MapObserver for StdMapObserver<'a, T, DIFFERENTIAL> +impl MapObserver for StdMapObserver<'_, T, DIFFERENTIAL> where T: PartialEq + Copy + Hash + Serialize + DeserializeOwned + Debug, { @@ -537,20 +537,20 @@ where } } -impl<'a, T, const DIFFERENTIAL: bool> Truncate for StdMapObserver<'a, T, DIFFERENTIAL> { +impl Truncate for StdMapObserver<'_, T, DIFFERENTIAL> { fn truncate(&mut self, new_len: usize) { self.map.truncate(new_len); } } -impl<'a, T, const DIFFERENTIAL: bool> Deref for StdMapObserver<'a, T, DIFFERENTIAL> { +impl Deref for StdMapObserver<'_, T, DIFFERENTIAL> { type Target = [T]; fn deref(&self) -> &[T] { &self.map } } -impl<'a, T, const DIFFERENTIAL: bool> DerefMut for StdMapObserver<'a, T, DIFFERENTIAL> { +impl DerefMut for StdMapObserver<'_, T, DIFFERENTIAL> { fn deref_mut(&mut self) -> &mut [T] { &mut self.map } @@ -755,4 +755,4 @@ where } } -impl<'a, OTA, OTB, I, S, T> DifferentialObserver for StdMapObserver<'a, T, true> {} +impl DifferentialObserver for StdMapObserver<'_, T, true> {} diff --git a/libafl/src/observers/map/multi_map.rs b/libafl/src/observers/map/multi_map.rs index a54085630b..7c0bf533b9 100644 --- a/libafl/src/observers/map/multi_map.rs +++ b/libafl/src/observers/map/multi_map.rs @@ -32,7 +32,7 @@ pub struct MultiMapObserver<'a, T, const DIFFERENTIAL: bool> { iter_idx: usize, } -impl<'a, I, S, T> Observer for MultiMapObserver<'a, T, false> +impl Observer for MultiMapObserver<'_, T, false> where Self: MapObserver, { @@ -42,25 +42,25 @@ where } } -impl<'a, I, S, T> Observer for MultiMapObserver<'a, T, true> { +impl Observer for MultiMapObserver<'_, T, true> { // in differential mode, we are *not* responsible for resetting the map! } -impl<'a, T, const DIFFERENTIAL: bool> Named for MultiMapObserver<'a, T, DIFFERENTIAL> { +impl Named for MultiMapObserver<'_, T, DIFFERENTIAL> { #[inline] fn name(&self) -> &Cow<'static, str> { &self.name } } -impl<'a, T, const DIFFERENTIAL: bool> HasLen for MultiMapObserver<'a, T, DIFFERENTIAL> { +impl HasLen for MultiMapObserver<'_, T, DIFFERENTIAL> { #[inline] fn len(&self) -> usize { self.len } } -impl<'a, T, const DIFFERENTIAL: bool> Hash for MultiMapObserver<'a, T, DIFFERENTIAL> +impl Hash for MultiMapObserver<'_, T, DIFFERENTIAL> where T: Hash, { @@ -73,19 +73,19 @@ where } } -impl<'a, T, const DIFFERENTIAL: bool> AsRef for MultiMapObserver<'a, T, DIFFERENTIAL> { +impl AsRef for MultiMapObserver<'_, T, DIFFERENTIAL> { fn as_ref(&self) -> &Self { self } } -impl<'a, T, const DIFFERENTIAL: bool> AsMut for MultiMapObserver<'a, T, DIFFERENTIAL> { +impl AsMut for MultiMapObserver<'_, T, DIFFERENTIAL> { fn as_mut(&mut self) -> &mut Self { self } } -impl<'a, T, const DIFFERENTIAL: bool> MapObserver for MultiMapObserver<'a, T, DIFFERENTIAL> +impl MapObserver for MultiMapObserver<'_, T, DIFFERENTIAL> where T: PartialEq + Copy + Hash + Serialize + DeserializeOwned + Debug, { @@ -267,4 +267,4 @@ where } } -impl<'a, OTA, OTB, I, S, T> DifferentialObserver for MultiMapObserver<'a, T, true> {} +impl DifferentialObserver for MultiMapObserver<'_, T, true> {} diff --git a/libafl/src/observers/map/variable_map.rs b/libafl/src/observers/map/variable_map.rs index 7f86003049..c94a1b54b7 100644 --- a/libafl/src/observers/map/variable_map.rs +++ b/libafl/src/observers/map/variable_map.rs @@ -29,7 +29,7 @@ pub struct VariableMapObserver<'a, T> { name: Cow<'static, str>, } -impl<'a, I, S, T> Observer for VariableMapObserver<'a, T> +impl Observer for VariableMapObserver<'_, T> where Self: MapObserver, { @@ -39,21 +39,21 @@ where } } -impl<'a, T> Named for VariableMapObserver<'a, T> { +impl Named for VariableMapObserver<'_, T> { #[inline] fn name(&self) -> &Cow<'static, str> { &self.name } } -impl<'a, T> HasLen for VariableMapObserver<'a, T> { +impl HasLen for VariableMapObserver<'_, T> { #[inline] fn len(&self) -> usize { *self.size.as_ref() } } -impl<'a, T> Hash for VariableMapObserver<'a, T> +impl Hash for VariableMapObserver<'_, T> where T: Hash, { @@ -63,19 +63,19 @@ where } } -impl<'a, T> AsRef for VariableMapObserver<'a, T> { +impl AsRef for VariableMapObserver<'_, T> { fn as_ref(&self) -> &Self { self } } -impl<'a, T> AsMut for VariableMapObserver<'a, T> { +impl AsMut for VariableMapObserver<'_, T> { fn as_mut(&mut self) -> &mut Self { self } } -impl<'a, T> MapObserver for VariableMapObserver<'a, T> +impl MapObserver for VariableMapObserver<'_, T> where T: PartialEq + Copy + Hash + Serialize + DeserializeOwned + Debug, { @@ -149,7 +149,7 @@ where } } -impl<'a, T> Deref for VariableMapObserver<'a, T> { +impl Deref for VariableMapObserver<'_, T> { type Target = [T]; fn deref(&self) -> &[T] { let cnt = *self.size.as_ref(); @@ -157,7 +157,7 @@ impl<'a, T> Deref for VariableMapObserver<'a, T> { } } -impl<'a, T> DerefMut for VariableMapObserver<'a, T> { +impl DerefMut for VariableMapObserver<'_, T> { fn deref_mut(&mut self) -> &mut [T] { let cnt = *self.size.as_ref(); &mut self.map[..cnt] diff --git a/libafl/src/observers/stacktrace.rs b/libafl/src/observers/stacktrace.rs index 9fb543fe95..9c6b13958e 100644 --- a/libafl/src/observers/stacktrace.rs +++ b/libafl/src/observers/stacktrace.rs @@ -188,7 +188,7 @@ impl<'a> BacktraceObserver<'a> { } } -impl<'a> ObserverWithHashField for BacktraceObserver<'a> { +impl ObserverWithHashField for BacktraceObserver<'_> { /// Gets the hash value of this observer. #[must_use] fn hash(&self) -> Option { @@ -196,7 +196,7 @@ impl<'a> ObserverWithHashField for BacktraceObserver<'a> { } } -impl<'a, I, S> Observer for BacktraceObserver<'a> { +impl Observer for BacktraceObserver<'_> { fn post_exec(&mut self, _state: &mut S, _input: &I, exit_kind: &ExitKind) -> Result<(), Error> { if self.harness_type == HarnessType::InProcess { if *exit_kind == ExitKind::Crash { @@ -218,7 +218,7 @@ impl<'a, I, S> Observer for BacktraceObserver<'a> { } } -impl<'a> Named for BacktraceObserver<'a> { +impl Named for BacktraceObserver<'_> { fn name(&self) -> &Cow<'static, str> { &self.observer_name } diff --git a/libafl/src/observers/value.rs b/libafl/src/observers/value.rs index 8c4e30458f..eb4df41c08 100644 --- a/libafl/src/observers/value.rs +++ b/libafl/src/observers/value.rs @@ -66,15 +66,15 @@ impl<'a, T> ValueObserver<'a, T> { } /// This *does not* reset the value inside the observer. -impl<'a, I, S, T> Observer for ValueObserver<'a, T> {} +impl Observer for ValueObserver<'_, T> {} -impl<'a, T> Named for ValueObserver<'a, T> { +impl Named for ValueObserver<'_, T> { fn name(&self) -> &Cow<'static, str> { &self.name } } -impl<'a, T: Hash> ObserverWithHashField for ValueObserver<'a, T> { +impl ObserverWithHashField for ValueObserver<'_, T> { fn hash(&self) -> Option { Some(RandomState::with_seeds(1, 2, 3, 4).hash_one(self.value.as_ref())) } @@ -141,15 +141,15 @@ impl<'a, T> RefCellValueObserver<'a, T> { } /// This *does not* reset the value inside the observer. -impl<'a, I, S, T> Observer for RefCellValueObserver<'a, T> {} +impl Observer for RefCellValueObserver<'_, T> {} -impl<'a, T> Named for RefCellValueObserver<'a, T> { +impl Named for RefCellValueObserver<'_, T> { fn name(&self) -> &Cow<'static, str> { &self.name } } -impl<'a, T> ObserverWithHashField for RefCellValueObserver<'a, T> +impl ObserverWithHashField for RefCellValueObserver<'_, T> where T: Hash, { @@ -248,7 +248,7 @@ impl<'it, T: 'it> Iterator for RefCellValueObserverIterMut<'it, T> { } } -impl<'a, A: Hash> Hash for RefCellValueObserver<'a, A> { +impl Hash for RefCellValueObserver<'_, A> { /// Panics if the contained value is already mutably borrowed (calls /// [`RefCell::borrow`]). #[inline] diff --git a/libafl/src/schedulers/accounting.rs b/libafl/src/schedulers/accounting.rs index 5761dd2102..ad75cca600 100644 --- a/libafl/src/schedulers/accounting.rs +++ b/libafl/src/schedulers/accounting.rs @@ -110,8 +110,7 @@ pub struct CoverageAccountingScheduler<'a, CS, O> { inner: IndexesLenTimeMinimizerScheduler, } -impl<'a, CS, O, S> Scheduler<::Input, S> - for CoverageAccountingScheduler<'a, CS, O> +impl Scheduler<::Input, S> for CoverageAccountingScheduler<'_, CS, O> where CS: Scheduler<::Input, S>, S: HasCorpus + HasMetadata + HasRand, diff --git a/libafl/src/state/mod.rs b/libafl/src/state/mod.rs index 8eb4c87dc0..e38dfc580c 100644 --- a/libafl/src/state/mod.rs +++ b/libafl/src/state/mod.rs @@ -235,7 +235,7 @@ pub struct LoadConfig<'a, I, S, Z> { } #[cfg(feature = "std")] -impl<'a, I, S, Z> Debug for LoadConfig<'a, I, S, Z> { +impl Debug for LoadConfig<'_, I, S, Z> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "LoadConfig {{}}") } diff --git a/libafl_bolts/Cargo.toml b/libafl_bolts/Cargo.toml index dcfaa9598c..4bb43e88ee 100644 --- a/libafl_bolts/Cargo.toml +++ b/libafl_bolts/Cargo.toml @@ -120,66 +120,63 @@ llmp_debug = ["alloc", "std"] llmp_small_maps = ["alloc"] [build-dependencies] -rustversion = "1.0" +rustversion = { workspace = true } [dependencies] libafl_derive = { version = "0.13.2", optional = true, path = "../libafl_derive" } static_assertions = "1.1.0" tuple_list = { version = "0.1.3" } -hashbrown = { version = "0.14", features = [ +hashbrown = { workspace = true, features = [ "serde", "ahash", ], default-features = false, optional = true } # A faster hashmap, nostd compatible -xxhash-rust = { version = "0.8.5", features = [ +xxhash-rust = { version = "0.8.12", features = [ "xxh3", ], optional = true } # xxh3 hashing for rust -serde = { version = "1.0", default-features = false, features = [ +serde = { workspace = true, default-features = false, features = [ "derive", ] } # serialization lib erased-serde = { version = "0.4.5", default-features = false, optional = true } # erased serde -postcard = { version = "1.0", features = [ - "alloc", -], default-features = false, optional = true } # no_std compatible serde serialization format -num_enum = { version = "0.7", default-features = false } -ahash = { version = "0.8", default-features = false, optional = true } # The hash function already used in hashbrown -backtrace = { version = "0.3", optional = true } # Used to get the stacktrace in StacktraceObserver +postcard = { workspace = true, optional = true } # no_std compatible serde serialization format +num_enum = { workspace = true, default-features = false } +ahash = { workspace = true, optional = true } # The hash function already used in hashbrown +backtrace = { workspace = true, default-features = true, optional = true } # Used to get the stacktrace in StacktraceObserver -ctor = { optional = true, version = "0.2" } -serde_json = { version = "1.0", optional = true, default-features = false, features = [ +ctor = { optional = true, version = "0.2.8" } +serde_json = { workspace = true, optional = true, default-features = false, features = [ "alloc", ] } -miniz_oxide = { version = "0.7.1", optional = true } -hostname = { version = "0.4", optional = true } # Is there really no gethostname in the stdlib? -rand_core = { version = "0.6", optional = true } -nix = { version = "0.29", default-features = false, optional = true, features = [ +miniz_oxide = { version = "0.8.0", optional = true } +hostname = { version = "0.4.0", optional = true } # Is there really no gethostname in the stdlib? +rand_core = { version = "0.6.4", optional = true } +nix = { workspace = true, optional = true, default-features = false, features = [ "signal", "socket", "poll", ] } -uuid = { version = "1.4", optional = true, features = ["serde", "v4"] } -clap = { version = "4.5", features = [ +uuid = { workspace = true, optional = true, features = ["serde", "v4"] } +clap = { workspace = true, features = [ "derive", "wrap_help", ], optional = true } # CLI parsing, for libafl_bolts::cli / the `cli` feature -log = { version = "0.4" } - -pyo3 = { version = "0.22", optional = true, features = ["serde", "macros"] } +log = { workspace = true } +pyo3 = { workspace = true, optional = true, features = ["serde", "macros"] } # optional-dev deps (change when target.'cfg(accessible(::std))'.test-dependencies will be stable) -serial_test = { version = "3", optional = true, default-features = false, features = [ +serial_test = { workspace = true, optional = true, default-features = false, features = [ "logging", ] } # Document all features of this crate (for `cargo doc`) -document-features = { version = "0.2", optional = true } +document-features = { workspace = true, optional = true } [target.'cfg(unix)'.dependencies] -libc = "0.2" # For (*nix) libc -uds = { version = "0.4", optional = true, default-features = false } +libc = { workspace = true } # For (*nix) libc +uds = { version = "0.4.2", optional = true, default-features = false } [target.'cfg(windows)'.dependencies] -windows = { version = "0.51.1", features = [ +windows = { workspace = true, features = [ "Win32_Foundation", "Win32_System_Threading", "Win32_System_Diagnostics_Debug", @@ -189,9 +186,10 @@ windows = { version = "0.51.1", features = [ "Win32_System_SystemInformation", "Win32_System_Console", ] } +windows-result = "0.2.0" [target.'cfg(windows)'.build-dependencies] -windows = "0.51.1" +windows = { workspace = true } [target.'cfg(target_vendor = "apple")'.dependencies] mach = "0.3.2" diff --git a/libafl_bolts/src/lib.rs b/libafl_bolts/src/lib.rs index 0f25b0976c..d7874a7c98 100644 --- a/libafl_bolts/src/lib.rs +++ b/libafl_bolts/src/lib.rs @@ -238,14 +238,15 @@ pub type ErrorBacktrace = backtrace::Backtrace; #[cfg(not(feature = "errors_backtrace"))] #[derive(Debug, Default)] -/// Empty struct to use when `errors_backtrace` is disabled -pub struct ErrorBacktrace {} +/// ZST to use when `errors_backtrace` is disabled +pub struct ErrorBacktrace; + #[cfg(not(feature = "errors_backtrace"))] impl ErrorBacktrace { /// Nop #[must_use] pub fn new() -> Self { - Self {} + Self } } @@ -632,9 +633,9 @@ impl From for Error { } #[cfg(windows)] -impl From for Error { +impl From for Error { #[allow(unused_variables)] - fn from(err: windows::core::Error) -> Self { + fn from(err: windows_result::Error) -> Self { Self::unknown(format!("Windows API error: {err:?}")) } } diff --git a/libafl_bolts/src/minibsod.rs b/libafl_bolts/src/minibsod.rs index de550d3fe3..0b02710f81 100644 --- a/libafl_bolts/src/minibsod.rs +++ b/libafl_bolts/src/minibsod.rs @@ -1176,11 +1176,12 @@ mod tests { use std::{ io::{stdout, BufWriter}, + os::raw::c_void, sync::mpsc, }; use windows::Win32::{ - Foundation::{CloseHandle, DuplicateHandle, DUPLICATE_SAME_ACCESS}, + Foundation::{CloseHandle, DuplicateHandle, DUPLICATE_SAME_ACCESS, HANDLE}, System::{ Diagnostics::Debug::{ GetThreadContext, CONTEXT, CONTEXT_FULL_AMD64, CONTEXT_FULL_ARM64, CONTEXT_FULL_X86, @@ -1191,6 +1192,12 @@ mod tests { use crate::minibsod::dump_registers; + #[derive(Default)] + #[repr(align(16))] + struct Align16 { + pub ctx: CONTEXT, + } + #[test] #[cfg_attr(miri, ignore)] fn test_dump_registers() { @@ -1199,7 +1206,7 @@ mod tests { let t = std::thread::spawn(move || { let cur = unsafe { GetCurrentThread() }; let proc = unsafe { GetCurrentProcess() }; - let mut out = Default::default(); + let mut out = HANDLE::default(); unsafe { DuplicateHandle( proc, @@ -1210,22 +1217,17 @@ mod tests { true, DUPLICATE_SAME_ACCESS, ) - .unwrap() + .unwrap(); }; - tx.send(out).unwrap(); + tx.send(out.0 as i64).unwrap(); evt_rx.recv().unwrap(); }); let thread = rx.recv().unwrap(); - eprintln!("thread: {:?}", thread); + let thread = HANDLE(thread as *mut c_void); + eprintln!("thread: {thread:?}"); unsafe { SuspendThread(thread) }; - #[derive(Default)] - #[repr(align(16))] - struct Align16 { - pub ctx: CONTEXT, - } - // https://stackoverflow.com/questions/56516445/getting-0x3e6-when-calling-getthreadcontext-for-debugged-thread let mut c = Align16::default(); if cfg!(target_arch = "x86") { diff --git a/libafl_bolts/src/os/windows_exceptions.rs b/libafl_bolts/src/os/windows_exceptions.rs index e187b91413..d9d803f863 100644 --- a/libafl_bolts/src/os/windows_exceptions.rs +++ b/libafl_bolts/src/os/windows_exceptions.rs @@ -463,31 +463,28 @@ unsafe fn internal_handle_exception( .iter() .position(|x| *x == exception_code) .unwrap(); - match &EXCEPTION_HANDLERS[index] { - Some(handler_holder) => { - log::info!( - "{:?}: Handling exception {}", - std::process::id(), - exception_code - ); - let handler = &mut **handler_holder.handler.get(); - handler.handle(exception_code, exception_pointers); - EXCEPTION_CONTINUE_EXECUTION - } - None => { - log::info!( - "{:?}: No handler for exception {}", - std::process::id(), - exception_code - ); - // Go to Default one - let handler_holder = &EXCEPTION_HANDLERS[EXCEPTION_HANDLERS_SIZE - 1] - .as_ref() - .unwrap(); - let handler = &mut **handler_holder.handler.get(); - handler.handle(exception_code, exception_pointers); - EXCEPTION_CONTINUE_SEARCH - } + if let Some(handler_holder) = &EXCEPTION_HANDLERS[index] { + log::info!( + "{:?}: Handling exception {}", + std::process::id(), + exception_code + ); + let handler = &mut **handler_holder.handler.get(); + handler.handle(exception_code, exception_pointers); + EXCEPTION_CONTINUE_EXECUTION + } else { + log::info!( + "{:?}: No handler for exception {}", + std::process::id(), + exception_code + ); + // Go to Default one + let handler_holder = &EXCEPTION_HANDLERS[EXCEPTION_HANDLERS_SIZE - 1] + .as_ref() + .unwrap(); + let handler = &mut **handler_holder.handler.get(); + handler.handle(exception_code, exception_pointers); + EXCEPTION_CONTINUE_SEARCH } } diff --git a/libafl_bolts/src/ownedref.rs b/libafl_bolts/src/ownedref.rs index b609439eda..ecd1cc99f9 100644 --- a/libafl_bolts/src/ownedref.rs +++ b/libafl_bolts/src/ownedref.rs @@ -39,13 +39,13 @@ impl UnsafeMarker { } } -impl<'a, T> Truncate for &'a [T] { +impl Truncate for &[T] { fn truncate(&mut self, len: usize) { *self = &self[..len]; } } -impl<'a, T> Truncate for &'a mut [T] { +impl Truncate for &mut [T] { fn truncate(&mut self, len: usize) { let mut value = core::mem::take(self); value = unsafe { value.get_unchecked_mut(..len) }; @@ -68,7 +68,7 @@ where } /// Special case, &\[u8] is a fat pointer containing the size implicitly. -impl<'a> Clone for OwnedRef<'a, [u8]> { +impl Clone for OwnedRef<'_, [u8]> { fn clone(&self) -> Self { match self { Self::RefRaw(_, _) => panic!("Cannot clone"), @@ -124,7 +124,7 @@ where } } -impl<'a, T> OwnedRef<'a, T> +impl OwnedRef<'_, T> where T: Sized + 'static, { @@ -175,7 +175,7 @@ where } } -impl<'a> AsRef<[u8]> for OwnedRef<'a, [u8]> { +impl AsRef<[u8]> for OwnedRef<'_, [u8]> { #[must_use] fn as_ref(&self) -> &[u8] { match self { @@ -186,7 +186,7 @@ impl<'a> AsRef<[u8]> for OwnedRef<'a, [u8]> { } } -impl<'a, T> AsRef for OwnedRef<'a, T> +impl AsRef for OwnedRef<'_, T> where T: Sized, { @@ -200,7 +200,7 @@ where } } -impl<'a, T> IntoOwned for OwnedRef<'a, T> +impl IntoOwned for OwnedRef<'_, T> where T: Sized + Clone, { @@ -259,7 +259,7 @@ where } } -impl<'a, T> OwnedRefMut<'a, T> +impl OwnedRefMut<'_, T> where T: Sized + 'static, { @@ -306,7 +306,7 @@ where } } -impl<'a, T: ?Sized> AsRef for OwnedRefMut<'a, T> { +impl AsRef for OwnedRefMut<'_, T> { #[must_use] fn as_ref(&self) -> &T { match self { @@ -317,7 +317,7 @@ impl<'a, T: ?Sized> AsRef for OwnedRefMut<'a, T> { } } -impl<'a, T: ?Sized> AsMut for OwnedRefMut<'a, T> { +impl AsMut for OwnedRefMut<'_, T> { #[must_use] fn as_mut(&mut self) -> &mut T { match self { @@ -328,7 +328,7 @@ impl<'a, T: ?Sized> AsMut for OwnedRefMut<'a, T> { } } -impl<'a, T> IntoOwned for OwnedRefMut<'a, T> +impl IntoOwned for OwnedRefMut<'_, T> where T: Sized + Clone, { @@ -471,7 +471,7 @@ impl<'a, T> OwnedSlice<'a, T> { } } -impl<'a, 'it, T> IntoIterator for &'it OwnedSlice<'a, T> { +impl<'it, T> IntoIterator for &'it OwnedSlice<'_, T> { type Item = as Iterator>::Item; type IntoIter = Iter<'it, T>; @@ -481,7 +481,7 @@ impl<'a, 'it, T> IntoIterator for &'it OwnedSlice<'a, T> { } /// Create a new [`OwnedSlice`] from a vector -impl<'a, T> From> for OwnedSlice<'a, T> { +impl From> for OwnedSlice<'_, T> { fn from(vec: Vec) -> Self { Self { inner: OwnedSliceInner::Owned(vec), @@ -522,7 +522,7 @@ impl<'a, T> From> for OwnedSlice<'a, T> { } } -impl<'a, T: Sized> Deref for OwnedSlice<'a, T> { +impl Deref for OwnedSlice<'_, T> { type Target = [T]; fn deref(&self) -> &Self::Target { @@ -534,7 +534,7 @@ impl<'a, T: Sized> Deref for OwnedSlice<'a, T> { } } -impl<'a, T> IntoOwned for OwnedSlice<'a, T> +impl IntoOwned for OwnedSlice<'_, T> where T: Sized + Clone, { @@ -623,7 +623,7 @@ pub struct OwnedMutSlice<'a, T: 'a + Sized> { inner: OwnedMutSliceInner<'a, T>, } -impl<'a, 'it, T> IntoIterator for &'it mut OwnedMutSlice<'a, T> { +impl<'it, T> IntoIterator for &'it mut OwnedMutSlice<'_, T> { type Item = as Iterator>::Item; type IntoIter = IterMut<'it, T>; @@ -632,7 +632,7 @@ impl<'a, 'it, T> IntoIterator for &'it mut OwnedMutSlice<'a, T> { } } -impl<'a, 'it, T> IntoIterator for &'it OwnedMutSlice<'a, T> { +impl<'it, T> IntoIterator for &'it OwnedMutSlice<'_, T> { type Item = as Iterator>::Item; type IntoIter = Iter<'it, T>; @@ -705,7 +705,7 @@ impl<'a, T: 'a + Sized> OwnedMutSlice<'a, T> { } } -impl<'a, T: Sized> Deref for OwnedMutSlice<'a, T> { +impl Deref for OwnedMutSlice<'_, T> { type Target = [T]; fn deref(&self) -> &Self::Target { @@ -717,7 +717,7 @@ impl<'a, T: Sized> Deref for OwnedMutSlice<'a, T> { } } -impl<'a, T: Sized> DerefMut for OwnedMutSlice<'a, T> { +impl DerefMut for OwnedMutSlice<'_, T> { fn deref_mut(&mut self) -> &mut [T] { match &mut self.inner { OwnedMutSliceInner::RefRaw(rr, len, _) => unsafe { @@ -729,7 +729,7 @@ impl<'a, T: Sized> DerefMut for OwnedMutSlice<'a, T> { } } -impl<'a, T> IntoOwned for OwnedMutSlice<'a, T> +impl IntoOwned for OwnedMutSlice<'_, T> where T: Sized + Clone, { @@ -765,7 +765,7 @@ impl<'a, T: 'a + Clone> Clone for OwnedMutSlice<'a, T> { } /// Create a new [`OwnedMutSlice`] from a vector -impl<'a, T> From> for OwnedMutSlice<'a, T> { +impl From> for OwnedMutSlice<'_, T> { fn from(vec: Vec) -> Self { Self { inner: OwnedMutSliceInner::Owned(vec), diff --git a/libafl_bolts/src/shmem.rs b/libafl_bolts/src/shmem.rs index 5e968b47e6..152cba04e3 100644 --- a/libafl_bolts/src/shmem.rs +++ b/libafl_bolts/src/shmem.rs @@ -1358,7 +1358,7 @@ pub mod win32_shmem { Error, }; - const INVALID_HANDLE_VALUE: isize = -1; + const INVALID_HANDLE_VALUE: *mut c_void = -1isize as *mut c_void; /// The default [`ShMem`] impl for Windows using `shmctl` & `shmget` #[derive(Clone)] diff --git a/libafl_bolts/src/subrange.rs b/libafl_bolts/src/subrange.rs index cb994e025b..742ed0e7a6 100644 --- a/libafl_bolts/src/subrange.rs +++ b/libafl_bolts/src/subrange.rs @@ -96,14 +96,14 @@ impl<'a, T> From<&'a [T]> for SliceReader<'a, T> { } } -impl<'a, T> HasLen for SubRangeSlice<'a, T> { +impl HasLen for SubRangeSlice<'_, T> { #[inline] fn len(&self) -> usize { self.range.len() } } -impl<'a, T> HasLen for SubRangeMutSlice<'a, T> { +impl HasLen for SubRangeMutSlice<'_, T> { #[inline] fn len(&self) -> usize { self.range.len() diff --git a/libafl_bolts/src/tuples.rs b/libafl_bolts/src/tuples.rs index 8e9437ea01..aa80c77f60 100644 --- a/libafl_bolts/src/tuples.rs +++ b/libafl_bolts/src/tuples.rs @@ -33,7 +33,7 @@ pub fn type_eq() -> bool { struct W<'a, T: ?Sized, U: ?Sized>(&'a Cell, PhantomData (&'a T, &'a U)>); // default implementation: if the types are unequal, we will use the clone implementation - impl<'a, T: ?Sized, U: ?Sized> Clone for W<'a, T, U> { + impl Clone for W<'_, T, U> { #[inline] fn clone(&self) -> Self { // indicate that the types are unequal @@ -46,7 +46,7 @@ pub fn type_eq() -> bool { // specialized implementation: Copy is only implemented if the types are the same #[allow(clippy::mismatching_type_param_order)] - impl<'a, T: ?Sized> Copy for W<'a, T, T> {} + impl Copy for W<'_, T, T> {} let detected = Cell::new(true); // [].clone() is *specialized* in core. diff --git a/libafl_cc/Cargo.toml b/libafl_cc/Cargo.toml index 1342ce6c7a..46c8b466b1 100644 --- a/libafl_cc/Cargo.toml +++ b/libafl_cc/Cargo.toml @@ -44,14 +44,14 @@ dump-cfg = [] profiling = [] [build-dependencies] -cc = { version = "1.0", features = ["parallel"] } -which = "6.0" +cc = { workspace = true, features = ["parallel"] } +which = { workspace = true } [target.'cfg(target_vendor = "apple")'.build-dependencies] -glob = "0.3" +glob = "0.3.1" [dependencies] -serde = { version = "1.0", default-features = false, features = [ +serde = { workspace = true, default-features = false, features = [ "alloc", "derive", ] } # serialization lib diff --git a/libafl_concolic/symcc_libafl/Cargo.toml b/libafl_concolic/symcc_libafl/Cargo.toml index fd3a2b29a1..76d06a6cc0 100644 --- a/libafl_concolic/symcc_libafl/Cargo.toml +++ b/libafl_concolic/symcc_libafl/Cargo.toml @@ -34,6 +34,6 @@ build = ["which", "cmake"] clone = ["which"] [dependencies] -which = { version = "6.0", optional = true } -cmake = { version = "0.1", optional = true } -log = "0.4.20" +which = { version = "6.0.3", optional = true } +cmake = { version = "0.1.51", optional = true } +log = "0.4.22" diff --git a/libafl_concolic/symcc_runtime/Cargo.toml b/libafl_concolic/symcc_runtime/Cargo.toml index 506eb1b0b8..eff1a2d1ea 100644 --- a/libafl_concolic/symcc_runtime/Cargo.toml +++ b/libafl_concolic/symcc_runtime/Cargo.toml @@ -32,9 +32,9 @@ all-features = true no-cpp-runtime = [] [dependencies] -unchecked_unwrap = "4" -ctor = "0.2" -libc = "0.2" +unchecked_unwrap = "4.0.0" +ctor = "0.2.8" +libc = "0.2.159" libafl = { path = "../../libafl", version = "0.13.2", default-features = false, features = [ "std", "serdeany_autoreg", @@ -45,8 +45,8 @@ libafl_bolts = { path = "../../libafl_bolts", version = "0.13.2", default-featur ] } [build-dependencies] -cmake = "0.1" -bindgen = "0.69.4" -regex = "1" -which = "6.0" +cmake = "0.1.51" +bindgen = "0.70.1" +regex = "1.10.6" +which = "6.0.3" symcc_libafl = { path = "../symcc_libafl", version = "0.13.2" } diff --git a/libafl_concolic/test/dump_constraints/Cargo.toml b/libafl_concolic/test/dump_constraints/Cargo.toml index 5182729d39..7f0a8ef5b2 100644 --- a/libafl_concolic/test/dump_constraints/Cargo.toml +++ b/libafl_concolic/test/dump_constraints/Cargo.toml @@ -22,4 +22,4 @@ categories = [ [dependencies] libafl = { path = "../../../libafl" } libafl_bolts = { path = "../../../libafl_bolts" } -clap = { version = "4.5", features = ["derive"] } +clap = { version = "4.5.18", features = ["derive"] } diff --git a/libafl_derive/Cargo.toml b/libafl_derive/Cargo.toml index 49d9fb6310..15b962ec16 100644 --- a/libafl_derive/Cargo.toml +++ b/libafl_derive/Cargo.toml @@ -21,6 +21,6 @@ categories = [ proc-macro = true [dependencies] -syn = { version = "2", features = ["full", "extra-traits"] } -quote = "1" -proc-macro2 = "1.0" +syn = { version = "2.0.77", features = ["full", "extra-traits"] } +quote = "1.0.37" +proc-macro2 = "1.0.86" diff --git a/libafl_frida/Cargo.toml b/libafl_frida/Cargo.toml index 582f77829a..9a60f7a6f2 100644 --- a/libafl_frida/Cargo.toml +++ b/libafl_frida/Cargo.toml @@ -44,14 +44,14 @@ track_hit_feedbacks = ["libafl/track_hit_feedbacks"] auto-download = ["frida-gum-sys/auto-download", "frida-gum/auto-download"] [build-dependencies] -cc = { version = "1.0", features = ["parallel"] } +cc = { workspace = true, features = ["parallel"] } [target.'cfg(target_arch = "aarch64")'.dependencies] -yaxpeax-arm = "0.2.4" +yaxpeax-arm = "0.3.0" [target.'cfg(target_arch = "x86_64")'.dependencies] -yaxpeax-x86 = "1.2.2" -iced-x86 = { version = "1.20.0", features = ["code_asm"], optional = true } +yaxpeax-x86 = "2.0.0" +iced-x86 = { version = "1.21.0", features = ["code_asm"], optional = true } [dependencies] libafl = { path = "../libafl", default-features = false, version = "0.13.2", features = [ @@ -69,49 +69,49 @@ libafl_targets = { path = "../libafl_targets", version = "0.13.2", features = [ "sancov_cmplog", ] } -nix = { version = "0.29", features = ["mman"] } -libc = "0.2" -hashbrown = "0.14" -rangemap = "1.3" -frida-gum-sys = { version = "0.13.6", features = [ +nix = { workspace = true, default-features = true, features = ["mman"] } +libc = { workspace = true } +hashbrown = { workspace = true, default-features = true } +rangemap = { workspace = true } +frida-gum-sys = { version = "0.13.7", features = [ "event-sink", "invocation-listener", ] } -frida-gum = { version = "0.13.6", features = [ +frida-gum = { version = "0.13.7", features = [ "event-sink", "invocation-listener", "module-names", ] } -dynasmrt = "2" +dynasmrt = "2.0.0" -color-backtrace = { version = "0.6", features = ["resolve-modules"] } -termcolor = "1.1.3" -serde = "1.0" -backtrace = { version = "0.3", default-features = false, features = [ +color-backtrace = { version = "0.6.1", features = ["resolve-modules"] } +termcolor = "1.4.1" +serde = { workspace = true, default-features = true } +backtrace = { workspace = true, default-features = false, features = [ "std", "serde", ] } -num-traits = "0.2" -ahash = "0.8" -paste = "1.0" -log = "0.4.20" -mmap-rs = "0.6.0" +num-traits = { workspace = true, default-features = true } +ahash = { workspace = true, default-features = true } +paste = { workspace = true } +log = { workspace = true } +mmap-rs = "0.6.1" bit_reverse = "0.1.8" -yaxpeax-arch = "0.2.7" +yaxpeax-arch = "0.3.2" -document-features = { version = "0.2", optional = true } # Document all features of this crate (for `cargo doc`) +document-features = { workspace = true, optional = true } # Document all features of this crate (for `cargo doc`) [target.'cfg(windows)'.dependencies] -winsafe = { version = "0.0.21", features = ["kernel"] } +winsafe = { version = "0.0.22", features = ["kernel"] } [target.'cfg(target_vendor="apple")'.dependencies] mach-sys = { version = "0.5.4" } [dev-dependencies] -serial_test = { version = "3", default-features = false, features = [ +serial_test = { workspace = true, default-features = false, features = [ "logging", ] } -clap = { version = "4.5", features = ["derive"] } -libloading = "0.8" -mimalloc = { version = "0.1", default-features = false } +clap = { workspace = true, features = ["derive"] } +libloading = "0.8.5" +mimalloc = { workspace = true, default-features = false } dlmalloc = { version = "0.2.6", features = ["global"] } diff --git a/libafl_frida/src/executor.rs b/libafl_frida/src/executor.rs index e539fe4d7b..474d641e8b 100644 --- a/libafl_frida/src/executor.rs +++ b/libafl_frida/src/executor.rs @@ -48,7 +48,7 @@ where _phantom: PhantomData<&'b u8>, } -impl<'a, 'b, 'c, H, OT, RT, S> Debug for FridaInProcessExecutor<'a, 'b, 'c, H, OT, RT, S> +impl Debug for FridaInProcessExecutor<'_, '_, '_, H, OT, RT, S> where H: FnMut(&S::Input) -> ExitKind, S: State, @@ -64,8 +64,7 @@ where } } -impl<'a, 'b, 'c, EM, H, OT, RT, S, Z> Executor - for FridaInProcessExecutor<'a, 'b, 'c, H, OT, RT, S> +impl Executor for FridaInProcessExecutor<'_, '_, '_, H, OT, RT, S> where EM: UsesState, H: FnMut(&S::Input) -> ExitKind, @@ -121,7 +120,7 @@ where } } -impl<'a, 'b, 'c, H, OT, RT, S> UsesState for FridaInProcessExecutor<'a, 'b, 'c, H, OT, RT, S> +impl UsesState for FridaInProcessExecutor<'_, '_, '_, H, OT, RT, S> where H: FnMut(&S::Input) -> ExitKind, OT: ObserversTuple, @@ -131,7 +130,7 @@ where type State = S; } -impl<'a, 'b, 'c, H, OT, RT, S> HasObservers for FridaInProcessExecutor<'a, 'b, 'c, H, OT, RT, S> +impl HasObservers for FridaInProcessExecutor<'_, '_, '_, H, OT, RT, S> where H: FnMut(&S::Input) -> ExitKind, S::Input: HasTargetBytes, diff --git a/libafl_frida/src/helper.rs b/libafl_frida/src/helper.rs index 6d82732745..51450bb957 100644 --- a/libafl_frida/src/helper.rs +++ b/libafl_frida/src/helper.rs @@ -404,7 +404,7 @@ where }) } -impl<'a> FridaInstrumentationHelper<'a, ()> { +impl FridaInstrumentationHelper<'_, ()> { /// Create a builder to initialize a [`FridaInstrumentationHelper`]. /// /// See the documentation of [`FridaInstrumentationHelperBuilder`] diff --git a/libafl_frida/src/utils.rs b/libafl_frida/src/utils.rs index 49c259e74d..81e536bb0e 100644 --- a/libafl_frida/src/utils.rs +++ b/libafl_frida/src/utils.rs @@ -228,38 +228,33 @@ pub(crate) fn frida_to_cs( /// Get the `base`, `idx`, `scale`, `disp` for each operand pub fn operand_details(operand: &Operand) -> Option<(X86Register, X86Register, u8, i32)> { match operand { - Operand::RegDeref(base) => { + Operand::MemDeref { base } => { let base = writer_register(*base); Some((base, X86Register::None, 0, 0)) } - Operand::RegDisp(base, disp) => { + Operand::Disp { base, disp } => { let base = writer_register(*base); Some((base, X86Register::None, 0, *disp)) } - Operand::RegScale(base, scale) => { - let base = writer_register(*base); - Some((base, X86Register::None, *scale, 0)) - } - Operand::RegIndexBase(base, index) => { - let base = writer_register(*base); + Operand::MemIndexScale { index, scale } => { let index = writer_register(*index); - Some((base, index, 0, 0)) + Some((X86Register::None, index, *scale, 0)) } - Operand::RegIndexBaseDisp(base, index, disp) => { - let base = writer_register(*base); + Operand::MemIndexScaleDisp { index, scale, disp } => { let index = writer_register(*index); - Some((base, index, 0, *disp)) + Some((X86Register::None, index, *scale, *disp)) } - Operand::RegScaleDisp(base, scale, disp) => { - let base = writer_register(*base); - Some((base, X86Register::None, *scale, *disp)) - } - Operand::RegIndexBaseScale(base, index, scale) => { + Operand::MemBaseIndexScale { base, index, scale } => { let base = writer_register(*base); let index = writer_register(*index); Some((base, index, *scale, 0)) } - Operand::RegIndexBaseScaleDisp(base, index, scale, disp) => { + Operand::MemBaseIndexScaleDisp { + base, + index, + scale, + disp, + } => { let base = writer_register(*base); let index = writer_register(*index); Some((base, index, *scale, *disp)) @@ -272,15 +267,15 @@ pub fn operand_details(operand: &Operand) -> Option<(X86Register, X86Register, u /// Get the immediate value of the operand pub fn immediate_value(operand: &Operand) -> Option { match operand { - Operand::ImmediateI8(v) => Some(i64::from(*v)), - Operand::ImmediateU8(v) => Some(i64::from(*v)), - Operand::ImmediateI16(v) => Some(i64::from(*v)), - Operand::ImmediateI32(v) => Some(i64::from(*v)), - Operand::ImmediateU16(v) => Some(i64::from(*v)), - Operand::ImmediateU32(v) => Some(i64::from(*v)), - Operand::ImmediateI64(v) => Some(*v), + Operand::ImmediateI8 { imm } => Some(i64::from(*imm)), + Operand::ImmediateU8 { imm } => Some(i64::from(*imm)), + Operand::ImmediateI16 { imm } => Some(i64::from(*imm)), + Operand::ImmediateU16 { imm } => Some(i64::from(*imm)), + Operand::ImmediateI32 { imm } => Some(i64::from(*imm)), + Operand::ImmediateU32 { imm } => Some(i64::from(*imm)), + Operand::ImmediateI64 { imm } => Some(*imm), #[allow(clippy::cast_possible_wrap)] - Operand::ImmediateU64(v) => Some(*v as i64), + Operand::ImmediateU64 { imm } => Some(*imm as i64), _ => None, } } diff --git a/libafl_libfuzzer/Cargo.toml b/libafl_libfuzzer/Cargo.toml index f0820eb4f1..29cb77b72a 100644 --- a/libafl_libfuzzer/Cargo.toml +++ b/libafl_libfuzzer/Cargo.toml @@ -14,9 +14,9 @@ include = ["/src", "/Cargo.toml", "/build.rs", "/runtime"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [build-dependencies] -cc = "1.0" -rustversion = "1.0" -toml = { version = "0.8.14", features = ["preserve_order"] } +cc = "1.0.106" +rustversion = "1.0.17" +toml = { version = "0.8.19", features = ["preserve_order"] } [features] default = ["fork"] @@ -43,7 +43,7 @@ libafl-libfuzzer-use-version = [] [dependencies] libfuzzer-sys = { version = "0.4.7", default-features = false } -document-features = { version = "0.2", optional = true } +document-features = { workspace = true, optional = true } [package.metadata.docs.rs] features = ["document-features"] diff --git a/libafl_libfuzzer/runtime/Cargo.toml.template b/libafl_libfuzzer/runtime/Cargo.toml.template index cc704e4a0a..87cf9b29ce 100644 --- a/libafl_libfuzzer/runtime/Cargo.toml.template +++ b/libafl_libfuzzer/runtime/Cargo.toml.template @@ -65,19 +65,21 @@ libafl_targets = { path = "../libafl_targets", features = [ "sanitizer_interfaces", ] } -ahash = { version = "0.8", default-features = false } -libc = "0.2.1" -log = "0.4.20" -mimalloc = { version = "0.1.34", default-features = false } -num-traits = "0.2.15" +ahash = { version = "0.8.11", default-features = false } +libc = "0.2.159" +log = { version = "0.4.22", features = ["release_max_level_info"] } +mimalloc = { version = "0.1.43", default-features = false } +num-traits = { version = "0.2.19", default-features = true } rand = "0.8.5" -serde = { version = "1.0", features = ["derive"] } # serialization lib -hashbrown = "0.14" +serde = { version = "1.0.210", default-features = true, features = [ + "derive", +] } # serialization lib +hashbrown = { version = "0.14.5", default-features = true } # for identifying if we can grimoire-ify -utf8-chars = "3.0.1" -env_logger = "0.10" +utf8-chars = "3.0.4" +env_logger = "0.11.5" [build-dependencies] -bindgen = "0.69.4" -cc = { version = "1.0", features = ["parallel"] } +bindgen = "0.70.1" +cc = { version = "1.1.22", features = ["parallel"] } diff --git a/libafl_nyx/Cargo.toml b/libafl_nyx/Cargo.toml index 75a15db66d..bb6a6d7589 100644 --- a/libafl_nyx/Cargo.toml +++ b/libafl_nyx/Cargo.toml @@ -36,5 +36,5 @@ libafl_targets = { path = "../libafl_targets", version = "0.13.2", features = [ "sancov_cmplog", ] } -nix = { version = "0.29", features = ["fs"] } -typed-builder = "0.18" +nix = { workspace = true, default-features = true, features = ["fs"] } +typed-builder = { workspace = true } diff --git a/libafl_nyx/build_nyx_support.sh b/libafl_nyx/build_nyx_support.sh index 311436603c..4ef525e49c 100755 --- a/libafl_nyx/build_nyx_support.sh +++ b/libafl_nyx/build_nyx_support.sh @@ -1,4 +1,7 @@ #!/bin/bash + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + echo "=================================================" echo " Nyx build script" echo "=================================================" @@ -40,7 +43,8 @@ test -e QEMU-Nyx/.git || { echo "[-] QEMU-Nyx not checked out, please install gi echo "[*] Checking QEMU-Nyx ..." if [ ! -f "QEMU-Nyx/x86_64-softmmu/qemu-system-x86_64" ]; then cd QEMU-Nyx/ || return - cp ../Makefile.libxdc ./libxdc/Makefile || exit 1 + # We need to copy our custom `Makefile.libxdc` after `git submodule update`, otherwise we get a git error. + sed -i "s,git submodule update libxdc$,git submodule update libxdc \&\& cp ../Makefile.libxdc ./libxdc/Makefile || exit 1," compile_qemu_nyx.sh ./compile_qemu_nyx.sh lto || exit 1 cd .. fi diff --git a/libafl_qemu/Cargo.toml b/libafl_qemu/Cargo.toml index a11e0fc0f1..61f5ba3b74 100644 --- a/libafl_qemu/Cargo.toml +++ b/libafl_qemu/Cargo.toml @@ -98,46 +98,46 @@ libafl_targets = { path = "../libafl_targets", version = "0.13.2" } libafl_qemu_sys = { path = "./libafl_qemu_sys", version = "0.13.2" } libafl_derive = { path = "../libafl_derive", version = "0.13.2" } -serde = { version = "1.0", default-features = false, features = [ +serde = { workspace = true, default-features = false, features = [ "alloc", ] } # serialization lib -hashbrown = { version = "0.14", features = [ +hashbrown = { workspace = true, default-features = true, features = [ "serde", ] } # A faster hashmap, nostd compatible -num-traits = "0.2" -num-derive = "0.4" -num_enum = "0.7" -goblin = "0.8" -libc = "0.2" -strum = "0.26" -strum_macros = "0.26" -syscall-numbers = "4.0" -meminterval = "0.4" -thread_local = "1.1.4" +num-traits = { workspace = true, default-features = true } +num-derive = "0.4.2" +num_enum = { workspace = true, default-features = true } +goblin = "0.8.2" +libc = { workspace = true } +strum = "0.26.3" +strum_macros = "0.26.4" +syscall-numbers = "4.0.0" +meminterval = { workspace = true } +thread_local = "1.1.8" capstone = "0.12.0" -rangemap = "1.3" -log = "0.4" -object = "0.36" -addr2line = "0.24" -typed-arena = "2.0" -paste = "1" -enum-map = "2.7" -serde_yaml = { version = "0.9", optional = true } # For parsing the injections yaml file -toml = { version = "0.8.13", optional = true } # For parsing the injections toml file -pyo3 = { version = "0.22", optional = true, features = ["multiple-pymethods"] } -bytes-utils = "0.1" -typed-builder = "0.19" -memmap2 = "0.9" -getset = "0.1" +rangemap = { workspace = true } +log = { workspace = true } +object = "0.36.4" +addr2line = "0.24.1" +typed-arena = "2.0.2" +paste = { workspace = true } +enum-map = "2.7.3" +serde_yaml = { workspace = true, optional = true } # For parsing the injections yaml file +toml = { workspace = true, optional = true } # For parsing the injections toml file +pyo3 = { workspace = true, optional = true, features = ["multiple-pymethods"] } +bytes-utils = "0.1.4" +typed-builder = { workspace = true } +memmap2 = "0.9.5" +getset = "0.1.3" # Document all features of this crate (for `cargo doc`) -document-features = { version = "0.2", optional = true } +document-features = { workspace = true, optional = true } [build-dependencies] libafl_qemu_build = { path = "./libafl_qemu_build", version = "0.13.2" } -pyo3-build-config = { version = "0.22", optional = true } -rustversion = "1.0" -bindgen = "0.69" -cc = "1.0" +pyo3-build-config = { workspace = true, optional = true } +rustversion = { workspace = true } +bindgen = { workspace = true } +cc = { workspace = true } [lib] name = "libafl_qemu" diff --git a/libafl_qemu/libafl_qemu_build/Cargo.toml b/libafl_qemu/libafl_qemu_build/Cargo.toml index 308f845224..2c842ba993 100644 --- a/libafl_qemu/libafl_qemu_build/Cargo.toml +++ b/libafl_qemu/libafl_qemu_build/Cargo.toml @@ -30,12 +30,12 @@ paranoid_debug = [ ] # Will perform as many checks as possible. The target will be greatly slowed down. [dependencies] -bindgen = "0.69.4" -which = "6.0" -json = "0.12" -shell-words = "1.1" -pkg-config = "0.3.26" -cc = "1.0" -regex = "1" -rustversion = "1.0" -rustc_version = "0.4" +bindgen = { workspace = true } +which = { workspace = true } +json = "0.12.4" +shell-words = "1.1.0" +pkg-config = "0.3.31" +cc = { workspace = true } +regex = { workspace = true } +rustversion = { workspace = true } +rustc_version = "0.4.1" diff --git a/libafl_qemu/libafl_qemu_sys/Cargo.toml b/libafl_qemu/libafl_qemu_sys/Cargo.toml index c0a493e094..1d84994b25 100644 --- a/libafl_qemu/libafl_qemu_sys/Cargo.toml +++ b/libafl_qemu/libafl_qemu_sys/Cargo.toml @@ -54,14 +54,14 @@ paranoid_debug = [ ] # Will perform as many checks as possible. The target will be greatly slowed down. [dependencies] -paste = "1" -num_enum = "0.7" -libc = "0.2" -strum = "0.26" -strum_macros = "0.26" -pyo3 = { version = "0.22", optional = true } +paste = { workspace = true } +num_enum = { workspace = true, default-features = true } +libc = { workspace = true } +strum = { workspace = true } +strum_macros = { workspace = true } +pyo3 = { workspace = true, optional = true } [build-dependencies] libafl_qemu_build = { path = "../libafl_qemu_build", version = "0.13.2" } -pyo3-build-config = { version = "0.22", optional = true } -rustversion = "1.0" +pyo3-build-config = { workspace = true, optional = true } +rustversion = { workspace = true } diff --git a/libafl_qemu/src/executor.rs b/libafl_qemu/src/executor.rs index ca983db24b..3eb7adb5ed 100644 --- a/libafl_qemu/src/executor.rs +++ b/libafl_qemu/src/executor.rs @@ -104,7 +104,7 @@ pub unsafe fn inproc_qemu_timeout_handler( } } -impl<'a, CM, ED, ET, H, OT, S, SM> Debug for QemuExecutor<'a, CM, ED, ET, H, OT, S, SM> +impl Debug for QemuExecutor<'_, CM, ED, ET, H, OT, S, SM> where CM: CommandManager, ET: EmulatorModuleTuple + Debug, @@ -207,8 +207,7 @@ where } } -impl<'a, CM, ED, EM, ET, H, OT, S, SM, Z> Executor - for QemuExecutor<'a, CM, ED, ET, H, OT, S, SM> +impl Executor for QemuExecutor<'_, CM, ED, ET, H, OT, S, SM> where CM: CommandManager, ED: EmulatorDriver, @@ -248,7 +247,7 @@ where } } -impl<'a, CM, ED, ET, H, OT, S, SM> UsesState for QemuExecutor<'a, CM, ED, ET, H, OT, S, SM> +impl UsesState for QemuExecutor<'_, CM, ED, ET, H, OT, S, SM> where CM: CommandManager, ET: EmulatorModuleTuple, @@ -259,7 +258,7 @@ where type State = S; } -impl<'a, CM, ED, ET, H, OT, S, SM> HasObservers for QemuExecutor<'a, CM, ED, ET, H, OT, S, SM> +impl HasObservers for QemuExecutor<'_, CM, ED, ET, H, OT, S, SM> where CM: CommandManager, ET: EmulatorModuleTuple, @@ -296,8 +295,8 @@ where } #[cfg(feature = "fork")] -impl<'a, CM, ED, EM, ET, H, OT, S, SM, SP, Z> Debug - for QemuForkExecutor<'a, CM, ED, EM, ET, H, OT, S, SM, SP, Z> +impl Debug + for QemuForkExecutor<'_, CM, ED, EM, ET, H, OT, S, SM, SP, Z> where CM: CommandManager + Debug, EM: UsesState, @@ -401,8 +400,8 @@ where } #[cfg(feature = "fork")] -impl<'a, CM, ED, EM, ET, H, OT, S, SM, SP, Z> UsesState - for QemuForkExecutor<'a, CM, ED, EM, ET, H, OT, S, SM, SP, Z> +impl UsesState + for QemuForkExecutor<'_, CM, ED, EM, ET, H, OT, S, SM, SP, Z> where CM: CommandManager, EM: UsesState, @@ -417,8 +416,8 @@ where } #[cfg(feature = "fork")] -impl<'a, CM, ED, EM, ET, H, OT, S, SM, SP, Z> HasObservers - for QemuForkExecutor<'a, CM, ED, EM, ET, H, OT, S, SM, SP, Z> +impl HasObservers + for QemuForkExecutor<'_, CM, ED, EM, ET, H, OT, S, SM, SP, Z> where CM: CommandManager, EM: UsesState, diff --git a/libafl_sugar/Cargo.toml b/libafl_sugar/Cargo.toml index 3d0f67dec9..371c94ea37 100644 --- a/libafl_sugar/Cargo.toml +++ b/libafl_sugar/Cargo.toml @@ -53,7 +53,7 @@ ppc = ["libafl_qemu/ppc"] hexagon = ["libafl_qemu/hexagon"] [build-dependencies] -pyo3-build-config = { version = "0.22", optional = true } +pyo3-build-config = { workspace = true, optional = true } [dependencies] libafl = { path = "../libafl", version = "0.13.2" } @@ -61,11 +61,11 @@ libafl_bolts = { path = "../libafl_bolts", version = "0.13.2" } libafl_targets = { path = "../libafl_targets", version = "0.13.2" } # Document all features of this crate (for `cargo doc`) -document-features = { version = "0.2", optional = true } +document-features = { workspace = true, optional = true } -typed-builder = "0.18" # Implement the builder pattern at compiletime -pyo3 = { version = "0.22", optional = true } -log = "0.4.20" +typed-builder = { workspace = true } # Implement the builder pattern at compiletime +pyo3 = { workspace = true, optional = true } +log = { workspace = true } [target.'cfg(target_os = "linux")'.dependencies] libafl_qemu = { path = "../libafl_qemu", version = "0.13.2" } diff --git a/libafl_sugar/src/forkserver.rs b/libafl_sugar/src/forkserver.rs index 35a96b3abf..a8e72afc6e 100644 --- a/libafl_sugar/src/forkserver.rs +++ b/libafl_sugar/src/forkserver.rs @@ -76,7 +76,7 @@ pub struct ForkserverBytesCoverageSugar<'a> { } #[allow(clippy::similar_names)] -impl<'a> ForkserverBytesCoverageSugar<'a> { +impl ForkserverBytesCoverageSugar<'_> { /// Runs the fuzzer. #[allow(clippy::too_many_lines, clippy::similar_names)] pub fn run(&mut self) { diff --git a/libafl_sugar/src/inmemory.rs b/libafl_sugar/src/inmemory.rs index 9643741c62..179de22b75 100644 --- a/libafl_sugar/src/inmemory.rs +++ b/libafl_sugar/src/inmemory.rs @@ -109,7 +109,7 @@ where } #[allow(clippy::similar_names)] -impl<'a, H> InMemoryBytesCoverageSugar<'a, H> +impl InMemoryBytesCoverageSugar<'_, H> where H: FnMut(&[u8]), { diff --git a/libafl_sugar/src/qemu.rs b/libafl_sugar/src/qemu.rs index e97bed43ec..7df39cf3aa 100644 --- a/libafl_sugar/src/qemu.rs +++ b/libafl_sugar/src/qemu.rs @@ -89,7 +89,7 @@ where iterations: Option, } -impl<'a, H> Debug for QemuBytesCoverageSugar<'a, H> +impl Debug for QemuBytesCoverageSugar<'_, H> where H: FnMut(&[u8]), { @@ -117,7 +117,7 @@ where } } -impl<'a, H> QemuBytesCoverageSugar<'a, H> +impl QemuBytesCoverageSugar<'_, H> where H: FnMut(&[u8]), { diff --git a/libafl_targets/Cargo.toml b/libafl_targets/Cargo.toml index 7d5294aa2d..f94698d00e 100644 --- a/libafl_targets/Cargo.toml +++ b/libafl_targets/Cargo.toml @@ -65,25 +65,25 @@ cmplog_extended_instrumentation = [ function-logging = ["common"] track_hit_feedbacks = ["libafl/track_hit_feedbacks"] [build-dependencies] -bindgen = "0.69.4" -cc = { version = "1.0", features = ["parallel"] } -rustversion = "1.0" +bindgen = "0.70.1" +cc = { version = "1.1.21", features = ["parallel"] } +rustversion = "1.0.17" [dependencies] libafl = { path = "../libafl", version = "0.13.2", default-features = false, features = [ ] } libafl_bolts = { path = "../libafl_bolts", version = "0.13.2", default-features = false, features = [ ] } -libc = "0.2" -hashbrown = "0.14" -once_cell = "1.19" -log = "0.4.20" -rustversion = "1.0" +libc = { workspace = true } +hashbrown = { workspace = true, default-features = true } +once_cell = "1.19.0" +log = { workspace = true } +rustversion = { workspace = true } -rangemap = "1.3" -serde = { version = "1.0", default-features = false, features = [ +rangemap = { workspace = true } +serde = { workspace = true, default-features = false, features = [ "alloc", ] } # serialization lib -meminterval = { version = "0.4", features = ["serde"], optional = true } -ahash = { version = "0.8", default-features = false, optional = true } +meminterval = { workspace = true, features = ["serde"], optional = true } +ahash = { workspace = true, default-features = false, optional = true } # serde-big-array = "0.3.2" diff --git a/libafl_targets/src/cmps/observers/aflpp.rs b/libafl_targets/src/cmps/observers/aflpp.rs index e21fa9f051..c07df26968 100644 --- a/libafl_targets/src/cmps/observers/aflpp.rs +++ b/libafl_targets/src/cmps/observers/aflpp.rs @@ -72,7 +72,7 @@ pub struct AFLppCmpLogObserver<'a> { original: bool, } -impl<'a> CmpObserver for AFLppCmpLogObserver<'a> { +impl CmpObserver for AFLppCmpLogObserver<'_> { type Map = AFLppCmpLogMap; /// Get the number of usable cmps (all by default) @@ -92,7 +92,7 @@ impl<'a> CmpObserver for AFLppCmpLogObserver<'a> { } } -impl<'a, I, S> Observer for AFLppCmpLogObserver<'a> +impl Observer for AFLppCmpLogObserver<'_> where S: HasMetadata, { @@ -123,7 +123,7 @@ where } } -impl<'a> Named for AFLppCmpLogObserver<'a> { +impl Named for AFLppCmpLogObserver<'_> { fn name(&self) -> &Cow<'static, str> { &self.name } diff --git a/libafl_targets/src/coverage.rs b/libafl_targets/src/coverage.rs index 80cb8c02d6..464a684cea 100644 --- a/libafl_targets/src/coverage.rs +++ b/libafl_targets/src/coverage.rs @@ -278,15 +278,15 @@ mod swap { } } - impl<'a, 'b> Named for DifferentialAFLMapSwapObserver<'a, 'b> { + impl Named for DifferentialAFLMapSwapObserver<'_, '_> { fn name(&self) -> &Cow<'static, str> { &self.name } } - impl<'a, 'b, I, S> Observer for DifferentialAFLMapSwapObserver<'a, 'b> {} + impl Observer for DifferentialAFLMapSwapObserver<'_, '_> {} - impl<'a, 'b, OTA, OTB, I, S> DifferentialObserver for DifferentialAFLMapSwapObserver<'a, 'b> { + impl DifferentialObserver for DifferentialAFLMapSwapObserver<'_, '_> { fn pre_observe_first(&mut self, _: &mut OTA) -> Result<(), Error> { let slice = self.first_map.as_slice_mut(); unsafe { diff --git a/libafl_targets/src/libfuzzer/mutators.rs b/libafl_targets/src/libfuzzer/mutators.rs index cab8505dee..95f01443e8 100644 --- a/libafl_targets/src/libfuzzer/mutators.rs +++ b/libafl_targets/src/libfuzzer/mutators.rs @@ -110,6 +110,7 @@ impl<'a, M, S> MutatorProxy<'a, M, S> { /// Create a weak version of the proxy, which will become unusable when the custom mutator /// is no longer permitted to be executed. + #[allow(clippy::type_complexity)] fn weak(&self) -> WeakMutatorProxy FnMut(&'b mut S)) -> bool, M, S> { let state = Rc::downgrade(&self.state); WeakMutatorProxy { diff --git a/libafl_tinyinst/Cargo.toml b/libafl_tinyinst/Cargo.toml index f05c15029a..c22e0ab067 100644 --- a/libafl_tinyinst/Cargo.toml +++ b/libafl_tinyinst/Cargo.toml @@ -31,7 +31,7 @@ libafl_bolts = { path = "../libafl_bolts", version = "0.13.2", features = [ ] } tinyinst = { git = "https://github.com/AFLplusplus/tinyinst-rs" } # tinyinst-rs = { path = "../../tinyinst-rs" } -log = "0.4.20" +log = { workspace = true } [build-dependencies] -cmake = "0.1" +cmake = "0.1.51" diff --git a/libafl_tinyinst/src/executor.rs b/libafl_tinyinst/src/executor.rs index c440d400b8..6dca42c5ae 100644 --- a/libafl_tinyinst/src/executor.rs +++ b/libafl_tinyinst/src/executor.rs @@ -29,10 +29,10 @@ where map: Option<::ShMem>, } -impl<'a> TinyInstExecutor<(), NopShMemProvider, ()> { +impl TinyInstExecutor<(), NopShMemProvider, ()> { /// Create a builder for [`TinyInstExecutor`] #[must_use] - pub fn builder() -> TinyInstExecutorBuilder<'a, NopShMemProvider> { + pub fn builder<'a>() -> TinyInstExecutorBuilder<'a, NopShMemProvider> { TinyInstExecutorBuilder::new() } } @@ -115,7 +115,7 @@ pub struct TinyInstExecutorBuilder<'a, SP> { const MAX_FILE: usize = 1024 * 1024; const SHMEM_FUZZ_HDR_SIZE: usize = 4; -impl<'a> Default for TinyInstExecutorBuilder<'a, NopShMemProvider> { +impl Default for TinyInstExecutorBuilder<'_, NopShMemProvider> { fn default() -> Self { Self::new() } @@ -150,7 +150,7 @@ impl<'a> TinyInstExecutorBuilder<'a, NopShMemProvider> { } } -impl<'a, SP> TinyInstExecutorBuilder<'a, SP> +impl TinyInstExecutorBuilder<'_, SP> where SP: ShMemProvider, { diff --git a/scripts/clippy.ps1 b/scripts/clippy.ps1 index ca10b5cb9c..8ccfb2265f 100644 --- a/scripts/clippy.ps1 +++ b/scripts/clippy.ps1 @@ -11,10 +11,13 @@ function Run-Clippy { ) Write-Host "Running Clippy on $dir" Push-Location $dir + + $currentdir = $PWD.Path + Write-Host "Running Clippy in $currentdir" try { $env:RUST_BACKTRACE = "full" - cargo +nightly clippy --all --all-features --no-deps --tests --examples --benches -- -Z macro-backtrace ` + cargo +nightly clippy --all-features --no-deps --tests --examples --benches -- -Z macro-backtrace ` -D clippy::all ` -D clippy::pedantic ` -W clippy::similar_names ` @@ -28,6 +31,11 @@ function Run-Clippy { -A clippy::unseparated-literal-suffix ` -A clippy::module-name-repetitions ` -A clippy::unreadable-literal + + # Exit unsuccessfully on clippy error + if (!$?) { + exit 1 + } } finally { Pop-Location @@ -36,10 +44,16 @@ function Run-Clippy { # Define projects for Windows $AllProjects = @( - "libafl_frida", + "libafl_concolic/test/dump_constraints", + "libafl_concolic/test/runtime_test", "libafl_libfuzzer", "libafl_nyx", + "libafl_sugar", "libafl_tinyinst" + "utils/build_and_test_fuzzers", + "utils/deexit", + "utils/libafl_benches", + "utils/gramatron/construct_automata" ) # Check if arguments were provided @@ -52,9 +66,9 @@ else { $Projects = $args[0] -split ',' } -# First run it on all +# First run it on all default members $env:RUST_BACKTRACE = "full" -cargo +nightly clippy --all --all-features --no-deps --tests --examples --benches -- -Z macro-backtrace ` +cargo +nightly clippy --all-features --no-deps --tests --examples --benches -- -Z macro-backtrace ` -D clippy::all ` -D clippy::pedantic ` -W clippy::similar_names ` @@ -69,6 +83,11 @@ cargo +nightly clippy --all --all-features --no-deps --tests --examples --benche -A clippy::module-name-repetitions ` -A clippy::unreadable-literal +# Exit unsuccessfully on clippy error +if (!$?) { + exit 1 +} + # Loop through each project and run Clippy foreach ($project in $Projects) { $project = $project.Trim()