403 Commits

Author SHA1 Message Date
Andrea Fioraldi
bca1f392a7
Bump to 0.7.1 (#465)
* bump to 0.7.1

* bump libafl_qemu
2022-01-13 11:32:57 +01:00
Andrea Fioraldi
de5264efad Clippy 2022-01-10 13:34:24 +01:00
Andrea Fioraldi
180883acb7 Panic when using nautilus with stable Rust 2022-01-10 12:17:32 +01:00
Andrea Fioraldi
d7dbd021a4 Specialization feature in nightly 2022-01-10 11:49:13 +01:00
Andrea Fioraldi
eed864eb36 switch to rustversion 2022-01-10 10:12:26 +01:00
buherator
5ac3cd6b5a
Optional signal value for kill on timeouts in TimeoutForkserverExecutor (#461)
* Optional signal value to kill forked processes on timeout

* Cargo format

* Properly initialize TimeoutForkserverExecutor

* Added with_signal constructor

* Removed duplicate code
2022-01-09 14:31:14 +01:00
Dongjia Zhang
87cd44b762
Use UserStats for Stability (#451)
* stability:serstats

* tostring

* fix no_std

* fix

* fmt

* clippy
2022-01-07 11:07:39 +01:00
Evan Richter
250ec8d1e0
Reduce generics for various Has* traits (#456)
Specifically for Has{Rand,Corpus,Solutions,FeedbackStates}

The Has* family of traits offer getters and get-mut-ers. The previous
implementation had a fully generic return type:

    trait HasX<X: TraitX> {
        get_x(&self) -> &Self::X;
        get_mut_x(&mut self) -> &mut Self::X;
    }

meaning a single type could implement both `HasRand<Romu>` and
`HasRand<XorShift>`. The advantage of having multiple implementations is
not clear at this time, so it vastly simplifies the trait (and its
impls) to bring the return type in the body as an associated type:

    trait HasX {
        type X: TraitX;
        get_x(&self) -> &Self::X;
        get_mut_x(&mut self) -> &mut Self::X;
    }

This comes with the limitation that any type that impls these traits can
only do so once, choosing only one associated type.

* HasRand's only generic parameter (Rand) is now an associated type
* HasCorpus and HasSolutions are now only generic over the Input type
  they store
* HasFeedbackStates generic parameter now associated type
2022-01-06 10:41:02 +01:00
Dominik Maier
30eb1508de
Add OwnedSlice::RefRaw to keep track of raw pointers (#448)
* add OwnedSlice::RefRaw to keep track of raw pointers

* clippy

* fmt

* new from ownedref

* clippy

* OwnedSliceInner

* fix,From

* as_slice()

* fmt

* fix doc

* OwnedSliceMut

* fixes

* clippy

* fix

* ownedmut -> owned

* to owned

* to_owned -> clone

* removed comment

Co-authored-by: tokatoka <tokazerkje@outlook.com>
2022-01-05 01:15:23 +01:00
Dominik Maier
6d9763c51f
Move to clap 3.0 (#447)
* move to clap 3.0

* fix cargo.toml

* update symcc to use clap3
2022-01-04 23:53:12 +01:00
Dominik Maier
a1a6d5f478
Disable pita 🥙 compiler in debug mode (#454) 2022-01-04 16:20:52 +01:00
Dongjia Zhang
674005fa61
Reorder type parameters in the correct order (#449)
* alphabetical order

* revert

* revert

* fix
2022-01-04 00:20:29 +01:00
Dominik Maier
b9acac46d9
Cpu atomics for LLMP (#438)
* atomic read for unmap

* send and recv

* switching to Atomics

* atomics

* bring back compiler_fence (maybe needed for signals?)

* only acquire mem if new msg is available

* unused compiler fence

* caching for msg ids to not have to read atomics as much

* fix build

* speed++

* only in a spinloop for the second try

* cleanup logs

* docu, error log
2022-01-03 00:47:31 +01:00
Dominik Maier
af3d321213
Derive debug for all structs in LibAFL (#442)
* documentation, warnings

* fixed docs

* docs

* no_std

* test

* windows

* nautilus docs

* more fixes

* more docs

* nits

* windows clippy

* docs, windows

* nits

* debug all the things

* derive debug for all core library components

* Docu for libafl_targets

* nits

* reordered generics

* add docs to frida, debug

* nits

* fixes

* more docu for frida, nits

* more docu

* more docu

* Sugar docs

* debug for qemu

* more debug

* import debug

* fmt

* debug

* anyap_debug feature no longer needed

* tidy up unused fn

* indicate if we left out values for struct debug

* implement Debug for sugar

* debug allthethings

* ci
2022-01-03 00:47:17 +01:00
Dominik Maier
efc804fe7d
Updated dependencies (#443)
* updated dependencies

* updated info in toml

* Windows fixes

* fixed immport

* u32 -> i32

* ignore i32 overflows in constants

* removed unused double allow
2022-01-02 17:52:44 +01:00
Dominik Maier
cb3662da54
Enable errors for missing docs, add documentation (#440)
* documentation, warnings

* fixed docs

* docs

* no_std

* test

* windows

* nautilus docs

* more fixes

* more docs

* nits

* windows clippy

* docs, windows

* nits
2022-01-01 19:51:27 +01:00
s1341
b5153cc525
Frida various fixes (#436)
* Make drcov post_exec dependent on whether drcov is enabled

* Fix find_smallest_fit algorithm

* Fix missing ?

* fix warnings

* fix

* todo for non-linux/android shadow, clippy

* typo

* removed unsupposted eq

* cleanup, docu

* libafl::Error

* fixed import

Co-authored-by: tokatoka <tokazerkje@outlook.com>
Co-authored-by: Dominik Maier <domenukk@gmail.com>
2021-12-29 18:47:33 +01:00
Andrea Fioraldi
6274ad4594
Refactor libafl_qemu creating the Emulator struct and post syscall hooks (#430)
* working without asan.rs

* working asan

* update fuzzers

* mremap in snapshot

* sugar

* python

* fix python

* clippy

* fmt

* fuck you loader
2021-12-23 09:10:13 +01:00
Dongjia Zhang
d697554810
Other/User defined WIndows Exceptions (#402)
* other exceptions

* add

* 46th

* fix

* fmt
2021-12-21 19:18:58 +01:00
van Hauser
1f24ad0b65
Implement AflMap (#416)
* aflmap

* nits

* nits

* switch implementation

* clippy

* set fuzzbench fuzzer to afl map

* fix monitor display

* Remove MapFindFilter and fix names

* AndReducer

* fixed testcase

* always inline

* remove inline(always)

Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
Co-authored-by: Dominik Maier <domenukk@gmail.com>
2021-12-16 14:19:39 +01:00
Dongjia Zhang
79f9bcd3e0
Use AddVectoredExceptionHandler to register exception handlers (#403)
* add

* unix fix

* unsafe positions

* another unsafe!

* ignore

* ignore

* make changes back

* fix

* fix

* fmt

* exception fix

* fix

* bug fix

* fmt

* fix things messed up during merge

* stack overflow fix

* fix

* fix

* fix

Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
Co-authored-by: Dominik Maier <domenukk@gmail.com>
2021-12-16 11:15:24 +01:00
s1341
d93f97309a
Open the stdout-file once (#419)
Co-authored-by: Dominik Maier <domenukk@gmail.com>
2021-12-16 11:12:40 +01:00
Dominik Maier
304eda724f
Various fixes for CI (#423)
* Various fixes

* fix try_from for cores

* no_std
2021-12-15 18:11:40 +01:00
Dominik Maier
217a7dee1d
Use Structopt instead of yaml for example fuzzers, introduce Cores API (#420)
* reworked generic_inmemory to structopt

* moved core parsing to a struct

* added Cores

* added structopt to libpng_ctx

* improved libafl, added structopt to libpng launcher

* fix deexit ub

* move more to structopt

* improve llvm-config detection

* move construct_automata to structopt

* clippy, fixes, ...

* no_std

* clippy

* frida core parsing

* fixed no-fork cores

* updated clap

* added missing import

* missing borrow

* reworked frida to structopt

* fixed build

* using Cores api for atheris

Co-authored-by: Dominik Maier <d.maier@avm.de>
2021-12-15 03:58:35 +01:00
Andrea Fioraldi
b4c2551544
Debug output for forkserver (#413)
* usability fixes for forkserver

* don't call target_bytes twice in TimeoutForkserverExecutor

* don't call target_bytes twice in ForkserverExecutor
2021-12-10 14:52:23 +01:00
Dongjia Zhang
3fbe1be189
Fix timeout value type for Windows (#414) 2021-12-09 20:08:44 +01:00
Dongjia Zhang
fc0881194d
Windows timeout fix with critical sections (#391)
* add

* unix fix

* unsafe positions

* another unsafe!

* ignore

* ignore

* make changes back

* fix

* fix

* fmt

* bug fix

* fmt

* compiler fence

* import

* typo

* add another critical section

* fix

* fix

* exclude windows book test

* typo

* fence

* why

Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
2021-12-09 13:55:20 +01:00
Andrea Fioraldi
c6553c5351 Use grammartec on crates 2021-12-09 09:58:19 +01:00
van Hauser
4a23489acb
Implement unstable edge detection+ignore in calibration stage (#398)
* step 1 for unstable calibration

* fmt

* fixed build

* done unstable implementation

* clippy

* finishing touches for unstable

* no_std

* fmt

* event mgr stablity

* fixed stability value

* displaying

* no_std

* fixed critical whitespace

* send msg only after calibration

* clippy

* Added log to mgr

* moved stability to state

* fix introspection

* space

* fixed docs

Co-authored-by: Dominik Maier <domenukk@gmail.com>
2021-12-08 09:54:47 +01:00
Dominik Maier
83583a867f
QEMU target arch selector via feature flag (#405)
* QEMU target arch selector via feature flag

* fix ci

* fixing ci some mmore

* more ci fixes, defaulting to x86_64 always

* more ci

* i368 -> i386 typo fix

* revert forkserver changes

* trying to fix clippy

* docs

* fixed warnings

* more clippy action

* qemu example arch

* bring back deprecated function I don't know how to replace

* get rid of deprecated feature again'

* builds?i
2021-12-06 20:06:47 +01:00
Lukas Seidel
0d0fe9eaca
Add fn for TimeoutExecutor to change desired timeout (#408) 2021-12-06 17:44:24 +01:00
Andrea Fioraldi
c3ea7a042c Update QEMU bridge revision hash 2021-12-06 10:04:59 +01:00
Andrea Fioraldi
96ef72e682 Fix grammartec rev 2021-12-02 16:43:48 +01:00
Andrea Fioraldi
e1349463db Fix grammartec version to 0.1.0 2021-12-02 16:41:01 +01:00
Dominik Maier
ca767752d0
make map debuggable (#396) 2021-12-02 10:29:24 +01:00
Lukas Seidel
8a57361e84
dump_registers and write_crash for armv7 (#393)
* dump_registers and write_crash for armv7

* fmt
2021-12-02 10:28:17 +01:00
Andrea Fioraldi
37b8cb0d2f Bump to 0.7 2021-12-01 17:22:09 +01:00
Andrea Fioraldi
cf5b4dfb18 OnDiskMetadata 2021-11-29 14:28:55 +01:00
Andrea Fioraldi
6dd107c4ef Executions field in Testcase 2021-11-29 14:22:27 +01:00
Andrea Fioraldi
2a780652e1 Fix HasTimeoutHandler 2021-11-18 09:42:35 +01:00
Dominik Maier
01bb599759 fixed ms 2021-11-17 20:18:50 +01:00
Andrea Fioraldi
5605f233fc
InProcessHandlers (#387)
* InProcessHandlers

* clippy
2021-11-17 18:32:26 +01:00
Dominik Maier
ba969108e3
Push stage trait (#380)
* rpush mutational trait

* tiny changes

* started PushStageAdapter

* fmt

* refactoring

* fix docs

* no_std

* formatted more
2021-11-17 12:51:14 +01:00
Toka
8b9f298674
remove print from lib internals (#384) 2021-11-17 12:50:47 +01:00
Dominik Maier
ad1793bc4b Removed unused variable from pushstage 2021-11-14 10:41:35 +01:00
Dominik Maier
83271a7d42 More verbose restarting error msg 2021-11-14 10:26:14 +01:00
Andrea Fioraldi
c6dd2e7d0a Fix clippy 2021-11-13 19:54:40 +01:00
Andrea Fioraldi
1b77f014fe Remove unused time crate from libafl deps 2021-11-13 18:50:23 +01:00
Andrea Fioraldi
23b55eae6a Proper run time format for Monitors 2021-11-13 18:49:11 +01:00
Toka
23f02dae12
Fix api (#376)
* Fix api

* change fuzzers
2021-11-12 19:10:53 +01:00