508 Commits

Author SHA1 Message Date
Dominik Maier
712c5daeb9
Reload corpus size after restart (addresses #210) (#220)
* reload corpus size after restart (addresses #210)

* no_std
2021-07-12 13:16:40 +02:00
Toka
13b4a143b8
branch main (#219) 2021-07-11 01:47:01 +02:00
Toka
4dea81b2a2
MOpt Refactor & Bug fixes (#218)
* rename

* fmt

* post_exec

* post_exec

* bug fix & change type

* refactor

* clippy

* fix

* unnecessary trait

* mode in Mutator

* remove println
2021-07-10 16:32:10 +02:00
Dominik Maier
0121096e84
Fixes for no_std build (#214)
* builds on no_std

* fixed std build

* nightly fmt on CI

* nightly fmt on CI (again)

* fmt

* no_std build on unix

* more mem

* added no_std from #212 to gh workflow

* more ci, less nightly

* clippy

* more toolchains?

* docu

* y u no build

* more ci?

* next try

* fixed dockr

* more dockerfile fixes

* ondisk corpus fixed

* panic:?

* ubunutu

Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
2021-07-09 20:07:56 +02:00
Andrea Fioraldi
4af9af784f Serialize CmpValuesMetadata to an empty object to save space on State serialize 2021-07-09 14:35:31 +02:00
Andrea Fioraldi
d472a1242a
libafl_qemu (#211)
* empty libafl_qemu crate

* fuzzbench qemu fuzzer skeleton

* emu.run() works without bp

* working emu loop

* resolve elf symbols

* running Qemu fuzzer without coverage

* qemu fuzzer with edge coverage

* merge into inprocess::GLOBAL_STATE

* create QemuExecutor and remove QemuEmulator

* qemu hooks and persist edges mapping storing them in State

* windows fix

* add libafl_qemu to workspace

* windows fix

* some clippy

* clippy

* fix fuzzbench_qemu

* fix fuzzbench_qemu makefile

* fuck you macos
2021-07-08 15:21:14 +02:00
Andrea Fioraldi
a1fc2a5453 Bump to 0.5.0 2021-07-05 14:12:40 +02:00
Toka
849ff1fa04
MOpt scheduler (#161)
* add the struct for MOpt globals

* constants

* RAND_C

* more comments & reorder class members

* select_algorithm

* no_std fixes

* clippy fixes

* MOptMutator

* MutatorsTuple has HasLen

* MOptStage

* pso_update

* HasMOpt trait

* ScheduledMutator, core_fuzzing

* clippy fix

* fmt

* core_fuzzing

* core_fuzzing done

* fix

* pilot_mutate

* pilot_fuzzing

* pilot_fuzzing done

* MOpt metadata

* Make MOptMutator into a trait

* initialize_mopt

* No getter/setters

* fmt

* fixed compiler warnings & clippy warnings

* Comments

* fix type paramter, integrate into libpng

* fmt

* fmt

* No HasMOpt

* fmt

* improve

* pso_initialize, various fixes

* clippy

* fmt

* always pacemaker mode

* fmt

* fix

* less noisy fmt::Debug

Co-authored-by: Dominik Maier <domenukk@gmail.com>
Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
2021-07-05 13:54:15 +02:00
Andrea Fioraldi
5b76c22ea7
Cmplog routines mutator (#204)
* save

* routines in meta

* execute passes

* fix cmplog rtn pass

* clippy
2021-07-05 09:54:44 +02:00
Dominik Maier
84a9e36acf
Github Actions Cache (#205)
* trying out github actions cache

* split up build steps

* deactivated cache for macos

* debugging

* also for windows (?))

* clippy fix

* out folder ignored
2021-07-02 20:51:22 +02:00
Andrea Fioraldi
f0743cbb17
remove serde bounds for Observer (#202) 2021-07-02 15:07:51 +02:00
Andrea Fioraldi
44f6e4c389
Improve introspection (#200)
* remove NUM_FEEDBACKS

* working introspection

* adust introspection stats

* bugfixes, clippy

* removed outdated define

* more clippy;

* no_std

Co-authored-by: Dominik Maier <domenukk@gmail.com>
2021-07-02 10:58:36 +02:00
Dominik Maier
204b15a432
Mgr ID improvements (#201)
* added mgr_id to eventmanager

* trying to install missing llvm to ci

* moved mgr_id to own trait

* improved imports

* removed unrelated file from pr

* no_std fixes
2021-07-01 17:27:22 +02:00
Dominik Maier
4cafa8c253
added mgr_id to eventmanager (#196) 2021-06-30 21:58:06 +02:00
Max Ammann
08263f7ade
Expose some details about introspection (#195)
* Expose some details about introspection, such that custom Stats implementations can use them

* Make the functions public

* Fix formatting
2021-06-30 14:16:36 +02:00
Dominik Maier
c2cd49413b typo fix 2021-06-29 12:09:49 +02:00
Dominik Maier
37f641f79b
Metadata lookup once (#186)
* metadata lookup once

* fix clippy
2021-06-22 18:41:46 +02:00
Andrea Fioraldi
bdb5efbf5b
Configurations (#162)
* print sender id

* storing sender id to env

* executor in llmp handle_in_client

* compile the lib

* compiling generic_inmemory

* fix forkserver

* adapt from fuzzers

* instrospection fix

* exitkind in NewTestcase

* fix libafl_frida

* fix firda_libpng

* send conf with Newtestcase event

* bump to 0.4.0

* no_std fix

* fmt

* fix libfuzzer_libmozjpeg

Co-authored-by: Dominik Maier <domenukk@gmail.com>
2021-06-22 15:04:14 +02:00
Dominik Maier
5c5a1cf2e9
fixed fuzzbench early exits (#182) 2021-06-22 09:02:56 +02:00
Andrea Fioraldi
fee9cae8ed Fix InProcessExecutor test mod 2021-06-21 11:58:04 +02:00
Andrea Fioraldi
6351cb16e5 Support multiple crash handlers when using multiple InProcessExecutors 2021-06-21 11:39:42 +02:00
Dominik Maier
dea21da5c3
fuzzbench harness (#165)
* starting to build fuzzbench harness

* fuzzbench updated

* fuzzbench example readme

* removed dummy files

* Intial de-luxe dockerfile added

* added to dockerignore

* more fuzzbench

* dockerfile

* final dockerfile fun

* fuzzing fixes, switched rand, build fixes

* fmt

* added dummy fuzzone

* silence wrapper output

* clippy

* logfile fixes

* adopt changes to libafl-cc

* various fixes
2021-06-16 18:24:07 +02:00
Andrea Fioraldi
1faadec106
Move win32 libs in libafl_cc and improve static lib linking (#176)
* Move win32 libs in libafl_cc and improve static lib linking

* fmt
2021-06-16 14:21:13 +02:00
Gal Tashma
8202548648
dont send was_killed to forkserver more than once (#175)
Co-authored-by: galtashma <gal.tashma@swg.local>
2021-06-15 21:58:05 +02:00
Dominik Maier
c2feddbe7c
Implemented rand::Rng for libafl::Rand as feature flag (#174)
* implemented rand::Rng for libafl::Rand as feature flag

* fixed build

* renamed macro
2021-06-15 09:30:32 +02:00
Gal Tashma
1b1060b35a
fix introspection for mutational stage (#172) 2021-06-14 14:40:36 +02:00
Toka
ad80df5bbb
compression fix (#170)
* compression fix

* use miniz_oxide

* fix Error::Compression
2021-06-14 11:06:53 +02:00
Andrea Fioraldi
2b0976132a
Generic Inmemory Fuzzer (#166)
* generic inmemory fuzzer

* Link whole archive

* fmt
2021-06-14 10:26:10 +02:00
Dominik Maier
c123872b11 more informative error message for forkserver 2021-06-10 22:19:44 +02:00
Dominik Maier
c4dd0b25b8 fmt, clippy fixes 2021-06-10 13:39:44 +02:00
Dominik Maier
0c353daee6
Single-threaded Restartable Mgr (#129) (#159)
* initial single-threaded restartable mgr

* starting rework

* created SimpleRestartingManager

* fixed win build

* moved cpu to boplts

* bringing back cpu

* no_std fixes

* no_std fixes

* removed unused variable
2021-06-10 12:43:00 +02:00
Dominik Maier
6b235472e0
Added load_initial_inputs_forced to add all inputs to a corpus (fixes #123) (#158)
Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
2021-06-09 14:51:48 +02:00
Andrea Fioraldi
8fa654dd61 fix generics for ShadowExecutor 2021-06-09 14:34:38 +02:00
Andrea Fioraldi
2328ac252b Merge branch 'main' of github.com:AFLplusplus/LibAFL into main 2021-06-09 14:17:54 +02:00
Andrea Fioraldi
2b16e92461 introduce ShadowTracingStage 2021-06-09 14:17:43 +02:00
OB
7abd7c8162
Cmplog instrumentation for Frida (#99)
* libafl_targets: refactor sancov trace-pc

* cmp observer

* libaf_targets: new structure to isolate sancov

* fix C warning

* combined executor

* cmp observer and feedback

* I2SRandReplace mutator

* impl CmpMap for CmpLogMap in libafl_targets

* cmplog observer

* clippy

* TracingStage

* working random cmplog mutations

* enable cmplog for libfuzzer_stb_image

* re-enable new testcase stats print

* fix update stats display

* bump 0.3.1

* clippy

* clippy

* no clippy for fuzzers/

* fix

* add cmplog runtime instrumentation

* test cmplog against value profile feature

* fix compile error

* add target arch aarch64 for is_interesting_cmplog_instruction

* add cfg target aarch64 on cmplog related code within stalker loop

* revert changes in cargo.toml

* align code with 'main' branch

* revert accidently changed Cargo.toml file

* update cmplog runtime code to work with the cmplog backend implementation

* change magic to 8 bytes

* cmplog runs with observer- no crashes

* clippy fixes

* add cmplog_runtime as feature

* set cmplog command-line argument to false by default

* setup cmplog observer and mutator correctly

* decrease emitted code opcode count

* add cmplog testing to the harness

* get rid of irrelevant changes and unused code, add comments, change
feature name to "cmplog"

* get rid of some unessecery whitespaces and new lines

* fix clippy errors

Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
Co-authored-by: Dominik Maier <domenukk@gmail.com>
Co-authored-by: Omree <you@example.com>
2021-06-09 14:11:43 +02:00
Andrea Fioraldi
9e9425c622 introduce ShadowExecutor 2021-06-09 12:15:08 +02:00
Dominik Maier
24beae99f7
launchers without brokers (fixes #128) (#157) 2021-06-08 15:40:32 +02:00
s1341
4271790cb5
Add unique_name() to Input. Use it to generate filename in OnDiskCorpus (#152)
* Add unique_name() to Input. Use unique_name to generate filename in OnDiskCorpus

* updated duplicate ahash

* nostd fixes

* fmt

* rename unique_name to generate_name

Co-authored-by: Dominik Maier <domenukk@gmail.com>
2021-06-08 09:54:38 +02:00
Dominik Maier
36b823548a
nightly clippy fixes (#155)
* nightly clippy fixes

* more niglty clippy fixes

* added Safety section

* no_std fixes

* final fixes
2021-06-07 12:30:56 +02:00
Dominik Maier
35e655ca04
LLMP Changes (#130)
* llmp_changes

* fixed send

* no_std fixes
2021-06-07 02:15:31 +02:00
Dominik Maier
392ffd33f7
Fix client_id for outgoing messages (#154)
* attaching client_id to outgoing messages

* fixed forwarding, example
2021-06-07 01:48:52 +02:00
Dominik Maier
3b2ee4bb70
Added MacOS CI (#131)
* added macos ci

* running tests on macos

* some macos fixes

* fmt

* some must_use infos

* trying' to fix MacOs testcases

* no main in test

* fixed MacOS testcases

* tried to fix build errors

* unified shmem_limits

* Revert "unified shmem_limits"

This reverts commit 8c6bb8d6a2cec71d72bb181b5b491737a771298e.

* hopefully fixed macos testcase

* removed unneeded values
2021-06-07 01:24:41 +02:00
Douman
11771c3323
Bump xxhash-rust minimal version to fixed one (#153)
* Bump minimal xxhash_rust version to 0.8.2

Note that 0.8.1 bug doesn't affect current usage, but still do it just in case

* Do not use const xxh3 not in cosnt context
2021-06-06 23:54:16 +02:00
s1341
636194de0e
Frida switch from walk-proc-maps to frida-gum based extraction of ranges (#149)
* Bump frida-gum version

* Move from walk of /proc/pid/maps to frida based range/module locatoin
2021-06-06 10:40:07 +02:00
Gal Tashma
156ed08905
Eager and Fast FeedbackTuple Implementations (#144)
* Introduce eager and fast feedback_or! implementations (issue #135)

* rename FeedbackTuple to CombinedFeedback (as it is a struct not tuple) and add fast/eager AND
2021-06-04 14:07:02 +02:00
Andrea Fioraldi
42997dbde9 Fix #147 2021-06-04 14:03:31 +02:00
Mrmaxmeier
de933fee63
check each feature in CI and fix introspection on no_std (#143)
* ci: check every feature with cargo-hack

* fix introspection on no_std

* ci: the dev branch is not a thing anymore

* ci: run tests with --all-features
2021-06-01 18:03:26 +02:00
Gal Tashma
ad9a2faaea
don't panick on time subtraction failure (#141)
On some machines, the system clock can be faulty and start_time maybe
actually be after the end time. This causes a panic, instead gracefully
just put a None time in `self.last_runtime`
2021-06-01 18:02:27 +02:00
Mrmaxmeier
1b755036ad
remove unnecessary generics on RandGenerators (#142) 2021-06-01 17:26:36 +02:00