60 Commits

Author SHA1 Message Date
Dominik Maier
1f34b9f8e1 added python mutator, documentation 2020-12-04 14:26:48 +01:00
Dustin Spicuzza
cd0a25be5e
Use buffer protocol to retrieve result from python post_process (#605)
Saves an extra copy, gives post processing functions more flexibility
2020-11-18 20:29:17 +01:00
Dominik Maier
23f37ff505 fixed alloc errors, code format 2020-11-18 02:33:47 +01:00
Dustin Spicuzza
ea689076b3 Actually make python 'fuzz' method optional
At some point mutator->afl_custom_fuzz was allowed to be NULL, so do that instead of crashing
2020-11-14 19:58:32 -05:00
hexcoder-
54a312a5fe more small fixes 2020-11-13 00:44:08 +01:00
van Hauser
8e1047f5ef support custom mutator introspection 2020-11-10 14:08:21 +01:00
van Hauser
19eddbb0c7 make py functions as optional as they are in the doc 2020-08-24 18:12:08 +02:00
van Hauser
6a34c5aa3e fix python implementation for new function 2020-08-24 18:06:07 +02:00
van Hauser
c7f0d30668 added afl_custom_fuzz_count 2020-08-24 17:32:41 +02:00
Dominik Maier
7470b475a9
Reworked maybe_grow to take a single ptr, renamed to afl_realloc (#505)
* maybe_grow takes a single ptr

* fixed use_deflate

* reworked maybe_grow_bufsize

* helper to access underlying buf

* remove redundant realloc_block

* code format

* fixes

* added unit tests

* renamed maybe_grow to afl_realloc

* BUF_PARAMS -> AFL_BUF_PARAM
2020-08-18 00:50:52 +02:00
Dominik Maier
22d3a5e90a enabled Wextra, fixed bugs 2020-08-07 16:55:58 +02:00
van Hauser
60a5df5262 code-format and slight -S/-M modifications 2020-05-13 16:49:00 +02:00
rish9101
645e331559 Fix previous commit bugs 2020-05-13 19:46:30 +05:30
rish9101
9627458ecc Add post library API as custom mutator and rename pre_save 2020-05-13 18:59:12 +05:30
van Hauser
060f4ea320 enforce mandatary custom functions 2020-05-12 17:05:12 +02:00
van Hauser
7b40d7b942 new code formatting + applied 2020-05-12 11:12:25 +02:00
van Hauser
30bfd44dfd indenting preprocessor directives breaks compilation and cant be fixed, reverting ... :-( 2020-05-10 12:09:37 +02:00
van Hauser
26f8708fed fix warning, code format 2020-05-10 11:35:31 +02:00
van Hauser
fa84e52af0 custom mutator code enhancements and code-format 2020-05-09 11:35:54 +02:00
Rishi Ranjan
190f3024da
Support multiple custom mutators (#282)
* Make a list of custom mutators using env variable

* Set up multiple custom mutators

* Add destroy custom mutator and changes to load_custom_mutator

* Use array instead of list, make changes to afl-fuzz-one for multiple mutators

* Make change to fuzz-one custom_queue_get to support multiple mutators

* Modify custom python mutator support

* Fix bug

* Fix missing afl->mutator->data

* Revert to list with max count

* Change custom_pre_save hook and code format

* Free custom_mutator struct in the list

* Add testcase for multiple custom mutators

* Resolve merge conflict
2020-05-08 20:08:27 +02:00
Dominik Maier
8197e9b2e4
clang-tidy readability-braces (#323) 2020-04-19 16:42:40 +02:00
van Hauser
c961925356 fix plot_data output and code-format 2020-04-17 07:10:42 +02:00
Dominik Maier
8511638afb hunting non-static functions 2020-04-16 15:38:43 +02:00
h1994st
50fc7327f2 python mutator: fix nullptr for python mutator data 2020-04-01 13:10:07 +02:00
h1994st
0dd8ed9171 Fix invalid memory access bug in afl_custom_pre_save of example.c 2020-04-01 13:10:07 +02:00
Dominik Maier
81873d97f8 error handling for custom mutators 2020-04-01 13:10:06 +02:00
Dominik Maier
ab5e0703da tiny changes in custom mut api 2020-04-01 13:10:06 +02:00
hexcoder-
1119a2e185 alloc-inl.h/ck_maybe_grow() back to size_t, reimplement overflow check 2020-04-01 13:10:06 +02:00
Dominik Maier
9785b15ed2 more custom mutator remodelling 2020-04-01 13:10:05 +02:00
Dominik Maier
d6a7630fe2 more api 2020-03-27 11:06:06 +01:00
Dominik Maier
e9c7610cb7 edited custom mutator pre_save api 2020-03-27 11:06:06 +01:00
Dominik Maier
6d3dc83c5d code format 2020-03-27 11:06:06 +01:00
Dominik Maier
77b81e7361 custom mutators might work again like this 2020-03-23 18:18:54 +01:00
van Hauser
684f4dd1c4 honor afl_quiet on env var checks + code-format 2020-03-11 11:42:57 +01:00
Dominik Maier
cc1d6b33b1 unified pointer placement 2020-03-10 22:04:05 +01:00
van Hauser
988a32ced5 code-format 2020-03-09 12:21:54 +01:00
Dominik Maier
dba3595c0a
AFL without globals (#220)
* moved globals to afl, shm and fsrv 

* moved argv to afl state, less bugs

* fixed unicorn docu

* lists everywhere

* merged custom mutators

* fixed leaks in afl-fuzz
2020-03-09 11:24:10 +01:00
van Hauser
36ce9c1fb9 more code format 2020-03-09 08:30:28 +01:00
Andrea Fioraldi
a3161b902e fix null ptr deferef in pre_save python mutator call 2020-03-08 22:02:57 +01:00
h1994st
8f93cf5c55 Add two new hooks for the custom mutator
- `afl_custom_queue_get` and `afl_custom_queue_new_entry`
- Update the corresponding document and examples
2020-03-07 16:28:48 -05:00
Andrea Fioraldi
172d384bf2 custom havoc mutation 2020-03-07 12:11:06 +01:00
h1994st
df46521658 Finish refactoring APIs for the custom mutator and Python module
- Remove AFL_PYTHON_ONLY (env) and python_only (variable)
- Unify fuzz API of the custom mutator and Python module
- Merge the custom mutator into the old python_stage, which is now renamed to custom_mutator_stage
2020-03-03 19:48:13 -05:00
h1994st
90506479e7 Refactoring fuzz_py API 2020-03-02 21:30:10 -05:00
h1994st
b2a2b0fc21 Add initialization funcation wrapper for Python mutator 2020-03-02 19:30:05 -05:00
h1994st
7862416844 Uniform API for both Python and custom mutator 2020-03-02 19:29:41 -05:00
h1994st
7b59e05600 Add new APIs for the custom mutator 2020-03-02 15:27:29 -05:00
Andrea Fioraldi
7323833888 block the usage of mopt with optionals mutators (redqueen/radamsa/etc...) 2020-02-21 16:50:06 +01:00
van Hauser
0d5a8f69e9 fixed Heiko's global search-replace :) 2020-01-20 19:21:44 +01:00
van Hauser
3b9517ae73 v2.60d and year 2020 init 2019-12-31 13:01:08 +01:00
van Hauser
c983e2c5b1 code format 2019-12-28 11:42:06 +01:00