1400 Commits

Author SHA1 Message Date
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
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
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
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
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
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
7c95afc42f
Rename some functions in fuzzer.rs (#2355)
* rename

* fmt
2024-07-01 21:47:10 +02:00
Dongjia "toka" Zhang
bb579e624e
0.13.1 (#2343) 2024-06-29 12:41:56 +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
Aarnav
b2635df524
Make LlmpEventManager call pre_exec hook (#2333) 2024-06-23 14:39:34 +02:00
Dongjia "toka" Zhang
e3dd7cf0dc
Don't restart in deterministic stages. Don't restart where there's no restart safety. Make stage names unique (#2331)
* push

* fuck

* add

* add

* api

* api

* add multi machine to workspace

* doc

* api

* api

* add

* more

* fix

* stats

* rev

* fix

* fix

* real fix

* add

* fmt

* add

* add

* fix

* a

* add

* revert workflow

---------

Co-authored-by: Your Name <you@example.com>
2024-06-20 17:38:15 +02:00
Dominik Maier
042840dba1
Call all Ids id, not idx (#2319)
* All Ids should be id not idx

* More

* fix

* win?

* win?

* win?

* fix

* more fix

* desyscall?

* more

* fmt

* std

* make id less id-y

* fmt

* fix

* cleanup

* fixes all around

* fix

* Fix the broken stuff from refactoring

* remove unused

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2024-06-20 14:46:47 +01:00
Dongjia "toka" Zhang
a2da080fa6
Delete wrong exec count increment (#2330) 2024-06-19 11:57:27 +02:00
Dominik Maier
e64f0fb536
Address comments from #2302 (#2322)
* Address comments from #2302

* secure?

* cleanup

* early exit ftw

* address clippy

* Fix all the things
2024-06-18 14:58:37 +01:00
学儿思
5519ee7d77
Fix typos (#2327) 2024-06-18 15:57:27 +02:00
Dongjia "toka" Zhang
b6bb604c71
Fix sync stage (#2326)
* f

* a

---------

Co-authored-by: Skynet 2 <name@domain.example>
2024-06-18 15:32:24 +02:00
Romain Malmain
fa17f47115
Tree-shaped multi-machine fuzzing (#2302)
* tree-shaped multi-machine fuzzing

* forgot main file

* aaa

* moving things around

* fix

* working?

* remove debug panic

* aaa

* aaa

* fmt

* normal centralized adapted

* removed old useless code

* cleanup

* llmp hooks

* working multi machine apparently?

* aaa

* cleanup (#2305)

* added old message dispatch.
thread safety stuff

* testing things around

* opti opti opti

* :)

* fuzz

* limit the amound received at once to avoid congestion

* remove useless corpus
mv to sqlite
less warnings

* aaa

* ;

* big opti

* adding cfgs

* fix

* fixer

* fix

* s

* clippy and reduce generics

* debugging

* fix

* more robust disconnection

* aaa

* aaa

* aaa

* nostd

* more nostd

* clippy

* not in ci

* unused

* aaa

* doc

* clippy

* clippy

* clippy

* no crash in libpng

* aaa

* aaa

* aaa

* aaa

* graph generator

* fix

* fix

* windows fix all

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2024-06-17 23:23:01 +02:00
学儿思
c9cf8af14d
Fix typos (#2320) 2024-06-17 16:27:32 +01:00
df7333b764 WIP: merge 2024-06-17 14:17:06 +02:00
Valentin Huber
5a2652b984
Adding StdXObserver Docs (#2311)
* Adding StdXObserver Docs

* fixing docs

* code cleanup

* moving example

* improving exclusion rules

* adding impls for features

* adding test exclusions

* excluding miri from OS including tests

* fixing CI

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2024-06-14 19:41:21 +02:00
Dongjia "toka" Zhang
c3930b39fc
Fix CI (#2312) 2024-06-14 14:16:31 +02:00
lazymio
18a25d3b3d
Fix debug assert on map_state.num_covered_map_indexes (#2310) 2024-06-14 13:29:38 +02:00
Dongjia "toka" Zhang
c415b4d5f6
0.13.0 (#2253)
* 0.13

* z3

* capstone

* fixer

---------

Co-authored-by: Dominik Maier <domenukk@gmail.com>
2024-06-13 23:35:35 +02:00
clesmian
2265d672fc
Allow trailing comma in feedback macros (#2308)
Co-authored-by: Leon Weiß <leon.weiss@rub.de>
2024-06-13 23:35:20 +02:00
Dongjia "toka" Zhang
e12412fed6
Fix Stdout/err Observer? (#2301) 2024-06-13 13:33:36 +02:00
Aarnav
901572556f
Add support for cycling PowerSchedule on completion of a queue cycle in WeightedScheduler (#2300)
* add support for cycling PowerSchedule on completion of a queue cycle in WeightedScheduler

* improve doc

* make fn cycle_schedule private

* rename cycle_schedules to cycling_scheduler
2024-06-13 10:25:25 +01:00
Dongjia "toka" Zhang
f4699ba385
Make adaptive serialization into default (#2296)
* no adaptive

* add another api

* allow unused
2024-06-09 00:10:30 +02:00
Dongjia "toka" Zhang
454176427b
Windows clippy (#2295)
* add

* real one

* fuck

* abc

* def

* ghi

* jkl

* fix

---------

Co-authored-by: Romain Malmain <romain.malmain@pm.me>
2024-06-08 20:32:40 +02:00
Dominik Maier
93085782d6
Rename string stages to unicode stages for consistency (#2293) 2024-06-08 16:59:49 +01:00
Dongjia "toka" Zhang
30ae963c45
Fix CI (#2292)
* p

* a

* p

* a

* delete transfered

* b

* bring back transferred

* ??

* xx

* conditional

* ?

* debug

* a

* 🤬🤬🤬🤬🤬🤬🤬

* a

* a

* comment
2024-06-08 16:25:49 +01:00
Dominik Maier
ba84170777
Fix docs on crates.io for LibAFL_Frida, introduce auto-download feature (#2270)
* Fix docs on crates.io for LibAFL_Frida, introduce auto-download feature

* remove it more

* more testing

* more features

* more CI

* CI?

* CI?

* More fix?

* nicer

* More fix?

* test?

* more try?

* why?

* more more
2024-06-08 13:02:59 +01:00
Aarnav
477941e0e2
change Stability calculation formla to AFL++'s (#2275)
* change Stability calculation formla to AFL++'s

* clippy

* use MapFeedbackMetadata instead of recalculating filled entries in map

* calculate filled entries if MapFeedbackMetadata is not available

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2024-06-07 14:56:37 +02:00
Dongjia "toka" Zhang
2cc33464fa
Cleanup for #2280 (#2286)
* cleanup

* ppppp

* a

* b
2024-06-07 14:56:14 +02:00
Dongjia "toka" Zhang
1b008ae2e4
Delete 'static from libafl::events (#2285) 2024-06-07 13:45:36 +02:00
Aarnav
a455ad27a9
Fix WeightedScheduler reporting incorrect queue cylces (#2281)
* fix WeightedScheduler reporting incorrect queue cylces

* check if runs_in_cycle equals or greater instead of just equals

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2024-06-06 18:50:29 +01:00
Romain Malmain
af12b4ba24
LLmp hooks (#2280)
* llmp hooks

* separate llmp broker from inner state to allow doing more stuff
2024-06-06 16:07:55 +02:00
Romain Malmain
399fbccea2
Closure builder for inner managers of centralized. (#2279)
* generic inner manager for centralized, with builder closures.

* moved options inside the function

* removed useless bound

* unused import

* remove useless clone bound.

* make clearer what is secondary node

* same inner manager for main and secondary

* fix example
2024-06-05 19:12:21 +02:00
Aarnav
7dd345d18c
Enforce max_input_size and min_input_size in Forkserver (#2273)
* enforce minimum and maximum input size for Forkserver's shared memory map and file based testcases

* explicit conversion to OwnedSlice

* clippy

* error if min_input_size > max_input_size when building forkserver
2024-06-05 16:16:30 +02:00
Dongjia "toka" Zhang
6373a1e1b3
Use Self::State as much as possible and remove unnecessary type bounds (#2263)
* use Self::State as much as possible

* makeing progress, little by little

* more

* add

* more and more

* more

* more

* mre

* fix

* a

* pp

* fix

* fix

* more

* version

* fix cargo fuzz
2024-06-05 15:16:43 +02:00
Dongjia "toka" Zhang
a7bb5196ea
Revert "Revert "Add always_interesting option to llmp mgr (#2262)" (#2274)" (#2278)
This reverts commit 620835a73f4a1163177d2b11b61625177c737cd5.
2024-06-05 15:10:32 +02:00
Dongjia "toka" Zhang
620835a73f
Revert "Add always_interesting option to llmp mgr (#2262)" (#2274)
This reverts commit 0f9c82f893b0bb8e91b78c5c17f8d1c8d452669e.
2024-06-04 18:53:01 +02:00