3198 Commits

Author SHA1 Message Date
Aarnav
aa21815a97
Introduce libafl-fuzz (#2362)
* Introduce libafl-fuzz

* fix corpus file path

* simplify SeedFeedback

* fix incorrect comment

* add clap::ValueEnum to PowerSchedule as an optional derive if clap is enabled

* UnixShMemProvider replaced with StdShMemProvider for libafl-fuzz

* remove io_error_more feature constraint

* libafl-fuzz: make Ok(()) unreachable in CentralizedLauncher

* libafl-fuzz: make harness_input_stdin to harness_input_type with &'static

* libafl-fuzz: move each feedback to it's own file

* make run_fuzzer_with_stage into a function.
use CachedOnDiskCorpus instead of OnDiskCorpus for Corpora
remove utils file

* remove unecessary clone

* libafl-fuzz: cleanup AFLStatsStage

* move peak_rss_mb to libafl_bolts

* parse envs by hand

* add sensible defaults for map size and broker port

* fix test.sh and corpus_id padding

* add Makefile.toml

* libafl-fuzz update test suite

* libafl-fuzz: clippy

* rename peak_rss_mb to peak_rss_mb_children

* remove minor version constraint for clap

* libafl-fuzz: fix ELF check and instrumentation check in check_binary

* libafl-fuzz: improve Makefile.toml

* simplify fuzzer and cleanup typos

* libafl-fuzz: load corpus entries in a multicore fashion

* libafl-fuzz: create output dir if not exists (non-racey)

* libafl-fuzz: add sequential scheduling support
libafl-fuzz: add cmplog options
libafl-fuzz: add test-cmplog.c to CI

* rename peak_rss_mb_children to peak_rss_mb_child_processes

* fix race condition in SyncFromDiskStage, add interval based checking and support for multiple directories.
libafl-fuzz: add support for syncing with foreign fuzzers

* update README

* implement AflScheduler for QueueScheduler.
Add queue_cycles field to
AflScheduler

* libafl-fuzz: remove dependecy on SchedulerMetadata for AflStatsStage

* clippy

* remove queue_cycles from AflScheduler into int's own trait.
libafl-fuzz: simplify map observer tracking

* clippy

* libafl-fuzz: disable cmplog check in CI for now

* add missing constraints for libafl_qemu executor

* clippy

* libafl-fuzz: improve Makefile
libafl-fuzz: clippy

* libafl-fuzz: misc

* misc typos, beautify

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
Co-authored-by: Dominik Maier <domenukk@gmail.com>
2024-07-16 02:10:20 +02:00
Romain Malmain
e8de3591bf
Fix cfg clippy for libafl_qemu (#2397)
* optional final comma

* fix systemmode
2024-07-16 00:37:54 +02:00
Dominik Maier
9d5be4ede1
clippy_nyx (#2401) 2024-07-15 23:49:56 +02:00
Dongjia "toka" Zhang
8919024e83
New clippy script (#2400)
* claude.ai

* aaa

* ps1

* set -e

* nightly

* nightly default

* components?
2024-07-15 19:17:21 +02:00
Addison Crump
50a4a0abd9
Template out libafl_libfuzzer (#2398)
* template out libafl_libfuzzer

* fix some final path oddities

* missed a spot
2024-07-15 19:10:51 +02:00
Aarnav
fed61eb6b8
Fix qemu_launcher by moving stop request handling to fuzz_one (#2394)
Co-authored-by: Romain Malmain <romain.malmain@pm.me>
2024-07-15 15:41:51 +02:00
Dominik Maier
ea3e70b6e5
Remove release_max_level_info from log (#2396) 2024-07-15 14:55:13 +02:00
Dongjia "toka" Zhang
7969e7ae51
Another attempt to add interesting crashing input on crash (#2391)
* aa

* why??????????????

* ppp

* aa

* aa

* abcde

* fixer

* ppp

* aa

* fix from windows

* sugar

* ff

* ??

* a

* to log::error

* exclude

* exclude libafl_qemu clippy on windows

* pp

* aa

---------

Co-authored-by: Your Name <you@example.com>
2024-07-15 13:58:39 +02:00
Romain Malmain
539ac91ce0
fix qemu ci not running aggressively enough (#2395) 2024-07-15 13:55:35 +02:00
Valentin Huber
4f7444395a
Add function to make mmap shmem available for child processes (#2390) 2024-07-13 13:22:32 +02:00
Dominik Maier
79cbc16800
Replace uses std HashMap with hashbrown for consistency (#2387)
* Replace uses std HashMap with hashbrown for consistency

* fix

* more fix

* Hashbrownify libfuzzer_runtime

* more
2024-07-12 17:42:07 +02:00
Dominik Maier
7feeb00546
Fix docs (follow-up to #2385) (#2388)
* Fix docs (follow-up to #2385)

* More fix

* fix fuzzer

* More docs
2024-07-12 16:13:43 +02:00
Dominik Maier
3c93b96b70
Introduce TuiMonitor builder, clean up monitor docs and names (#2385)
* Introduce TuiMonitor builder

* Some random docs

* More documentation for monitors

* fixed critical whitespace

* Rename all-caps TOML and JSON to Toml and Json in monitors

* actually rename

* more
2024-07-12 15:27:45 +02:00
Dominik Maier
24aa640df7
Clarify two more comments (#2384)
* Make language clearer

* Two more comments
2024-07-12 13:07:19 +02:00
Dominik Maier
d4101a671c
Make language clearer (#2383) 2024-07-12 13:04:49 +02:00
Dominik Maier
fa4241f4f8
Make atheris load multiple tokens files (#2382) 2024-07-12 12:46:42 +02:00
Dominik Maier
081c218737
More Clippy (#2381)
* More Clippy

* This looks nicer indeed
2024-07-12 11:05:03 +02:00
Nereuxofficial
4931db6469
doc: Listing mutators in the module documentation (#2369)
* doc(libafl_nyx): More detailed README

* doc(libafl): Documentation about mutators

* doc(libafl): fix Reference to MOpt

* doc(libafl): Improved note about Mopt

* doc: More documentation for different mutators
2024-07-11 15:35:36 +02:00
Dongjia "toka" Zhang
2565fa8bf5
Delete Makefile.toml from Multi machine exmaple (#2379)
* delete

* aa
2024-07-11 14:51:18 +02:00
Max Ammann
dbbd54169d
Add documentation for InProcessForkExecutor for fuzzing rust (#2378) 2024-07-11 13:26:30 +02:00
Dominik Maier
d9a042e094
More expressive error for llvm_config version (#2376) 2024-07-10 16:46:52 +02:00
Dominik Maier
264c2f021e
Update all which dependencies (#2375) 2024-07-10 15:38:56 +02:00
Dominik Maier
2b43d86296
Update clap across the repo (#2374) 2024-07-10 15:35:25 +02:00
Dominik Maier
977a597e9a
More Clippy (#2370) 2024-07-10 10:44:21 +02:00
Dominik Maier
721fd3b14e
Make tokens more token-y (less dictionary-y) (#2371) 2024-07-09 17:37:37 +02:00
saibotk
40f9cc946c
fix(tui): Make client bottom layouts visible again (#2368)
The length constraint on the bottom areas was set to 0 and thus those two blocks were invisible.
We adjusted those to the correct values to show all lines & also removed the unnecessary extra chunk layout variable.
2024-07-09 16:27:48 +02:00
Nereuxofficial
571c4c111e
Wrap metadata elements in Cow (#2364)
* feat: Wrap metadata elements in Cow

* fix(libafl_bolts): Compile Error due to wrong type

* cleanup(libafl_bolts): Remove unnecessary import

* cleanup(libafl_bolts): Removed unnecessary alloc

* fix(libafl_bolts): Fixed type_repr_owned

* cleanup(libafl_bolts): unused import
2024-07-07 16:30:12 +02:00
Andrea Fioraldi
2356ba5754
Fix missing -use_value_profile flag in libafl_libfuzzer (#2363)
* Add -use_value_profile to libafl_libfuzzer

* clippy
2024-07-05 14:09:07 +02:00
0e5bf879e4 fix try_force_new_branches 2024-07-04 12:49:09 +02:00
Dominik Maier
d7b5d55408
Make sure inmemory_ondisk corpus catches filesystem errors correctly (#2361)
* Make sure inmemory_ondisk corpus catches filesystem errors correctly

* clip

* change names to be clearer
2024-07-03 16:25:12 +02:00
Nereuxofficial
ed3bd003a4
fix: Added corpus for dynamic_analysis fuzzer (#2360)
* doc: fixed instruction in CONTRIBUTING.md

* Added note for windows users

* fix: Added corpus for dynamic_analysis fuzzer

* fix for calling the clippy script on windows

* Fixed path oversight in previous commit
2024-07-03 11:51:52 +02:00
Nereuxofficial
030e5066b6
doc: fixed instruction in CONTRIBUTING.md (#2359)
* doc: fixed instruction in CONTRIBUTING.md

* Added note for windows users

* fix for calling the clippy script on windows
2024-07-02 19:32:11 +02:00
Aarnav
eff40320eb
Add Stoppable trait to State which exposes an API to stop the fuzzer (#2325)
* add HasStopNext to State which exposes an API to stop the fuzzer. Stops the fuzzer in fuzz_loop or
fuzz_loop_for when set to true

* fix import

* rename HasStopNext to HasShouldStopFuzzing and stop_next to should_stop_fuzzing

* added HasShouldStopFuzzing trait constraint for libafl_libfuzzer_runtime fuzzer

* rename HasShouldStopFuzzing to Stoppable and add it as a type constraint in libafl_libfuzzer report.rs

* rename should_stop_fuzzing -> should_stop

* introduce Event::Stop

* fix prelude import

* Call send_exiting when processing Event::Stop in restartable managers

* fix clippy

* introduce on_shutdown function in EventProcessor, a function to exit
without saving state gracefully. In contrast with on_restart.

* call manager.on_shutdown when stopping in fuzz_loop due to state.should_stop

* Add missing on_shutdown implementations
Check after every stage in Stages::perform_all if should exit and do so.

* remove specialization

* fix doc

* introduce EventProcessor constraint in libafl_libfuzzer_runtime
run clippy in libafl_libfuzzer_runtime

* fix CentralizedEventManager's on_shutdown not calling inner.on_shutdown

* fix bugs in CentralizedLauncher that wouldn't allow children to terminate properly

* don't call send_exiting when processing Event::Stop since it will be called when calling on_shutdown anyways

* clippy

* add set_exit_after so broker does not need to inner_mut to set exit_cleanly_after

* return Cow<str> from Event::name_detailed instead of a String

* fix missing import in libafl_libfuzzer_runtime

* add initate_stop and reset_stop to Stoppable trait to superceed should_stop_mut

* clippy

* typo

* rename initate_stop to request_stop, should_stop to stop_requested and reset_stop to discard_stop_request

* fix missing import

* windows clippy fix

* fix broker typo
2024-07-02 17:45:20 +02:00
Dongjia "toka" Zhang
762b6e008e
Make llvm pass build feature dependent (#2357)
* push

* everybody is default

* fix

* fix
2024-07-02 17:37:07 +02:00
d569df29a3 build fixes 2024-07-02 09:34:56 +02:00
47724ad1c3 stg try_force_new_branches 2024-07-02 09:34:35 +02:00
Dongjia "toka" Zhang
7c95afc42f
Rename some functions in fuzzer.rs (#2355)
* rename

* fmt
2024-07-01 21:47:10 +02:00
Marco C
140f84441a
LibAFL QEMU fix Doc-tests (#2354)
Explicitly mark the README snippet as bibtex to avoid cargo trying to run it as Rust
2024-07-01 14:29:33 +02:00
810ec36115 refactor 2024-07-01 13:28:38 +02:00
Andrea Fioraldi
35d8e67992
Fix libafl_libfuzzer publish (#2353) 2024-06-30 20:38:03 +02:00
Andrea Fioraldi
12c6cc186b
LibAFL QEMU readme (#2351) 2024-06-30 17:24:02 +02:00
Nereuxofficial
d564656f1c
Improved documentation for fuzzers/cargo_fuzz and dynamic_analysis (#2350)
* Improved documentation for fuzzers/cargo_fuzz and dynamic_analysis

* revert line breaks in markdown files
2024-06-30 14:31:34 +02:00
Dongjia "toka" Zhang
bb579e624e
0.13.1 (#2343) 2024-06-29 12:41:56 +02:00
Dongjia "toka" Zhang
234ea049a0
Delete introspection feature from libafl_libfuzzer (#2349)
* fix

* a

* delete it
2024-06-28 23:02:32 +02:00
Dominik Maier
602bce446f
Fix LLVMFuzzerCustomMutator with different sizes (#2347)
* Fix LLVMFuzzerCustomMutator with different sizes

* removed needles extra thingy

* clippy

* more clip
2024-06-28 16:40:41 +02:00
77799f77a9 move cli parsing, use multibyteinput 2024-06-28 14:38:25 +02:00
Dongjia "toka" Zhang
50d75422c8
Fixing receiver_left()/memory leak in llmp.rs (#2344)
* fixer

* real fix
2024-06-27 16:52:05 +02:00
Dominik Maier
8031111660
Make ddg map compilation optional (#2341)
* Make ddg map compilation optional

* undo

* undo
2024-06-27 01:19:45 +02:00
Dominik Maier
ea6e440762
Re-Rename Retrying Restart Helper (#2340) 2024-06-26 23:49:22 +02:00
Dominik Maier
3616cc6a55
Fix unsafe_stable_anymap, rename to stable_anymap (it's safe) (#2338)
* doesn't work poc

* Works

* make this work with or without feature

* start time

* Fix fixes

* Fix more build

* fix build

* reset changes in fuzzbench fuzzer

---------

Co-authored-by: Toka <tokazerkje@outlook.com>
2024-06-26 22:44:01 +02:00