2837 Commits

Author SHA1 Message Date
Dongjia "toka" Zhang
287d1ac7c7
Add HasAdaptiveSerializer trait. (#2040)
* fix

* revert test

* add

* a

* check
2024-04-11 15:36:08 +02:00
Stefan Zabka
48463d079b
Fix error handling in libafl_qemu_build (#2036)
* fix(libafl_qemu_build): assert command success

* fix(libafl_qemu_build): make sure linker_interceptor.py picks up correct compiler

Currently linker_interceptor.py uses 'cc' as the __LIBAFL_QEMU_BUILD_CC environment variable is never set

* remove redudant arg
2024-04-10 18:36:36 +02:00
Dongjia "toka" Zhang
0d5c6219d8
Dedup CentralizedEventManager's serialize_observers() (#2034)
* why

* clp
2024-04-10 16:13:03 +02:00
WorksButNotTested
374f8735fa
Implement user-space QEMU ASAN (#1806)
* Implement user-space QEMU ASAN

* Fix wrong cfgs

* fmt

* merge conflicts in libafl qemu

* A few more fixes to qemu_launcher

* Change commit of qemu-libafl-bridge

* Fix clippy in qemu_launcher

* Fix commit id again

* Empty commit to trigger CI

* Fix path to fuzzer for test in qemu_launcher?

* Revert location of target binary and show the full error log from qemu_launcher test

* Appease the clippy gods

* Empty

* Fix format

---------

Co-authored-by: Your Name <you@example.com>
Co-authored-by: Dominik Maier <domenukk@gmail.com>
Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
2024-04-10 01:11:28 +02:00
Aarnav
47c41c2925
Introduce disabled testcases for splicing (#1932)
* introduce disabled field to Testcase

* separate executor's processing of execution (adding to corpus/solution/discarding) and execution of input

* introduce add_disabled_input function

* enable splicing mutators to fetch disabled inputs

* reset modified example

* clean up

* update docs

* update docs for count_with_disabled

* fix random_corpus_id for splicing mutator not considering disabled entries

* fmt

* update docs

* clippy

* fix corpus_btreemap not working

* fix clippy warnings

* fix python bindings

* typo in count_with_disabled implementations

* fix certain splicing mutators not considering disabled inputs

* rename count_with_disabled to count_all

* introduce count_disabled function

* update docs for count_all, count_disabled and count

* * introduce get_from_all and nth_from_all for corpus implementations so get() and nth() do not silently fetch disabled entries.
* remove boolean flag from random_corpus_id which allowed inclusion of disabled ids and make it into a new function random_corpus_id_with_disabled
* update docs

* remove boolean is_disabled flag from corpus::insert and make it into a separate function insert_disabled

* rename do_insert to _insert

* make get_from_all inline for cached and inmemory

* add missing functions implementation for PythonCorpus
prevent writing feedback when adding disabled testcases

* fix nth_from_all overfetching enabled corpus entries

* fix clippy & rename execute_with_res to execute_no_process

* refactor _insert for corpus_btreemap

* make LibfuzzerCorpus and ArtifactCorpus to accomodate disabled entries

* fix typo

* fix missing docs for map field

* fix clippy

* test

* (hopefully) fix CachedOnDiskCorpus using incorrect corpus when caching testcase

* fix typo in inmemory_ondisk leading to fetching disabled entry from enabled corpus

---------

Co-authored-by: aarnav <aarnav@srlabs.de>
Co-authored-by: Dominik Maier <domenukk@gmail.com>
2024-04-10 01:03:00 +02:00
David CARLIER
d3b3d5d462
bolts: add time ticks method for arm (#2032) 2024-04-10 01:01:27 +02:00
Dongjia "toka" Zhang
c4f076356f
Fix the OOM exit code from 137 to 9 (#2029)
* i don't know if there really exit 137

* change message

* not 137 but 9
2024-04-09 17:16:25 +02:00
Romain Malmain
33c6ea1ae4
Fix libafl_qemu python bindings and example (#2030) 2024-04-09 16:09:47 +02:00
Mrmaxmeier
f252469d86
CI: A few updates and fixes (#2023)
* CI: Don't run cargo clean in order to preserve build caches

* CI: run yaml formatter >:)

* CI: try sharing build caches between similar jobs

* CI: it looks like the `ucd-generate` tool is not used anymore

* CI: Sneak in merge queue support :)

* CI: split out `cargo fmt --check` job

* libafl_qemu injections: be more resilient about mapping paths
2024-04-09 12:55:07 +02:00
Dominik Maier
2cc560e727
Tiny clippy fix for qemu_launcher fuzzer (#2026) 2024-04-09 12:49:42 +02:00
Dominik Maier
ef25aef471
Fix docs for frida (see #2025) (#2027) 2024-04-09 12:48:24 +02:00
Dominik Maier
7479726c3e
Un-Unfix libafl_qemu fixes after #2020, remove python CI (#2024)
* Un-Unfix libafl_qemu fixes after #2020

* remove CI for removed python bindings
2024-04-08 22:06:40 +02:00
Dongjia "toka" Zhang
ed5a10d0b5
Inter-job dependency on ubuntu ci (#2021)
* inter-job dependency.

* conc
2024-04-08 19:42:59 +02:00
Dominik Maier
a0a6d0e5cc
Fix yml file for CI (#2022) 2024-04-08 19:42:37 +02:00
Dominik Maier
f19302c9b1
Bring back python bindings for sugar,qemu (partially revert #2005) (#2020)
* Bring back python bindings for sugar,qemu (partially revert #2005)

* sugarman, won't you hurry

* Test?
2024-04-08 19:36:54 +02:00
Dongjia "toka" Zhang
e8fe5bb614
Move HasMetadata/HasNamedMetadata trait to libafl_bolts (#2016)
* move around

* fmt

* rev

* fmt

* doc job

* name

* move to libafl

* separate even more

* miri
2024-04-08 19:24:56 +02:00
Dominik Maier
ff938261df
Fix Clippy on MacOS for qemu, accept some clippy::missing_transmute_annotations suggestions (#2009)
* Fix Clippy/CI

* Ignore transmute annotations in pybind

* fix

* more clippy

* more clippy

* fix fixes
2024-04-08 16:24:10 +02:00
Dongjia "toka" Zhang
fa58dff4b7
concurrency (#2017) 2024-04-08 15:20:42 +02:00
Andrea Fioraldi
e29897dd44
Fix GuestMaps in userspace LibAFL QEMU (#2013) 2024-04-08 08:30:23 +02:00
Dongjia "toka" Zhang
159da0d311
Change when weighted scheduler make new table & don't update global metadata in on_remove/on_replace (#2011)
* fix

* backtick
2024-04-07 17:24:27 +02:00
Dongjia "toka" Zhang
527b892c1d
Separate fuzzer test in CI (#2010)
* ci

* ci

* ci

* aa

* aa

* a

* a

* a

* fix

* no fail fast

* system

* what is this lint...

* a

* clp

* disk

* ok no fastfail

* no qemu for now, reenable monday
2024-04-06 21:01:57 +02:00
Dongjia "toka" Zhang
4901846588
Remove python bindings (#2005)
* delete python bindings

* fix

* example

* fix
2024-04-06 15:16:46 +02:00
Tobias Mayer
24fd098e66
Update Dockerfile to work for nyx (#2008)
Missing file to build libafl_nyx in Docker
2024-04-06 04:48:50 +02:00
Dongjia "toka" Zhang
17aae94efc
Move some C functions to Rust from sancov_cmp.c (#2003)
* some

* a

* clp

* aa

* just new line

* fix

* fxi

* fix
2024-04-06 01:03:01 +02:00
Dongjia "toka" Zhang
90c627a7e7
revert large map (#2004) 2024-04-05 17:06:47 +02:00
Dominik Maier
1c85c3af13
Add option to enabled/disable client stats and fix #1771 (#2001)
* Add option to enabled/disable client stats and fix #1771

* more fix

* fix map_density

* even more fix

* remove need for vec in Aggregator::aggregate

* fix json weirdness - remove individual clients (is that all right? )

* Make pretty
2024-04-05 14:23:56 +02:00
Dongjia "toka" Zhang
98d3dfe821
Replace LLMP client timeout with client deregistration (#1982)
* wip

* done

* fix

* fix

* some fixes

* stuff

* fmt

* stuff

* use

* not 1337

* comment

* move functions around

* fix

* fix

* doc

* mistake

* aa

* fixer

* wipe out restarter id

* denig

* fix

* fix

* include

* fix

* fix

* fix

* clp

* fix

* fix

* error log
2024-04-04 21:01:11 +02:00
Dominik Maier
e64233e203
LLMP: Fix page-size where allocated message is larger than the current map (#1997) 2024-04-03 13:27:19 +02:00
Romain Malmain
50be2f4aaf
Fix of libafl qemu runtime files (#1996)
* Change naming and fix LibAFLQEMU header file. Fix and document LibAFL QEMU Windows ASM file.

* fmt
2024-04-03 11:57:48 +02:00
Dominik Maier
d90d232e7a
Frida: Move ASAN_ERRORS values into a Mutex for shared access (#1995)
* Move ASAN_ERRORS values into a Mutex for shared access

* Fix frida doc

* oops

* clippy
2024-04-03 11:47:09 +02:00
f26582ed75 un-hardcode rtos api functions 2024-04-03 10:19:37 +02:00
Dongjia "toka" Zhang
2137ad0f8f
Don't resume in std mutational stage (#1946)
* fix

* fix

* fix

* fix

* FMT

* don't resume in mutational stage
2024-04-02 13:26:47 +02:00
Dominik Maier
44dca17a6c
Tiny Frida doc fix (#1994) 2024-04-02 13:25:59 +02:00
Romain Malmain
cca4e3daa9
Make inputs in libafl_qemu generic (#1991)
* fix non-generic input in libafl_qemu

* Update setup_libxml2.sh of nyx_libxml2_standalone fuzzer (#1990)

On testing this on my machine not all neccessary files for fuzzing with nyx where provided by the setup. Compared to the nyx_libxml2_parallel fuzzer this packer generation line was missing.
After adding this the fuzzer was able to start.

---------

Co-authored-by: Dominik Maier <domenukk@gmail.com>
Co-authored-by: Tobias Mayer <arbeitskraftmayer@gmail.com>
2024-04-02 12:30:12 +02:00
Dominik Maier
aaafe1fc6c
Use new Rust CStr constant (#1993) 2024-04-02 10:28:20 +02:00
Tobias Mayer
63a6d1aac0
Update setup_libxml2.sh of nyx_libxml2_standalone fuzzer (#1990)
On testing this on my machine not all neccessary files for fuzzing with nyx where provided by the setup. Compared to the nyx_libxml2_parallel fuzzer this packer generation line was missing.
After adding this the fuzzer was able to start.
2024-04-02 10:19:22 +02:00
Dominik Maier
26122b20a0
Add unsafe to AsanErrorsObserver, fix UBs, fix Frida Version missmatch (#1987)
* Add unsafe to AsanErrorsObserver, fix UBs, fix Frida Version missmatch

* Clippy

* simpler API

* fix build

* fix
2024-04-02 10:17:59 +02:00
ToSeven
10f373d587
fix AFL-Style UI errors when allowing the introspection feature (#1986) 2024-04-01 14:09:15 +02:00
Andrea Fioraldi
45d47214c2
Fix OOM restarts with LlmpShouldSaveState (#1974)
* LlmpSaveState and OOM restarts

* clippy

* clippy

* rename
2024-03-30 17:05:03 +01:00
Romain Malmain
69d7d7b1e3
Add backdoors to portable header file of LibAFL QEMU. (#1978)
* Added backdoors to portable header file.

* fix arm macros.

* copy `libafl_qemu.h` in target directory.

---------

Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
2024-03-30 17:04:52 +01:00
Romain Malmain
50e0f80d1e
Refactoring of qemu_systemmode fuzzers (#1980)
* Added backdoors to portable header file.

* fix arm macros.

* copy `libafl_qemu.h` in target directory.

* Merged all qemu_systemmode examples into one, settable with features.
Automatic building using `Makefile.toml`

* fix typo.

* added test of QEMU systemmode fuzzers.

* replace test by build for now.
2024-03-30 17:04:37 +01:00
Dongjia "toka" Zhang
0cafa5c72d
Don't use unwrap() in the crash handler (#1979)
* don't

* win

* fix

---------

Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
2024-03-30 17:04:28 +01:00
Marco C
15aabfe65d
Clean up warnings in baby_fuzzers (#1981) 2024-03-29 15:14:17 +01:00
s1341
1fc5ba63fa
batch_timeout: fix overflowing subtraction (#1976) 2024-03-28 16:50:12 +01:00
c013628017 fix scheduler for storage changes 2024-03-28 14:14:34 +01:00
am009
c221108916
Add MutatedTransform to the input type in TMinMutationalStage (#1251) (#1971)
* Support `MutatedTransform` in `TMinMutationalStage`.

* Run `MutatedTransformPost` for the replaced testcase.

* Add clone trait bound for `MutatedTransformPost`.

* Return an error instead of using unwrap.
2024-03-27 18:59:45 +01:00
730fbcf6d4 fix capture in api calls 2024-03-27 15:24:44 +01:00
Dongjia "toka" Zhang
f0ee6e0587
Make fuzzer examples's argument parser tell that --input is mandatory (#1973)
* add

* not ture

* fmt
2024-03-26 20:02:42 +01:00
Dongjia "toka" Zhang
cd12546748
Fix llvm api so it works with older LLVM version (#1964)
* aa

* fix

* fix

* fmt

* fmt
2024-03-26 19:26:19 +01:00
Dongjia "toka" Zhang
91778961da
Inline cmplog internal functions code (#1972)
* fmt

* aa

* sattic

* win

* frida

* expose API

* fmt

* frida
2024-03-26 17:42:03 +01:00