aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2023-02-25 09:20:47 +0100
committerGitHub <noreply@github.com>2023-02-25 09:20:47 +0100
commitea14f3fd40e32234989043a525e3853fcb33c1b6 (patch)
treeaaa8770a743f6ab25a9f2849f62af8a68521344d /include
parent3881ccd0b7520f67fd0b34f010443dc249cbc8f1 (diff)
parent2b5c9954f6099d7a70cbcf2db9af5a19327f385f (diff)
downloadafl++-ea14f3fd40e32234989043a525e3853fcb33c1b6.tar.gz
Merge pull request #1653 from AFLplusplus/dev
push to stable
Diffstat (limited to 'include')
-rw-r--r--include/afl-fuzz.h27
-rw-r--r--include/config.h10
-rw-r--r--include/envs.h3
-rw-r--r--include/forkserver.h2
4 files changed, 32 insertions, 10 deletions
diff --git a/include/afl-fuzz.h b/include/afl-fuzz.h
index edef9207..9bf91faf 100644
--- a/include/afl-fuzz.h
+++ b/include/afl-fuzz.h
@@ -344,6 +344,7 @@ enum {
/* 12 */ PY_FUNC_INTROSPECTION,
/* 13 */ PY_FUNC_DESCRIBE,
/* 14 */ PY_FUNC_FUZZ_SEND,
+ /* 15 */ PY_FUNC_SPLICE_OPTOUT,
PY_FUNC_COUNT
};
@@ -398,7 +399,7 @@ typedef struct afl_env_vars {
afl_cycle_schedules, afl_expand_havoc, afl_statsd, afl_cmplog_only_new,
afl_exit_on_seed_issues, afl_try_affinity, afl_ignore_problems,
afl_keep_timeouts, afl_pizza_mode, afl_no_crash_readme,
- afl_no_startup_calibration;
+ afl_ignore_timeouts, afl_no_startup_calibration, afl_no_warn_instability;
u8 *afl_tmpdir, *afl_custom_mutator_library, *afl_python_module, *afl_path,
*afl_hang_tmout, *afl_forksrv_init_tmout, *afl_preload,
@@ -495,6 +496,7 @@ typedef struct afl_state {
no_unlink, /* do not unlink cur_input */
debug, /* Debug mode */
custom_only, /* Custom mutator only mode */
+ custom_splice_optout, /* Custom mutator no splice buffer */
is_main_node, /* if this is the main node */
is_secondary_node, /* if this is a secondary instance */
pizza_is_served; /* pizza mode */
@@ -829,17 +831,29 @@ struct custom_mutator {
u32 (*afl_custom_fuzz_count)(void *data, const u8 *buf, size_t buf_size);
/**
- * Perform custom mutations on a given input
+ * Opt-out of a splicing input for the fuzz mutator
*
- * (Optional for now. Required in the future)
+ * Empty dummy function. It's presence tells afl-fuzz not to pass a
+ * splice data pointer and len.
*
* @param data pointer returned in afl_custom_init by this custom mutator
+ * @noreturn
+ */
+ void (*afl_custom_splice_optout)(void *data);
+
+ /**
+ * Perform custom mutations on a given input
+ *
+ * (Optional)
+ *
+ * Getting an add_buf can be skipped by using afl_custom_splice_optout().
+ *
+ * @param[in] data Pointer returned in afl_custom_init by this custom mutator
* @param[in] buf Pointer to the input data to be mutated and the mutated
* output
* @param[in] buf_size Size of the input/output data
- * @param[out] out_buf the new buffer. We may reuse *buf if large enough.
- * *out_buf = NULL is treated as FATAL.
- * @param[in] add_buf Buffer containing the additional test case
+ * @param[out] out_buf The new buffer, under your memory mgmt.
+ * @param[in] add_buf Buffer containing an additional test case (splicing)
* @param[in] add_buf_size Size of the additional test case
* @param[in] max_size Maximum size of the mutated output. The mutation must
* not produce data larger than max_size.
@@ -1057,6 +1071,7 @@ u8 havoc_mutation_probability_py(void *);
u8 queue_get_py(void *, const u8 *);
const char *introspection_py(void *);
u8 queue_new_entry_py(void *, const u8 *, const u8 *);
+void splice_optout(void *);
void deinit_py(void *);
#endif
diff --git a/include/config.h b/include/config.h
index a5a4c473..e46f515a 100644
--- a/include/config.h
+++ b/include/config.h
@@ -364,9 +364,9 @@
* *
***********************************************************/
-/* Call count interval between reseeding the libc PRNG from /dev/urandom: */
+/* Call count interval between reseeding the PRNG from /dev/urandom: */
-#define RESEED_RNG 100000
+#define RESEED_RNG 2500000
/* The default maximum testcase cache size in MB, 0 = disable.
A value between 50 and 250 is a good default value. Note that the
@@ -491,10 +491,14 @@
#define AFL_TXT_MIN_LEN 12
+/* Maximum length of a queue input to be evaluated for "is_ascii"? */
+
+#define AFL_TXT_MAX_LEN 65535
+
/* What is the minimum percentage of ascii characters present to be classifed
as "is_ascii"? */
-#define AFL_TXT_MIN_PERCENT 94
+#define AFL_TXT_MIN_PERCENT 99
/* How often to perform ASCII mutations 0 = disable, 1-8 are good values */
diff --git a/include/envs.h b/include/envs.h
index 46fc796b..cf069a00 100644
--- a/include/envs.h
+++ b/include/envs.h
@@ -104,6 +104,7 @@ static char *afl_environment_variables[] = {
"AFL_HARDEN",
"AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES",
"AFL_IGNORE_PROBLEMS",
+ "AFL_IGNORE_TIMEOUTS",
"AFL_IGNORE_UNKNOWN_ENVS",
"AFL_IMPORT_FIRST",
"AFL_INPUT_LEN_MIN",
@@ -133,6 +134,7 @@ static char *afl_environment_variables[] = {
"AFL_LLVM_CTX",
"AFL_LLVM_CTX_K",
"AFL_LLVM_DICT2FILE",
+ "AFL_LLVM_DICT2FILE_NO_MAIN",
"AFL_LLVM_DOCUMENT_IDS",
"AFL_LLVM_INSTRIM_LOOPHEAD",
"AFL_LLVM_INSTRUMENT",
@@ -171,6 +173,7 @@ static char *afl_environment_variables[] = {
"AFL_NO_UI",
"AFL_NO_PYTHON",
"AFL_NO_STARTUP_CALIBRATION",
+ "AFL_NO_WARN_INSTABILITY",
"AFL_UNTRACER_FILE",
"AFL_LLVM_USE_TRACE_PC",
"AFL_MAP_SIZE",
diff --git a/include/forkserver.h b/include/forkserver.h
index 35bc1771..50898a08 100644
--- a/include/forkserver.h
+++ b/include/forkserver.h
@@ -43,7 +43,7 @@ typedef enum NyxReturnValue {
Normal,
Crash,
Asan,
- Timout,
+ Timeout,
InvalidWriteToPayload,
Error,
IoError,