815 Commits

Author SHA1 Message Date
Andrea Fioraldi
00033426e7
Bump to 0.11.1 (#1491) 2023-08-31 15:07:31 +02:00
Rowan Hart
bca14c041b
Update from unmaintained tui-rs to ratatui (#1488) 2023-08-31 02:02:36 +02:00
Dominik Maier
81bdbc0dde
Fix TuneableMutationalStage _std function generics (#1486) 2023-08-30 00:57:10 +02:00
Dominik Maier
5710c8b28a
Document LIBAFL_DEBUG_OUTPUT in Launcher (#1485)
* Document LIBAFL_DEBUG_OUTPUT in Launcher

* fmt

* more doc

* fork

* unix
2023-08-30 00:00:12 +02:00
Dominik Maier
61ad4a6ee8
bolts: Make xxh3 hashing optional with xxh3 feature flag (else use ahash for everything) (#1478)
* Make xxh3 hashing optional (and default to ahash)

* make xxh3 default anyway

* move import

* fix no_alloc

* No ahash without alloc

* fix import

* Keep xxh3 as default for libafl as well

* no randomness for xoshiro
2023-08-29 16:22:46 +02:00
Andrea Fioraldi
638d315b57
Add readmes (#1476)
* Add readmes

* fix docker
2023-08-29 14:51:55 +02:00
lenawanel
f3a4f4f664
Remove unneeded loop in SpliceMutator::mutate (#1471)
previously we searched for the first and the last difference
between exactly the same 2 inputs 3 times in a loop

Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
2023-08-29 13:30:29 +02:00
Dominik Maier
7d2c854b71
Introduce document-features feature (#1477) 2023-08-29 12:40:35 +02:00
Andrea Fioraldi
062ae9d544
Fix doc for publish (#1472)
* Fix doc for publish

* add bolts to publish.sh
2023-08-28 17:22:44 +02:00
Andrea Fioraldi
7dd7c1a485
Bump to 0.11.0 (#1469)
Co-authored-by: Dominik Maier <domenukk@gmail.com>
2023-08-28 15:36:43 +02:00
Dominik Maier
b45985c76b
Less pub in LLMP (#1470)
* Less pub in LLMP

* add mut to docstring

* fix eample
2023-08-28 13:18:58 +02:00
lenawanel
6a2d6fa66d
fix some docs and use slice::fill instead of manual implementation (#1467)
* update documentation of `MinimizerScheduler`

(convert a few references to types into doc links and update the docs of `on_remove`)

* replace manual implementation of `slice::fill`

the in the code comment linked stackoverflow comment https://stackoverflow.com/a/51732799/1345238/
now mentions `slice::fill`
it seems to compile to the same thing as the old version https://rust.godbolt.org/z/98Y4x97vY

* fix docs for the `*InterestingMutator`s and `*ByteAddMutator`s

the macros didn't previously docs gens didn't previously
 generate fitting docs
2023-08-27 23:11:44 +02:00
Rowan Hart
8d8fcdd8db
Add generic cmp observer metadata, rename cmp observers, fix cmplogmap reset (#1461)
* Make cmp metadata generic, rename ForkserverCmpObservers with more accurate names

* Fix zeroed assignment in cmplogmap

* Dont use prelude in libafl_targets

* Make _mut functions actually return mut references

* Fix fuzzbench forkserver build

* Add type alias for easier construction of the standard cmp observer and add aux data accessors
2023-08-26 09:54:31 +02:00
Andrea Fioraldi
760edbf0d2
Fix forward_id stats for the centralized manager (#1454)
* Fix forward_id stats for the centralized manager

* Fix stats bug
2023-08-25 14:23:25 +02:00
Dominik Maier
f7c94f9a85
Create _std public methods on TunableMutationalStage (#1458)
* Create _std public methods on TunableMutationalStage

* No tunafish
2023-08-24 16:05:30 +02:00
Dominik Maier
9208531951
Move from intervalltree to meminterval dep (#1456)
* Move from intervalltree to meminterval dep

* fixes
2023-08-24 14:15:24 +02:00
Addison Crump
862de53cf6
Full libfuzzer shimming (for cargo-fuzz libfuzzer alternative and other use cases) (#981)
* squash libfuzzer edits

* fixup: compat with custom mutators

* use tui flag

* add introspection support

* use libfuzzer dep now that we've merged

* force input loading

* some fixes

* begin docs, impl shrink

* make whole-archive conditional and not default

* make more copies of counters maps

* lol, remember to add the observer

* make size edge map observer an observer

* fixup: make def of run driver conditional

* add sanity checks for insertion

* revert silencing of forks

* add experimental tmin support; add default asan flags

* use default options instead of specifying our own

* implement lockless mode

* fix merge

* fixup lockless corpus

* fixup for generalisation

* remove erroneous drop_in_place

* improve error logging in the case of corpus loading failure

* ok, use lock files 😔

* fix tmin

* implement merge (again); fix rare cases with maps being too small

* implement a scheduler for removing excess

* implement a walking strategy for corpus loading for large corpora

* revert filename parameter; rename and remove duplicates

* various cleanup and clippy satisfaction

* fix no_std tests

* clang-format

* expand and satisfy the clippy gods

* fix sanitizer_ifaces bindgen for no_std

* fix wasm fuzzer

* fixup clippy script

* rename and provide a small amount of explanation for sanitizer_interfaces

* fixup: HasLastReportTime

* fix clippy oddities

* restrict clippy checks to linux-only for libafl_libfuzzer_runtime

* name the mutators

* format

* fix clippy warning

* hope docker is fixed

* fix cmin lint

* clippy pass

* more docs

* more clippy

* fix remaining clippy complaints

* fix import

* miri fixes (no constructors executed)

* exclude libafl_libfuzzer from cargo-hack

* fix clippy check for sanitizer_interfaces

* fmt

* fix CI (?)

* deduplicate sancov 8bit for improved perf on ASAN

* merge 8bit coverage regions + comment out insane deduplication

* no erroring out on free hooks

* fixup for non-forking merge

* skip the corpus dir if we use it

* fixup: recent libafl changes and feature flags

* libafl_libfuzzer: use rust-lld for whole-archive feature

* clarify cause of failure

* mark unsafe

* clippy :cursed_cowboy:

* attempt to fix wasm

* spooky unknowable bug 👻

* more clippy lints

* clippy fix for merge

* use the version pin

* add unsafe to ::register

* Serdeany autoreg fix

* make type assert actionable

* miri fixes

---------

Co-authored-by: Dominik Maier <domenukk@gmail.com>
Co-authored-by: Dominik Maier <dmnk@google.com>
Co-authored-by: Mrmaxmeier <Mrmaxmeier@gmail.com>
2023-08-24 13:30:23 +02:00
Dominik Maier
f68fe95f09
Document features (#1453)
* Document features

* Fix doctest

* remove link

* <<<<head

* Fix doc links
2023-08-24 13:27:37 +02:00
Dominik Maier
e89e8dbaab
Remove dependencies, add doc.rs metadata (#1450)
* Remove dependency, add doc.rs metadata

* remove lazy_static

* even less lazy_static

* serial_test no default
2023-08-24 11:34:38 +02:00
lazymio
c84c105fb9
Allow setting max iterations for stages (#1436)
* Allow setting the max iterations

* Rename API

* Fix baby_fuzzer_grimoire

* Relax bound

* Also add a new API for transforming

* Revert back grimoire fix

* Revert bound relax
2023-08-24 09:59:11 +02:00
lazymio
20cee8cd33
Allow multiple tuneable mutational stages (#1437)
* Allow multiple tuneable mutational stages

* Fix for default name

* Fix import

* Format code

* Standalone trait bounds

* Minor fix

* Add _with_name API

* Format code

---------

Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
2023-08-24 09:58:23 +02:00
Dominik Maier
2f840ef92d
Windows dependency upgrade (#1448)
* Windows dependency upgrade

* update windows

* fmt

* expect is not fun but what can you do

* fmt, clippy
2023-08-24 08:15:31 +02:00
Dominik Maier
454142c29e
Add bolts::math, make functions const, cleanup (#1444)
* Make some functions const

* fix isprint

* more const

* move integer_sqrt to bolts, use binary search, use u128 to handle extreme values

* Technically correct

* clippy

* u64 algo

* More test

* cumulative_distribution to in_place

* move calculate_cumulative_distribution_in_place to bolts

* clippy

* Move math stuff to bolts::math

* actually add math

* math?

* For some reason this fixes things, dunno

* fix builds?

* does that help?

* clippy ignores

* more clean clippy

* more cfg_attr
2023-08-23 21:12:39 +02:00
Manish Goregaokar
8f27b14eb8
Use postcard with default-features = false (#1446) 2023-08-23 19:53:25 +02:00
Rowan Hart
942c6a42ac
Reset headers with a memcpy, not an assign from zeroed (#1443) 2023-08-23 08:23:52 +02:00
Marco Vanotti
174b852e0a
Fix probabilities in TuneableScheduledMutator (#1440)
This commit fixes some issues regarding the `TuneableScheduledMutator`,
which had an edge case for drawing probabilities.

The user is supposed to provide a vector with probabilities that have to
add up to 1.0, but due to floating-point errors, the number can be
sligthly off.

If the sum ends up being slow, there's a chance that we draw a number
that is bigger than it (for example, 1.0), and that would not be present
in the cumulative distribution vectors (either for iterations or
mutations).

The issue is fixed by setting the last value of the cumulative
distribution to 1.0.

This commits adds some validations in the function that calculates the
cumulative distribution function, making sure that the numbers add up to
1, and that they are all between 0 and 1.

The API is now changed so the functions can now return an error instead
of crashing.

The commit also adds some tests, and fixes the `reset()` function.
2023-08-23 01:37:22 +02:00
Andrea Fioraldi
0b43711dc9
Fix LLMP p2p + restart bug with CentralizedEventManager (#1389)
This commit rewrites the centralized manager to use a secondary broker, as p2p communication is unreliable during frequent restarts. A centralized launcher is introduced too.
2023-08-22 15:57:50 +02:00
Rowan Hart
a14363f1fc
Make CmpValues Clone (#1439) 2023-08-21 22:11:11 +02:00
Dominik Maier
b0179b4498
Update some deps, clippy (#1422)
* More less default

* More clippy

* updated rangemap

* Clean up depencdencies

* Undo accidental remove

* Fix

* trying to fix qemu build

* hexagon be gone
2023-08-17 17:15:03 +02:00
lenawanel
5c05b3d32d
Update documentation of feedbacks::map::OneOrFilledIsNovel (#1423)
this previously seemed to describe `NextPow2IsNovel`
2023-08-15 20:14:30 +02:00
Dominik Maier
dcdfa978a4
Fix latest Clippy for good (#1418)
* More Clippy

* More clippy

* More ignore
2023-08-13 12:10:55 +02:00
Dominik Maier
e0d90aa67f
More Clippy fixes (#1415)
* More Clippy fixes

* Clippy
2023-08-13 01:17:34 +02:00
mark0
a55d40cd00
Update accounting.rs (#1411)
Remove dead code for better semantic compliance
2023-08-10 17:46:56 +02:00
Dominik Maier
ff2f325d68
Fix building docs (#1413) 2023-08-10 14:51:19 +02:00
Dominik Maier
8ca2df8819
Updated Scheduler::on_add documentation (#1410) 2023-08-10 14:27:21 +02:00
lenawanel
4bee9a9039
Update documentation of PowerQueueScheduler::on_add (#1409)
this fixes https://github.com/AFLplusplus/LibAFL/issues/1373
2023-08-10 14:23:19 +02:00
Dominik Maier
418d0dba91
Remove unused owned (for now) (#1405) 2023-08-07 12:50:43 +02:00
Dominik Maier
b877ed7e0e
Removed unused intrinsics features (#1404) 2023-08-07 10:55:08 +02:00
David CARLIER
3bf3172928
fix bolts build, intrinsics is an internal feature. (#1402) 2023-08-06 23:03:34 +02:00
Dominik Maier
dfaf06a22e
Make bolts work without alloc (#1401)
* Make bolts work without alloc

* Use core::Error where available

* unstable_feature -> nightly

* windows no_alloc
2023-08-05 01:03:40 +02:00
Dominik Maier
a0c03fccc5
Add serdeany_autoreg feature flag to allow disabling ctor use (#1398)
* Add  feature flag to allow disabling  use

* fix typo

* undo cargo.toml change

* Fix no_std

* Backticks

* rename register_at_startup to create_register

* fix

* Move Tui_monitor to default instead of std
2023-08-04 15:36:48 +02:00
Dominik Maier
e9e9c457d6
Move Bolts to libafl_bolts (#1335)
* sort memebers

* Building bolts

* fixing python, feature flags

* Cleanup bolts Cargo.toml

* Fix tests

* cleanup libafl

* removed duplicate examples

* Info text

* reenable agpl CI

* fix impl_serdeany

* new fmt

* Moved bolts

* fix some builds

* fix

* fix more fixes

* serdeany

* no_std

* Dependency cleanup

* Fix docs

* Docker

* add python bolts bindings

* no_std test fix

* merge fail

* typo fix

* add bolts dependency to fuzzers

* tiny fixes

* merge fun

* clippy

* link no longer exists

* make sure python gets rebuilt

* fix pybind

* doc fix

* remove bolts ref

* LibAFL bolts

* More info

* deprecation notice for launcher

* fix python

* cargo fmt

* fix concolic

* fix

* clippy

* fix libafl_cc

* fix tutorial, clippy

* fix concolic fuzzer

* fix push_stage_harness fuzzer

* prelude

* fix testcase post-merge

* mute clippy
2023-08-02 17:36:26 +02:00
Dominik Maier
d69cde896c
Less unsafe type_eq in stable (#1392)
* less unsafe type_eq

* add type_eq test

* More type eq test

* extend test by a lot

* go mad with tests

* fmt

* simpler tests

* clippy
2023-08-02 13:58:05 +02:00
Dominik Maier
006dcac00c
Named Mutators and MultiMutator API change (#1387)
* Mutators need names (alternative to #1379)

* Signature of MultiMutator shouldn't be the same as the normal mutator

* Named for python, remove mutator for multi_mutator

* fmt

* clippy edition warning

* clippy

* mac_count doc fix, return cleanup
2023-08-01 16:58:40 +02:00
David CARLIER
eae6f0436f
fix riscv(32) tick reading for clang (#1381)
albeit it passes with gcc it does not with clang.
2023-07-26 13:58:35 +02:00
Abc Xyz
993eb62bb8
fix(libafl): update Z3 dependency (#1372)
See https://github.com/Z3Prover/z3/issues/5586. libafl with `cmin` feature cannot be built for Android.
2023-07-24 15:12:16 +02:00
Addison Crump
81e9a9a60f
Fix build/clippy errors and update CASR (#1375)
* fix new exciting clippy errors

* fix CASR build errors

* bump casr version

* more clippy whack-a-mole

* allow needless pass by ref mut as it is improperly marked unnecessary
2023-07-24 15:11:24 +02:00
David CARLIER
b064eb3994
read_time_counter port for the RISCV family. (#1378) 2023-07-24 13:14:07 +02:00
Dominik Maier
36b1d8aea2
Fix status updates for crashing fuzzers (fixes #1367) (#1368)
* Fix status updates for crashing fuzzers (fixes #1367)

* client perf fix

* Add HasLastReportTime trait :/

* ****** prelude

* reoder phantom

* fix tests

* clippy, fixes

* more fixes, traits are maaad

* fmt
2023-07-14 18:50:31 +02:00
s1341
11fc57a5d7
Launcher: Allow setting a distinct stderr redirect (#1329)
Co-authored-by: Dominik Maier <domenukk@gmail.com>
2023-07-13 22:50:01 +02:00