Evan Richter
ab7d16347f
[libafl_qemu] map_fixed and mprotect target memory ( #483 )
2022-01-20 22:06:26 +01:00
Dongjia Zhang
5e1c0b96ea
Various Fixes (windows timeout race & frida options) ( #482 )
...
* race fix
* oops
* no backtrace
2022-01-20 01:32:04 +01:00
Dominik Maier
77e5965e97
Add AsSlice, AsMutSlice traits, refactor MapObservers to be iterable, and have associated types ( #477 )
...
* from warning
* fix latest clippy
* clippy fixes++
* renamed shmem parameters
* renamed map to shmem
* make forkserver executor work for any (non-system) shmem
* Mem -> ShMem
* rework windows
* fix nit
* fix symbolic
* refacctor map observers
* iterator for map observers
* removed unused ownedptr, added asslice trait to most functions
* make map entry type an associated type
* fix fuzzers
* fix docs
* typo fix
* fix windows, add try_from_slice to shmid
* missing import
* fix fuzzbench
* cleanup
* fmt
* more asslice
* fmt
* added doc link about token-level fuzzing
* cods
2022-01-19 00:02:33 +01:00
Dominik Maier
b67a7f5b60
[libafl_frida] Enabled ASan for Apple ( #478 )
2022-01-18 18:37:19 +01:00
Andrea Fioraldi
929f687676
Repro arguments libfuzzer-like for fuzzbench ( #475 )
2022-01-18 16:31:44 +01:00
d4d86927b7
add feedback for improving msd
2022-01-17 20:51:52 +01:00
d2d2862727
showmap dumps edges to file
2022-01-17 18:45:53 +01:00
Dominik Maier
4f6f76e857
Streamline ShMem API ( #472 )
...
* from warning
* fix latest clippy
* clippy fixes++
* renamed shmem parameters
* renamed map to shmem
* make forkserver executor work for any (non-system) shmem
* Mem -> ShMem
* rework windows
* fix nit
* fix symbolic
2022-01-17 18:28:26 +01:00
Dominik Maier
ac43997950
Fixed additional new clippy lints for libafl_qemu, libafl_frida ( #473 )
...
* clippy for qemu
* getrlimit clippy
2022-01-17 16:24:40 +01:00
Dominik Maier
2dd88998bd
Clippy fixes for latest toolchain ( #471 )
...
* from warning
* fix latest clippy
* clippy fixes++
* more nits
2022-01-17 11:02:42 +01:00
ac181eb99d
add some basic fuzzer
2022-01-16 11:29:45 +01:00
c1db0752c1
remove hardcoded addresses
2022-01-16 11:29:45 +01:00
de4481e70d
add a basic demo
2022-01-16 11:29:45 +01:00
edff095401
Add systemmode to libafl_qemu
...
Use the new configuration feature systemmode
2022-01-16 11:29:45 +01:00
d460bab404
TO_REMOVE relative qemu_path
2022-01-16 11:29:45 +01:00
Andrea Fioraldi
aebd85f041
Bump libafl_sugar to 0.7.1 ( #468 )
0.7.1
2022-01-13 15:57:24 +01:00
Andrea Fioraldi
bbd11bc4a7
Bump libafl_frida to 0.7.1 ( #467 )
2022-01-13 15:48:51 +01:00
Andrea Fioraldi
9b3a435778
Add --libafl arg in libafl_cc and enable it for fuzzbench ( #466 )
2022-01-13 15:40:39 +01:00
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
Dongjia Zhang
b70833f26b
Libafl_frida ASan shadow bit ( #455 )
...
* add
* debugging
* remove debug code
* fmt
* why
* writable or executable ranges
* for
* fmt
* fix
2022-01-13 10:45:15 +01:00
Andrea Fioraldi
906bb4e653
--libaf-no-link ( #464 )
2022-01-13 10:03:02 +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
8870c50ff5
Do not build QEMU when generating docs
2022-01-10 11:27:53 +01:00
Andrea Fioraldi
eed864eb36
switch to rustversion
2022-01-10 10:12:26 +01:00
Dongjia Zhang
327ff98ea1
Asan fix ( #460 )
...
* fix
* fix
* bump
* fmt
2022-01-09 21:00:04 +01:00
Dongjia Zhang
82194c5fe5
Fix windows build ( #462 )
...
* fix
* fmt
2022-01-09 20:57:43 +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
Andrea Fioraldi
e6f2f2d0b2
Merge branch 'main' of github.com:AFLplusplus/LibAFL into main
2022-01-07 11:53:54 +01:00
Andrea Fioraldi
181160d80b
Clone only one specific commit on libafl_qemu build.rs
2022-01-07 11:53:34 +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
Yerkebulan Tulibergenov
2de729a779
Fix a typo in TODO.md ( #450 )
2022-01-04 00:14:46 +01:00
s1341
1608294d0b
Various fixes related to frida mode ( #445 )
...
* Fix lint errors
* Fix incorrect address for unfreed allocations when reseting
* Use hash for edge ids
* Fmt
2022-01-03 10:41:52 +01:00
Evan Richter
9f6872ac68
[libafl_qemu] fix i386 Regs values ( #444 )
...
The `Regs` enum was defined out of order, leading to incorrect results from `emu.read_reg`. I found the correct ordering defined here: https://github.com/AFLplusplus/qemu-libafl-bridge/blob/master/target/i386/cpu.h#L46-L54
2022-01-03 10:41: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
Evan Richter
9f76386668
[libafl_qemu] prevent unneeded build.rs runs ( #441 )
...
`libqasan/libqasan.so` never exists during a normal `cargo build` because the .so is built in the target_dir, not in the source directory. This was triggering cargo to rerun the build script every time a user of this library made an incremental change to their code.
pointing `rerun-if-changed` to a directory will make cargo rerun build.rs if any file in that directory changes.
2022-01-02 01:03:35 +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
Dominik Maier
d669b063f4
clippy
2021-12-30 18:38:28 +01:00
Dongjia Zhang
b537539b54
Use MiMalloc for in-process fuzzers ( #439 )
...
* MiMalloc
* docu
* other fuzzers
* mention asan
2021-12-30 16:33:23 +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
Evan Richter
e47c3be3fd
[libafl_qemu] fix build.rs ( #435 )
...
I noticed qemu was only building on one core, so I debugged the jobs environment variable. Evidently cargo passes `CARGO_BUILD_JOBS` is passed to build.rs scripts as `NUM_JOBS`. Other env vars for build.rs can be found [here](https://web.mit.edu/rust-lang_v1.25/arch/amd64_ubuntu1404/share/doc/rust/html/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts )
2021-12-29 01:30:14 +01:00
s1341
eeac0f4f06
Fix strncmp hook to only check the length of the string ( #434 )
2021-12-28 10:00:44 +01:00