1232 Commits

Author SHA1 Message Date
Aarnav
d6fe67c3c8
Introduce multicore loading for the initial seed corpus (#1905)
* introduce multicore load initial corpus

* update fuzzers/libfuzzer_libpng_norestart to use multicore corpus loading

* run clippy

* use CoreId and Cores in state if std

* misc. typos

* adapt multicore load initial inputs to allow resumable corpus loading
in case of crashes or timeouts during corpus loading.

* add std feature flag to multicore_inputs_processed

* fix doc comment

* run fmt for example fuzzer

---------

Co-authored-by: aarnav <aarnav@srlabs.de>
Co-authored-by: Romain Malmain <romain.malmain@pm.me>
Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2024-03-08 02:56:08 +01:00
Dongjia "toka" Zhang
1b9f4ea29c
Fix batched timeout (#1920)
* fix ptr

* fix ptr

* fix

* One less windows warning

* One less windows warning
2024-03-07 23:52:56 +01:00
Romain Malmain
781e830923
fix cast to c_void of the wrong object. (#1921) 2024-03-07 21:28:28 +01:00
Mrmaxmeier
6747a7dc2f
token mutations: avoid a few infallible unwraps (#1919) 2024-03-07 18:26:59 +01:00
Dongjia "toka" Zhang
969aa12c7e
aa (#1913) 2024-03-06 19:05:32 +01:00
Romain Malmain
3b3e2f6efa
Improve readability of InProcessExecutor-related code (#1912)
* inital commit.

* clippy

* tests

* clippy

* adapt example

* systemmode.

* renaming

* fmt

* fix lints.

* more lint fix.

* even more lint fixes.

* always more lint fixes.

* lint fix.

* allow unused qualifications for crate when it could be confusing.

* Still lint fixes.

* Lint fixes on generated code.

* Some lint fixes.

* renamed modules as well.

* Separated inner from InProcessExecutor.

* fix

* unused import

* unused import

* fix import

* fix import
2024-03-06 00:30:35 +01:00
Romain Malmain
55a300d508
Make executor state available to the harness V2 (#1900)
* inital commit.

* clippy

* tests

* clippy

* adapt example

* systemmode.

* renaming

* fmt

* fix lints.

* more lint fix.

* even more lint fixes.

* always more lint fixes.

* lint fix.

* allow unused qualifications for crate when it could be confusing.

* Still lint fixes.

* Lint fixes on generated code.

* Some lint fixes.

* renamed modules as well.
2024-03-05 19:28:46 +01:00
Dan Blackwell
cd8003ee69
Fix for #1881, ProbabilitySamplingScheduler seems to be inverted (#1884)
* Fix for #1881, ProbabilitySamplingScheduler seems to be inverted

* Run 'cargo +nightly fmt'

* Added debug_assert as negative and infinite probability values would break the current implementation of next()

---------

Co-authored-by: Dan Blackwell <danblackwell@eduroam-int-dhcp-97-192-218.ucl.ac.uk>
Co-authored-by: Dan Blackwell <danblackwell@ML-W0NYVW4XCK.local>
Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2024-03-05 19:04:13 +01:00
Dongjia "toka" Zhang
e3f837d712
Fix inconsistent settings of client_timeout (#1897)
* a

* fix client timeout

* revert

* more

* std

* import

* import

* sdt

* FMT

* backtick again
2024-03-05 17:58:44 +01:00
Dongjia "toka" Zhang
1a0e692f33
Print PID when you create a new Llmp Sender. (#1898)
* aaaa

* FMT

* adding std
2024-03-05 16:02:47 +01:00
Dongjia "toka" Zhang
95bed5b016
Fix the centralize disconnection bug. (#1896)
* fixing the first bug

* backtick
2024-03-05 15:49:35 +01:00
Romain Malmain
d96a1426d5
Fix lint errors (#1909)
* fix lints.

* more lint fix.

* even more lint fixes.

* always more lint fixes.

* lint fix.

* allow unused qualifications for crate when it could be confusing.

* Still lint fixes.

* Lint fixes on generated code.

* Some lint fixes.
2024-03-05 14:16:26 +01:00
Dominik Maier
b7efe8eb7d
Implement MutatorTuple for Vecs to allow Dynamic Mutator Choices (#1893)
* Implement MutatorTuple for Vecs to allow Dynamic Mutator Choices

* fix test

* clippy

* Move into_vec to extra trait

* fix no_std

* more nostd

* no_std
2024-03-04 22:48:38 +01:00
Addison Crump
f3c37db2b7
TransferFeedback for determining if a testcase was from another node (#1906)
* impl TransferFeedback

* whoops, fix build

* fix doc

* fix build for tcp manager

* fix fr
2024-03-04 15:33:46 +01:00
Dongjia "toka" Zhang
1a41e65a5b
Sancov based ngram & ctx implementation (#1864)
* ngram

* ctx

* push stuff

* passing cargo check

* save stuf

* add

* no default

* fuzzbench ready

* formatt

* aaaaaaaa

* adaptive map

* add all

* chg

* fix

* deleting stuff

* fmt

* clang18

* fuck

* save space

* fix?

* feature name

* fucking nightly only

* harness

* fix libafl_cc

---------

Co-authored-by: Dominik Maier <domenukk@gmail.com>
2024-03-01 13:59:13 +01:00
Addison Crump
8c773a6b85
Implement RetryProgress for limiting retry attempts in stages (#1890)
* do that again but smarter

* remember to register

* appease the clippy

* cleanup

* autofix clippy

* more clippy fixes

* more clippy...

* small clippy fix

* with_tries => with_retries

* most recent suggestions

* final clippy... hopefully
2024-02-28 14:12:28 +01:00
Addison Crump
7a4fb06d02
make nopstate public so that it can be used as reproducer (#1888) 2024-02-27 16:48:08 +01:00
Dongjia "toka" Zhang
19f5081bd8
Add several warnings when starting forkserver (#1877) 2024-02-22 14:58:51 +01:00
Dongjia "toka" Zhang
2bfe91e4bd
Fix a corner case where bitmap_size = 0 leads to panic (#1875) 2024-02-19 22:42:44 +01:00
Dominik Maier
263af87652
Less useless allocs for monitor display (#1874)
* Less useless allocs for monitor display

* More less String

* Lol who needs generics

* clippy

* remove &String
2024-02-19 21:15:11 +01:00
w1tcher
f48e281be8
Fix TuiUI deadlock under multi-threading (#1871)
Co-authored-by: Dominik Maier <domenukk@gmail.com>
2024-02-19 17:20:08 +01:00
sadeli413
ef16e645b7
Support raw byte grammar in NautilusContext (#1868)
* Support raw byte grammar in NautilusContext

* Add `use` statement in doc comment
2024-02-19 16:46:28 +01:00
Dominik Maier
fafe8f5ce8
Fixing clippy some more (#1872)
* Fixing clippy some more

* more commit

* Git gud

* remove more useless imports
2024-02-19 16:46:06 +01:00
Dominik Maier
0a995f241c
Cleanup Pointer Clippy Lints (#1861)
* Fix pointer clippy lints

* More clippy

* fix build

* fix
2024-02-15 16:31:18 +01:00
Dongjia "toka" Zhang
db88412738
Make cmp_extend_encoding panic-less (#1857)
* Add a panic check for aflpp

* aa

---------

Co-authored-by: novafacing <rowanbhart@gmail.com>
2024-02-14 11:46:09 +01:00
tbethe
b9650045f6
Getter for mutable reference to forkserver (#1849)
* Getter for mutable reference to forkserver

* Whoops

---------

Co-authored-by: Timme Bethe <git@timmebethe.nl>
Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2024-02-13 16:10:26 +01:00
Dongjia "toka" Zhang
cefb73861f
Fix token mutation crash (#1855)
* clippy

* token mutation fix
2024-02-13 16:10:02 +01:00
Dongjia "toka" Zhang
973c4358e6
clippy (#1851) 2024-02-13 13:19:00 +01:00
Dominik Maier
dede78159c
Remove unused shmem structs, update Nix (#1845)
* Remove unused shmem structs

* More unused stuff

* Unified crate versions, updated docker rust version

* clean up nix 27 mess?

* Windows?

* Fix frida

* Fix frida

* fix fuzzers with nix
2024-02-11 17:45:09 +01:00
Romain Malmain
9b82af4539
Configurable LLMP client timeout (#1838)
* LLMP client timeout is now configurable.

* fix example.

* Fix for no-std case.
Make default timeout private.

* Fix import.
2024-02-06 18:35:27 +01:00
Addison Crump
c3473e5631
use truncate, not pop (#1837) 2024-02-05 20:48:17 +01:00
Addison Crump
054d0a6b19
OptionalStage is a nested stage, fix stage ID handling (#1836) 2024-02-05 17:51:01 +01:00
Dongjia "toka" Zhang
a4f753b0f0
Merge TimeoutForkserverExecutor into ForkserverExecutor (#1819)
* delete timeout forkserver

* clippies

* name

---------

Co-authored-by: Dominik Maier <domenukk@gmail.com>
2024-01-30 17:34:39 +01:00
Dominik Maier
244c6b0da5
QEMU: Fix injections build for hexagon, disable on system mode (#1821)
* Fix CI for Clippy, QEMU

* Clippy, fixes for system mode

* clippy

* clippy

* fixing new clippy
2024-01-30 04:25:14 +01:00
Harrison Green
e117b7199c
Allow testcase removal during fuzz loop (#1717) 2024-01-24 17:56:24 +01:00
Dominik Maier
6a0ba7b647
Add SimpleMgr feature to qemu_launcher (#1790) 2024-01-24 17:54:52 +01:00
Dominik Maier
0cb7b25f39
Replace static borrows with addr_of!, rust 2024 compatibility (#1800)
* Less UB

* fmt

* fix warning

* clippy fixes

* addr_of_mut allthethings

* removed duplicate import

* fix imports

* remove comment

* more windows

* fmt

* fix tests

* fixes

* qemu

* fix more cases, qemu

* fix

* fmt
2024-01-24 17:47:55 +01:00
Dongjia "toka" Zhang
bb443027f7
Observer fix (#1807)
* fix

* Increase default edgemap size for libafl_cc and libafl_targets (#1798)

* fmt

---------

Co-authored-by: Dominik Maier <dmnk@google.com>
2024-01-24 03:30:22 +01:00
Dongjia "toka" Zhang
2ac154d473
Refactor InProcessExecutor, merge timeout executors (#1789)
* move windows, inprocess fork to a different file, try new hook mechanism for the executor

* fix

* even more

* more

* more

* fix

* fix

* macosgit add -ugit add -u

* windows!

* windows!

* aa

* aa

* macos

* std

* wtf unresolved?

* Copy, Clone

* why you just don't have the same API!

* inproc

* next; inprocess

* windows?

* ci

* ci

* ci

* unused

* ci

* unused

* no_std

* windows no std

* fix

* inprocess

* fix

* windows

* fuzzers

* macos , book

* fix

* aa

* allow

* fix

* stop suggesting wrong lint AAAAAAAAAAAAAAAAA!!!

* stop suggesting wrong lint AAAAAAAAAAAAAAAAA!!!

* win

* fix

* wip

* wip2

* windows done?

* remove TimeoutExecutor

* ci

* ci

* miri

* fixfi

* compile on windows

* a

* clp

* no_std stuff

* windows no_std

* mac stuff

* m

* a

* ci

* ci

* deleting timeoutexecutor, gradually

* fucking macos

* ci

* test

* ci

* ci

* batch mode constructor

* fix

* ci

* aa

* miri

* aaa

* tmate again

* fix windows stuff

* final fix

* another win fix

* add

* let's add the new fix later

* more

* fi

* parse

* win clippy

* win no std

* safety

* fix

* DEFAULT

* final fix

* libafl_libfuzzer

* comments

* fix

* fix fuzzres

* fixxxxx

* fixxxxx

* last fix

* change name
2024-01-23 22:35:14 +01:00
Josef Haider
058d2c0825
Remove unnecessary PartialEq trait constraint on DiffFeedback observers (#1811) 2024-01-22 20:23:32 +01:00
expend20
72c862171e
POC attempt to make cmplog work on x64 (#1713)
* POC attempt to make cmplog work on x64

windows POC seems working

unix POC seems working :)

* no register collisions
* rsp-related ref support

iced optional dep

iced depends on cmplog

warnings

one more warning

comments cleanup

ci unbreak

rebase windows unbreak

rebase unix unbreak

unix only

fmt check

clang formatting

clang formatting again

make clippy happy

formatting

double import

windows unbreak

hashmap is conditional

leftover definition

tutorial related formatter

review fixes

comments

.asm fuzz targets for cmplog on Windows

more tests

rip-relative reference support without index register form

proper ignore rip-related references and ignore 8 bit comparisons

another try_into packing

* harness modification reverted

* dummy commit to restart CI

* review comments

---------

Co-authored-by: sbarsky <sbarsky@denuvo.com>
Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
2024-01-19 11:52:15 +01:00
Andrea Fioraldi
aaeeead574
Remove Aggregated label in stats (#1788)
* Remove Aggregated label in stats

* introspection

* fix monitor aggregate propagation
2024-01-10 21:05:19 +01:00
van Hauser
0f2cf80085
libafl_qemu injections (#1743)
* nits

* first steps

* different approach

* fixes

* remove temps

* remove temp

* initial import

* more tests

* bug hunt

* cleanup

* yaml function target 0x.... support

* final

* update doc

* other work

* Clippy, fmt

* Removed lazystatic dependency

* More small cleanups

* optimize to_lowercase

* move funtionality to libafl_qemu

* add missing file

* ready

* remove qemu_injections

* move test files to test directory

* doc update

* add todos

* fixes

* add file comment

* add test and other platform support

* fix clippy

* Replace Emulator::new_empty by Emulator::get.
Fix visibility identifier.

* clippy

* let's try this

* cpu_target?

* fmt

* cleanup build system, enable missing fuzzers

* fix qemu_launcher

* enable hexagon in qemu_launcher

* Removed useless `any` predicate in cfg attribute.
Replaced wrong types in `syscall_hook` signature.

* format

* move to read_function_argument

* add hexagon injections support

* enable injections fuzzing everywhere

* unify error msg

* Fix build, add initial toml support

* intermediate push, wip

* fix build

* More WIP

* Fix build

* Clippy

* fix qemu

* Fix arm

* fix more wrong things

* fix testcase

* try to fix it again?

* more release?

* make makefile independent of dev/release

* trying more fix?

* More ugly more works

* more trying to fix the testcase

* allow yml as filename too

* more docs

---------

Co-authored-by: Dominik Maier <dmnk@google.com>
Co-authored-by: Romain Malmain <romain.malmain@pm.me>
Co-authored-by: Dominik Maier <domenukk@gmail.com>
2024-01-09 19:56:19 +01:00
Addison Crump
ba8ca6723b
Resumable stages redux (#1780)
* initial stage refactor

* repair test

* redqueen

* fixup python bindings

* docs and clippy fixes

* misc hidden changes

* Status => Progress

* fix remaining fuzzers

* fix libafl_libfuzzer

* implement resume for nested stages

* deep testing for stage resumeability

* refactor: use let-else, docfix

* refactor in fuzzbench_forkserver_cmplog

* fmt

* actually use progress

* HasStageStatus => HasCurrentStage
2024-01-09 15:18:14 +01:00
Dongjia "toka" Zhang
3d126f21cc
aggregator fixer (#1783) 2024-01-08 19:36:41 +01:00
Addison Crump
99fd69acdc
Multipart Input support (#1617)
* initial commit: multipart

* document + wrap up baby fuzzer

* oops

* core

* add from method, option to iter

* improve example; use minmap; fix initial_mut

* bindings

* clippy, again

* moar clippy

* fmt

* drop rand dep because we don't need it, actually

* docfix

* ok actually fix docs pls
2024-01-04 01:51:29 +01:00
Dongjia "toka" Zhang
75fcd47044
Recover useful CmpLog updates from #1630 (#1684)
* add

* ci

* wip

* make type name more clear

* last

* add

* more fix

* chg

* fmt

* save changes

* fix_handler

* cfg

* win

* fix

* toml

* f

* more

* fix all the stuff

* fix

* revert fuzzers/fuzzbench to origin/main
2024-01-03 23:44:32 +01:00
Dongjia "toka" Zhang
8164bfca96
Fix sigint handlers (#1772)
* fix_handler

* cfg

* win

* fix

* toml

* f

* more

* rename and write_volatile
2024-01-04 04:57:41 +09:00
Dominik Maier
a07563def0
Add mute_inprocess_target fn, SimpleFdLogger::set_logger, and more (#1754)
* Add mute_inprocess_target fn, SimpleFdLogger::set_logger, set_error_print_panic_hook

* Trying to fix #1753

* typo

* More fix

* Fix test?

* more testcase fixes
2024-01-01 23:14:59 +01:00
Dongjia "toka" Zhang
2717018601
Dedup common code in scheduler (#1702)
* dedup common code in scheduler

* del eco

* fixing

* fix
2024-01-01 18:22:03 +01:00