aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2021-11-06 14:29:16 +0100
committervanhauser-thc <vh@thc.org>2021-11-06 14:29:16 +0100
commit61039b410c98cb971daff5778b1591d0e5cbfd3e (patch)
tree64e9d060065d4114c465189b6c9ee9e403860046
parentb5d7f6bd60e053a47996b1f1b9c70008bb106a32 (diff)
downloadAFLplusplus-61039b410c98cb971daff5778b1591d0e5cbfd3e.tar.gz
better error report for old qemu/frida cmplog
-rw-r--r--include/types.h1
-rw-r--r--src/afl-forkserver.c15
2 files changed, 15 insertions, 1 deletions
diff --git a/include/types.h b/include/types.h
index 063e6bbd..bca4ff92 100644
--- a/include/types.h
+++ b/include/types.h
@@ -47,6 +47,7 @@ typedef uint128_t u128;
#define FS_ERROR_SHMAT 8
#define FS_ERROR_MMAP 16
#define FS_ERROR_OLD_CMPLOG 32
+#define FS_ERROR_OLD_CMPLOG_QEMU 64
/* Reporting options */
#define FS_OPT_ENABLED 0x80000001
diff --git a/src/afl-forkserver.c b/src/afl-forkserver.c
index 93fd19e1..94c90701 100644
--- a/src/afl-forkserver.c
+++ b/src/afl-forkserver.c
@@ -347,6 +347,11 @@ static void report_error_and_exit(int error) {
"the -c cmplog target was instrumented with an too old afl++ "
"version, you need to recompile it.");
break;
+ case FS_ERROR_OLD_CMPLOG_QEMU:
+ FATAL(
+ "The AFL++ QEMU/FRIDA loaders are from an older version, for -c you "
+ "need to recompile it.\n");
+ break;
default:
FATAL("unknown error code %d from fuzzing target!", error);
@@ -670,7 +675,15 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
if ((status & FS_OPT_NEWCMPLOG) == 0 && fsrv->cmplog_binary) {
- report_error_and_exit(FS_ERROR_OLD_CMPLOG);
+ if (fsrv->qemu_mode || fsrv->frida_mode) {
+
+ report_error_and_exit(FS_ERROR_OLD_CMPLOG_QEMU);
+
+ } else {
+
+ report_error_and_exit(FS_ERROR_OLD_CMPLOG);
+
+ }
}