1078 Commits

Author SHA1 Message Date
894c11935f display stats 2024-10-30 15:27:48 +01:00
013f3db487 implement STGSnippetStage, fix missing metadata 2024-10-29 14:07:52 +01:00
9d83ddbd69 low prio warnings-- 2024-08-26 15:18:46 +02:00
f14d486ccf skip mutation of 0 size inputs 2024-08-26 15:10:12 +02:00
3b6cd3bc45 fix bug causing skipped mutation when part size is 0 2024-08-15 09:38:52 +02: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
Dominik Maier
1556cba426
Update ratatui to 0.26 (#2269)
* Update ratatui to 0.26

* more build infos

* fix introspection
2024-06-03 15:23:12 +02:00
Dominik Maier
58c39680c9
Move Nautilus to LibAFL, remove AGPL dependencies (#2265)
* Copy choose method for unbounded iterators

* Add choose method for unbounded iterators

* Copy&paste in nautilus grammartec

* cargo

* fmt

* Initial Nautilus in LibAFL

* missing link

* clippy

* clippy

* more clippy

* docs

* docs

* more docs

* remove nautilus default

* fix doctest

* fmt

* less vec

* test

* less flakey

* clippy

* clippy
2024-06-03 14:18:52 +02:00
Dongjia "toka" Zhang
0f9c82f893
Add always_interesting option to llmp mgr (#2262)
* always add

* change launcher...
2024-05-31 15:18:51 +02:00
Aarnav
7b90873305
introduce CustomFilenameToTestcaseFeedback (#2256)
* introduce CustomTestcaseFilenameFeedback

* rename CustomTestcaseFilenameFeedback to CustomFilenameToTestcaseFeedback

* rename custom_testcase_filename to custom_filename

---------

Co-authored-by: Romain Malmain <romain.malmain@pm.me>
2024-05-30 19:05:53 +02:00
Dongjia "toka" Zhang
e912216a37
Add remove_from_all method to Corpus trait (#2259)
* add remove_from_all

* a

* a

* aaaaaaa

* make remove_from_all to remove
2024-05-30 11:53:32 +02:00
Dominik Maier
c3f67daefb
Fix nix update (#2252) (#2255) 2024-05-28 13:16:09 +02:00
Aarnav
bce0f08294
Introduce feedbacks hit tracking for testcases (#2248)
* introduce feedbacks hit tracking for testcases

* make Testcase::hit_feedbacks into Cow<&str> instead of String
rename get_hit_feedbacks to append_hit_feedbacks
update documentation

* simplify ConstFeedback

* rename Feedback::last_result to prev_result

* impl TODO prev_result for NewHashFeedback, ListFeedback, TransferredFeedback, NautilusFeedback

* rename prev_result to last_result

* add docs

* introduce Objectives hit tracking

* update docs

* update Cargo.toml docs

* update docs

* track Feedbacks & Objectives hit in Fuzzer::add_input

* fmt

* clippy

* fix type error in OomFeedback::last_result

* impl last_result for AsanErrorsFeedback

* add track_hit_feedbacks as a feature to libafl_libfuzzer_runtime

* fix clippy

* change return type of Feedback::last_result to a Result

* remove expect in NewHashFeedback::is_interesting

* move Error::premature_last_result to libafl from libafl_bolts
2024-05-28 11:43:05 +02:00
dependabot[bot]
e4446b908c
Update nix requirement from 0.27 to 0.29 (#2252)
---
updated-dependencies:
- dependency-name: nix
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-28 11:42:46 +02:00
Valentin Huber
7c9bd1157c
Adding DiffExitKindFeedback (#2246)
* adding DiffExitKindFeedback

* refactoring

* fixing CI
2024-05-24 16:12:32 +02:00
Dongjia "toka" Zhang
e6eb6c48d2
LibAFL Dynamic Analysis (#2208)
* aa

* push

* push

* push

* claude ai

* push

* add

* add stuff

* upd

* rdm

* fix

* ci

* fix

* fix

* fixing

* feature

* revert

* no submodules

* ci
2024-05-24 14:43:27 +02:00
Dominik Maier
1fafaf6454
Make every Builder ::builder(), so BobTheBuilder::new() becomes BobThe::builder() (#2242)
* Make every builder ::builder()

* Fix no_std

* More

* Fix clippy, stuff

* More fun

* Make NopShMem do something

* Alloc

* more fmt

* Remove UB in tinyinst executor builder

* Make builder order not matter for tinyinst

* More better

* fix

* docs

* fmt

* more fmt

* clippy

* fix fixes

* tiny thing

* more betterg

* more more

* more builder

* more builder

* more nyx

* undo breaking clippy

* clip
2024-05-23 18:56:39 +02:00
Dominik Maier
b97a9a1398
Rename peek_next_free_id to peek_free_id (that it's the next is obvious) (#2243) 2024-05-23 15:44:32 +02:00
Dominik Maier
e317ad045e
Introduce StageId (extends #2201) (#2239)
* Factor out `StageStack` from `StdState`

Refactoring for the sake of abstraction and maintainability.

Previously, the `stage_idx_stack` and `stage_depth` fields of
`StdState` had an implicit relationship to one another. This commit
reifies this relationship into a new `struct`. Its fields are hidden
from everything else in `StdState`. It `impl`s `HasCurrentStage` and
`HasNestedStageStatus`, which `impl`s now no longer have mutable access
to the whole state. The `impl`s for `StdState` just forward to these
ones.

Hopefully, this refactoring would make it easier to `impl State` for
other types in the future.

* Create `StageIdx` newtype

Like `CorpusId`, this is just a thin wrapper around `usize`.

* unused import

* Rename a few functions to be more about indices

* Rename Index to Id, fmt

* Move StageId around

---------

Co-authored-by: Langston Barrett <langston.barrett@gmail.com>
2024-05-23 00:53:26 +02:00
bde16f8297 scheduler, mutator changes 2024-05-22 21:54:07 +02:00
Aarnav
1ed1c4eb31
Add peek function to Corpus (#2238)
* add peek function to Corpus

* send 0 as next peek in NopCorpus

* rename peek to peek_next_free_id

* fix clippy

* add peek_next_free_id to libafl_libfuzzer

* impl peek_next_free_id for ArtifactCorpus
2024-05-22 13:30:47 +02:00
Dongjia "toka" Zhang
336d7fcc4f
Refactor events/llmp.rs (#2234)
* push

* refactor

* FMT

* fixes

* aaaaaa

* done

* aa

* docdoc

* rename

* no std

* nautilus

* feature fix

* aa

---------

Co-authored-by: Your Name <you@example.com>
2024-05-22 12:58:44 +02:00
Dominik Maier
684b31279e
Add BytesSubInput to mutate sub-parts of a bytes-backed input (#2220)
* Add BytesSubMutator that allows us to mutate sub-parts of a bytes-backed input

* no_std

* fix string mutator

* make build

* Fix clippy on macOS

* Docs

* More docs

* Better docs

* --amend

* Renamed bsi to sub_input. Too much BSI

* More more

* balance backticks

* Make splicing usable with sub_input (not that it makes sense)

* More annotations

* more input annotations?

* Implement HasMutatorBytes for &mut Vec

* clippy

* Use a wrapper type instead

* Add wrapper type for Vec as well

* Remove the duplicate BytesInput... lol
2024-05-22 01:50:07 +02:00
Dongjia "toka" Zhang
19ef29ed60
New forkserver (#2213)
* step 1

* done

* cmplog?

* targets

* check if working and add env_logger

* typo
2024-05-21 15:20:28 +02:00
Valentin Huber
b7e10ca7af
Making StdOutObserver and StdErrObserver implement Observer (#2236)
* making stdout and stderr observers implement observer

* fixing imports
2024-05-21 13:19:02 +02:00
Dominik Maier
123f508fcc
Clean up samplig_rate, add docs (#2228)
* Clean up samplig_rate, add docs

* clippy
2024-05-20 14:24:24 +02:00
s1341
864c2259e7
launcher: add launch_delay option (#2227)
* launcher: add launch_delay option

* Centralized too

* Use in test

* Undo

* Windows too

* Format

* Fix cfg guard
2024-05-20 10:06:33 +03:00
s1341
f324c60b02
Add testcase sampling rate (#2226)
* fuzzer: Add with_sampling_rate

* Format

* Fix clippy
2024-05-20 09:34:31 +03:00