aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2019-12-18 11:14:12 +0100
committervan Hauser <vh@thc.org>2019-12-18 11:14:12 +0100
commit939721e2cbcf14f0f9577575c09e16be2ced25fe (patch)
treee32066cf400e512dbc05b4aa2cad4fcae7696c21
parent6226e384512bad86977377b2cece2b5bc0286aa3 (diff)
downloadafl++-939721e2cbcf14f0f9577575c09e16be2ced25fe.tar.gz
v2.59c release2.59c
-rw-r--r--Makefile2
-rw-r--r--README.md4
-rw-r--r--docs/ChangeLog6
-rw-r--r--include/config.h2
-rw-r--r--libdislocator/libdislocator.so.c6
-rw-r--r--llvm_mode/afl-clang-fast.c10
-rwxr-xr-xqemu_mode/build_qemu_support.sh5
-rw-r--r--qemu_mode/patches/afl-qemu-common.h4
-rw-r--r--qemu_mode/patches/afl-qemu-tcg-inl.h4
-rw-r--r--src/afl-fuzz-bitmap.c3
-rw-r--r--src/afl-fuzz-init.c7
-rwxr-xr-xunicorn_mode/build_unicorn_support.sh5
12 files changed, 31 insertions, 27 deletions
diff --git a/Makefile b/Makefile
index ab70e9cb..51aa2c3e 100644
--- a/Makefile
+++ b/Makefile
@@ -310,7 +310,7 @@ all_done: test_build
.NOTPARALLEL: clean
clean:
- rm -f $(PROGS) libradamsa.so afl-as as afl-g++ afl-clang afl-clang++ *.o src/*.o *~ a.out core core.[1-9][0-9]* *.stackdump .test .test1 .test2 test-instr .test-instr0 .test-instr1 qemu_mode/qemu-3.1.1.tar.xz afl-qemu-trace afl-gcc-fast afl-gcc-pass.so afl-gcc-rt.o afl-g++-fast *.so *.8
+ rm -f $(PROGS) libradamsa.so afl-fuzz-document afl-as as afl-g++ afl-clang afl-clang++ *.o src/*.o *~ a.out core core.[1-9][0-9]* *.stackdump .test .test1 .test2 test-instr .test-instr0 .test-instr1 qemu_mode/qemu-3.1.1.tar.xz afl-qemu-trace afl-gcc-fast afl-gcc-pass.so afl-gcc-rt.o afl-g++-fast *.so *.8
rm -rf out_dir qemu_mode/qemu-3.1.1 *.dSYM */*.dSYM
-$(MAKE) -C llvm_mode clean
-$(MAKE) -C gcc_plugin clean
diff --git a/README.md b/README.md
index 09df08c6..bb98357e 100644
--- a/README.md
+++ b/README.md
@@ -2,9 +2,9 @@
![Travis State](https://api.travis-ci.com/vanhauser-thc/AFLplusplus.svg?branch=master)
- Release Version: 2.58c
+ Release Version: 2.59c
- Github Version: 2.58d
+ Github Version: 2.59d
includes all necessary/interesting changes from Google's afl 2.56b
diff --git a/docs/ChangeLog b/docs/ChangeLog
index 408c5692..5132a1c1 100644
--- a/docs/ChangeLog
+++ b/docs/ChangeLog
@@ -13,9 +13,9 @@ Want to stay in the loop on major new features? Join our mailing list by
sending a mail to <afl-users+subscribe@googlegroups.com>.
-----------------------
-Version ++2.58d (dev):
-----------------------
+--------------------------
+Version ++2.59c (release):
+--------------------------
- qbdi_mode: fuzz android native libraries via QBDI framework
- unicorn_mode: switched to the new unicornafl, thanks domenukk
diff --git a/include/config.h b/include/config.h
index 29bdf048..4bb2fe4b 100644
--- a/include/config.h
+++ b/include/config.h
@@ -26,7 +26,7 @@
/* Version string: */
-#define VERSION "++2.58d" // c = release, d = volatile github dev
+#define VERSION "++2.59c" // c = release, d = volatile github dev
/******************************************************
* *
diff --git a/libdislocator/libdislocator.so.c b/libdislocator/libdislocator.so.c
index 33985ce9..0eb3f628 100644
--- a/libdislocator/libdislocator.so.c
+++ b/libdislocator/libdislocator.so.c
@@ -130,7 +130,7 @@ static u8 alloc_verbose, /* Additional debug messages */
static __thread size_t total_mem; /* Currently allocated mem */
static __thread u32 call_depth; /* To avoid recursion via fprintf() */
-static u32 alloc_canary;
+static u32 alloc_canary;
/* This is the main alloc function. It allocates one page more than necessary,
sets that tailing page to PROT_NONE, and then increments the return address
@@ -348,10 +348,10 @@ int posix_memalign(void** ptr, size_t align, size_t len) {
return 0;
}
-
+
size_t rem = len % align;
if (rem) len += align - rem;
-
+
*ptr = __dislocator_alloc(len);
if (*ptr && len) memset(*ptr, ALLOC_CLOBBER, len);
diff --git a/llvm_mode/afl-clang-fast.c b/llvm_mode/afl-clang-fast.c
index c2b54a51..a262e998 100644
--- a/llvm_mode/afl-clang-fast.c
+++ b/llvm_mode/afl-clang-fast.c
@@ -358,7 +358,7 @@ static void edit_params(u32 argc, char** argv) {
}
-//#ifndef __ANDROID__ // not sure, we might need these ifdefs for Android
+ //#ifndef __ANDROID__ // not sure, we might need these ifdefs for Android
switch (bit_mode) {
case 0:
@@ -382,7 +382,8 @@ static void edit_params(u32 argc, char** argv) {
break;
}
-//#endif
+
+ //#endif
}
@@ -443,9 +444,10 @@ int main(int argc, char** argv) {
}
-//#ifndef __ANDROID__ // not sure this is needed for Android, so at the moment we rather keep this out
+ //#ifndef __ANDROID__ // not sure this is needed for Android, so at the moment
+ //we rather keep this out
find_obj(argv[0]);
-//#endif
+ //#endif
edit_params(argc, argv);
diff --git a/qemu_mode/build_qemu_support.sh b/qemu_mode/build_qemu_support.sh
index c3983aa1..afd82f72 100755
--- a/qemu_mode/build_qemu_support.sh
+++ b/qemu_mode/build_qemu_support.sh
@@ -243,10 +243,9 @@ else
fi
echo "[+] Building libcompcov ..."
-make -C libcompcov
+make -C libcompcov && echo "[+] libcompcov ready"
echo "[+] Building unsigaction ..."
-make -C unsigaction
-echo "[+] libcompcov ready"
+make -C unsigaction && echo "[+] unsigaction ready"
echo "[+] All done for qemu_mode, enjoy!"
exit 0
diff --git a/qemu_mode/patches/afl-qemu-common.h b/qemu_mode/patches/afl-qemu-common.h
index 2c1939aa..bddf0515 100644
--- a/qemu_mode/patches/afl-qemu-common.h
+++ b/qemu_mode/patches/afl-qemu-common.h
@@ -79,8 +79,8 @@ void afl_debug_dump_saved_regs();
void afl_persistent_loop();
void tcg_gen_afl_call0(void *func);
-void tcg_gen_afl_compcov_log_call(void *func, target_ulong cur_loc,
- TCGv arg1, TCGv arg2);
+void tcg_gen_afl_compcov_log_call(void *func, target_ulong cur_loc, TCGv arg1,
+ TCGv arg2);
void tcg_gen_afl_maybe_log_call(target_ulong cur_loc);
diff --git a/qemu_mode/patches/afl-qemu-tcg-inl.h b/qemu_mode/patches/afl-qemu-tcg-inl.h
index 33e0d2a7..8ac993a2 100644
--- a/qemu_mode/patches/afl-qemu-tcg-inl.h
+++ b/qemu_mode/patches/afl-qemu-tcg-inl.h
@@ -376,8 +376,8 @@ void tcg_gen_afl_call0(void *func) {
}
-void tcg_gen_afl_compcov_log_call(void *func, target_ulong cur_loc,
- TCGv arg1, TCGv arg2) {
+void tcg_gen_afl_compcov_log_call(void *func, target_ulong cur_loc, TCGv arg1,
+ TCGv arg2) {
int i, real_args, nb_rets, pi;
unsigned sizemask, flags;
diff --git a/src/afl-fuzz-bitmap.c b/src/afl-fuzz-bitmap.c
index 8f00611c..c1aeb9ac 100644
--- a/src/afl-fuzz-bitmap.c
+++ b/src/afl-fuzz-bitmap.c
@@ -685,13 +685,14 @@ u8 save_if_interesting(char** argv, void* mem, u32 len, u8 fault) {
++unique_crashes;
if (infoexec) { // if the user wants to be informed on new crashes - do
#if !TARGET_OS_IPHONE
- // that
+ // that
if (system(infoexec) == -1)
hnb += 0; // we dont care if system errors, but we dont want a
// compiler warning either
#else
WARNF("command execution unsupported");
#endif
+
}
last_crash_time = get_cur_time();
diff --git a/src/afl-fuzz-init.c b/src/afl-fuzz-init.c
index c91b7bb7..825169cf 100644
--- a/src/afl-fuzz-init.c
+++ b/src/afl-fuzz-init.c
@@ -1905,9 +1905,10 @@ void check_binary(u8* fname) {
#else
#if !defined(__arm__) && !defined(__arm64__)
- if ((f_data[0] != 0xCF || f_data[1] != 0xFA || f_data[2] != 0xED)
- && (f_data[0] != 0xCA || f_data[1] != 0xFE || f_data[2] != 0xBA))
- FATAL("Program '%s' is not a 64-bit or universal Mach-O binary", target_path);
+ if ((f_data[0] != 0xCF || f_data[1] != 0xFA || f_data[2] != 0xED) &&
+ (f_data[0] != 0xCA || f_data[1] != 0xFE || f_data[2] != 0xBA))
+ FATAL("Program '%s' is not a 64-bit or universal Mach-O binary",
+ target_path);
#endif
#endif /* ^!__APPLE__ */
diff --git a/unicorn_mode/build_unicorn_support.sh b/unicorn_mode/build_unicorn_support.sh
index 707e47bb..e79e0b51 100755
--- a/unicorn_mode/build_unicorn_support.sh
+++ b/unicorn_mode/build_unicorn_support.sh
@@ -124,8 +124,9 @@ fi
echo "[+] All checks passed!"
echo "[*] Making sure unicornafl is checked out"
-git submodule init || exit 1
-git submodule update || exit 1
+test -d unicorn && { cd unicorn && { git stash ; git pull ; cd .. ; } }
+test -d unicorn || git clone https://github.com/vanhauser-thc/unicorn
+test -d unicorn || { echo "[-] not checked out, please install git or check your internet connection." ; exit 1 ; }
echo "[+] Got unicornafl."
echo "[*] making sure config.h matches"