mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-14 19:08:08 +00:00
afl++ -> AFL++
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
FROM ubuntu:22.04 AS aflplusplus
|
FROM ubuntu:22.04 AS aflplusplus
|
||||||
LABEL "maintainer"="afl++ team <afl@aflplus.plus>"
|
LABEL "maintainer"="AFL++ team <afl@aflplus.plus>"
|
||||||
LABEL "about"="AFLplusplus container image"
|
LABEL "about"="AFLplusplus container image"
|
||||||
|
|
||||||
### Comment out to enable these features
|
### Comment out to enable these features
|
||||||
@ -94,4 +94,4 @@ RUN sed -i.bak 's/^ -/ /g' GNUmakefile && \
|
|||||||
RUN echo "set encoding=utf-8" > /root/.vimrc && \
|
RUN echo "set encoding=utf-8" > /root/.vimrc && \
|
||||||
echo ". /etc/bash_completion" >> ~/.bashrc && \
|
echo ". /etc/bash_completion" >> ~/.bashrc && \
|
||||||
echo 'alias joe="joe --wordwrap --joe_state -nobackup"' >> ~/.bashrc && \
|
echo 'alias joe="joe --wordwrap --joe_state -nobackup"' >> ~/.bashrc && \
|
||||||
echo "export PS1='"'[afl++ \h] \w \$ '"'" >> ~/.bashrc
|
echo "export PS1='"'[AFL++ \h] \w \$ '"'" >> ~/.bashrc
|
||||||
|
12
GNUmakefile
12
GNUmakefile
@ -39,7 +39,7 @@ ASAN_OPTIONS=detect_leaks=0
|
|||||||
SYS = $(shell uname -s)
|
SYS = $(shell uname -s)
|
||||||
ARCH = $(shell uname -m)
|
ARCH = $(shell uname -m)
|
||||||
|
|
||||||
$(info [*] Compiling afl++ for OS $(SYS) on ARCH $(ARCH))
|
$(info [*] Compiling AFL++ for OS $(SYS) on ARCH $(ARCH))
|
||||||
|
|
||||||
ifdef NO_SPLICING
|
ifdef NO_SPLICING
|
||||||
override CFLAGS_OPT += -DNO_SPLICING
|
override CFLAGS_OPT += -DNO_SPLICING
|
||||||
@ -359,7 +359,7 @@ performance-test: source-only
|
|||||||
help:
|
help:
|
||||||
@echo "HELP --- the following make targets exist:"
|
@echo "HELP --- the following make targets exist:"
|
||||||
@echo "=========================================="
|
@echo "=========================================="
|
||||||
@echo "all: the main afl++ binaries and llvm/gcc instrumentation"
|
@echo "all: the main AFL++ binaries and llvm/gcc instrumentation"
|
||||||
@echo "binary-only: everything for binary-only fuzzing: frida_mode, nyx_mode, qemu_mode, frida_mode, unicorn_mode, coresight_mode, libdislocator, libtokencap"
|
@echo "binary-only: everything for binary-only fuzzing: frida_mode, nyx_mode, qemu_mode, frida_mode, unicorn_mode, coresight_mode, libdislocator, libtokencap"
|
||||||
@echo "source-only: everything for source code fuzzing: nyx_mode, libdislocator, libtokencap"
|
@echo "source-only: everything for source code fuzzing: nyx_mode, libdislocator, libtokencap"
|
||||||
@echo "distrib: everything (for both binary-only and source code fuzzing)"
|
@echo "distrib: everything (for both binary-only and source code fuzzing)"
|
||||||
@ -367,7 +367,7 @@ help:
|
|||||||
@echo "install: installs everything you have compiled with the build option above"
|
@echo "install: installs everything you have compiled with the build option above"
|
||||||
@echo "clean: cleans everything compiled (not downloads when on a checkout)"
|
@echo "clean: cleans everything compiled (not downloads when on a checkout)"
|
||||||
@echo "deepclean: cleans everything including downloads"
|
@echo "deepclean: cleans everything including downloads"
|
||||||
@echo "uninstall: uninstall afl++ from the system"
|
@echo "uninstall: uninstall AFL++ from the system"
|
||||||
@echo "code-format: format the code, do this before you commit and send a PR please!"
|
@echo "code-format: format the code, do this before you commit and send a PR please!"
|
||||||
@echo "tests: this runs the test framework. It is more catered for the developers, but if you run into problems this helps pinpointing the problem"
|
@echo "tests: this runs the test framework. It is more catered for the developers, but if you run into problems this helps pinpointing the problem"
|
||||||
@echo "unit: perform unit tests (based on cmocka and GNU linker)"
|
@echo "unit: perform unit tests (based on cmocka and GNU linker)"
|
||||||
@ -749,7 +749,7 @@ endif
|
|||||||
@echo
|
@echo
|
||||||
|
|
||||||
%.8: %
|
%.8: %
|
||||||
@echo .TH $* 8 $(BUILD_DATE) "afl++" > $@
|
@echo .TH $* 8 $(BUILD_DATE) "AFL++" > $@
|
||||||
@echo .SH NAME >> $@
|
@echo .SH NAME >> $@
|
||||||
@echo .B $* >> $@
|
@echo .B $* >> $@
|
||||||
@echo >> $@
|
@echo >> $@
|
||||||
@ -761,8 +761,8 @@ endif
|
|||||||
@./$* -hh 2>&1 | tail -n +4 >> $@
|
@./$* -hh 2>&1 | tail -n +4 >> $@
|
||||||
@echo >> $@
|
@echo >> $@
|
||||||
@echo .SH AUTHOR >> $@
|
@echo .SH AUTHOR >> $@
|
||||||
@echo "afl++ was written by Michal \"lcamtuf\" Zalewski and is maintained by Marc \"van Hauser\" Heuse <mh@mh-sec.de>, Heiko \"hexcoder-\" Eissfeldt <heiko.eissfeldt@hexco.de>, Andrea Fioraldi <andreafioraldi@gmail.com> and Dominik Maier <domenukk@gmail.com>" >> $@
|
@echo "AFL++ was written by Michal \"lcamtuf\" Zalewski and is maintained by Marc \"van Hauser\" Heuse <mh@mh-sec.de>, Dominik Maier <domenukk@gmail.com>, Andrea Fioraldi <andreafioraldi@gmail.com> and Heiko \"hexcoder-\" Eissfeldt <heiko.eissfeldt@hexco.de>" >> $@
|
||||||
@echo The homepage of afl++ is: https://github.com/AFLplusplus/AFLplusplus >> $@
|
@echo The homepage of AFL++ is: https://github.com/AFLplusplus/AFLplusplus >> $@
|
||||||
@echo >> $@
|
@echo >> $@
|
||||||
@echo .SH LICENSE >> $@
|
@echo .SH LICENSE >> $@
|
||||||
@echo Apache License Version 2.0, January 2004 >> $@
|
@echo Apache License Version 2.0, January 2004 >> $@
|
||||||
|
@ -175,7 +175,7 @@ all_done: test_build
|
|||||||
.NOTPARALLEL: clean
|
.NOTPARALLEL: clean
|
||||||
|
|
||||||
%.8: %
|
%.8: %
|
||||||
@echo .TH $* 8 `date "+%Y-%m-%d"` "afl++" > ./$@
|
@echo .TH $* 8 `date "+%Y-%m-%d"` "AFL++" > ./$@
|
||||||
@echo .SH NAME >> ./$@
|
@echo .SH NAME >> ./$@
|
||||||
@echo .B $* >> ./$@
|
@echo .B $* >> ./$@
|
||||||
@echo >> ./$@
|
@echo >> ./$@
|
||||||
@ -187,8 +187,8 @@ all_done: test_build
|
|||||||
@./$* -h 2>&1 | tail -n +4 >> ./$@
|
@./$* -h 2>&1 | tail -n +4 >> ./$@
|
||||||
@echo >> ./$@
|
@echo >> ./$@
|
||||||
@echo .SH AUTHOR >> ./$@
|
@echo .SH AUTHOR >> ./$@
|
||||||
@echo "afl++ was written by Michal \"lcamtuf\" Zalewski and is maintained by Marc \"van Hauser\" Heuse <mh@mh-sec.de>, Heiko \"hexcoder-\" Eissfeldt <heiko.eissfeldt@hexco.de>, Andrea Fioraldi <andreafioraldi@gmail.com> and Dominik Maier <domenukk@gmail.com>" >> ./$@
|
@echo "AFL++ was written by Michal \"lcamtuf\" Zalewski and is maintained by Marc \"van Hauser\" Heuse <mh@mh-sec.de>, Dominik Maier <domenukk@gmail.com>, Andrea Fioraldi <andreafioraldi@gmail.com> and Heiko \"hexcoder-\" Eissfeldt <heiko.eissfeldt@hexco.de>" >> ./$@
|
||||||
@echo The homepage of afl++ is: https://github.com/AFLplusplus/AFLplusplus >> ./$@
|
@echo The homepage of AFL++ is: https://github.com/AFLplusplus/AFLplusplus >> ./$@
|
||||||
@echo >> ./$@
|
@echo >> ./$@
|
||||||
@echo .SH LICENSE >> ./$@
|
@echo .SH LICENSE >> ./$@
|
||||||
@echo Apache License Version 2.0, January 2004 >> ./$@
|
@echo Apache License Version 2.0, January 2004 >> ./$@
|
||||||
|
@ -510,7 +510,7 @@ install: all
|
|||||||
install -m 644 instrumentation/README.*.md $${DESTDIR}$(DOC_PATH)/
|
install -m 644 instrumentation/README.*.md $${DESTDIR}$(DOC_PATH)/
|
||||||
|
|
||||||
%.8: %
|
%.8: %
|
||||||
@echo .TH $* 8 $(BUILD_DATE) "afl++" > ./$@
|
@echo .TH $* 8 $(BUILD_DATE) "AFL++" > ./$@
|
||||||
@echo .SH NAME >> ./$@
|
@echo .SH NAME >> ./$@
|
||||||
@printf "%s" ".B $* \- " >> ./$@
|
@printf "%s" ".B $* \- " >> ./$@
|
||||||
@./$* -h 2>&1 | head -n 1 | sed -e "s/$$(printf '\e')[^m]*m//g" >> ./$@
|
@./$* -h 2>&1 | head -n 1 | sed -e "s/$$(printf '\e')[^m]*m//g" >> ./$@
|
||||||
@ -524,8 +524,8 @@ install: all
|
|||||||
@./$* -h 2>&1 | tail -n +4 >> ./$@
|
@./$* -h 2>&1 | tail -n +4 >> ./$@
|
||||||
@echo >> ./$@
|
@echo >> ./$@
|
||||||
@echo .SH AUTHOR >> ./$@
|
@echo .SH AUTHOR >> ./$@
|
||||||
@echo "afl++ was written by Michal \"lcamtuf\" Zalewski and is maintained by Marc \"van Hauser\" Heuse <mh@mh-sec.de>, Heiko \"hexcoder-\" Eissfeldt <heiko.eissfeldt@hexco.de>, Andrea Fioraldi <andreafioraldi@gmail.com> and Dominik Maier <domenukk@gmail.com>" >> ./$@
|
@echo "AFL++ was written by Michal \"lcamtuf\" Zalewski and is maintained by Marc \"van Hauser\" Heuse <mh@mh-sec.de>, Dominik Maier <domenukk@gmail.com>, Andrea Fioraldi <andreafioraldi@gmail.com> and Heiko \"hexcoder-\" Eissfeldt <heiko.eissfeldt@hexco.de>" >> ./$@
|
||||||
@echo The homepage of afl++ is: https://github.com/AFLplusplus/AFLplusplus >> ./$@
|
@echo The homepage of AFL++ is: https://github.com/AFLplusplus/AFLplusplus >> ./$@
|
||||||
@echo >> ./$@
|
@echo >> ./$@
|
||||||
@echo .SH LICENSE >> ./$@
|
@echo .SH LICENSE >> ./$@
|
||||||
@echo Apache License Version 2.0, January 2004 >> ./$@
|
@echo Apache License Version 2.0, January 2004 >> ./$@
|
||||||
|
2
afl-cmin
2
afl-cmin
@ -149,7 +149,7 @@ BEGIN {
|
|||||||
redirected = 0
|
redirected = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
print "corpus minimization tool for afl++ (awk version)\n"
|
print "corpus minimization tool for AFL++ (awk version)\n"
|
||||||
|
|
||||||
# defaults
|
# defaults
|
||||||
extra_par = ""
|
extra_par = ""
|
||||||
|
@ -229,7 +229,7 @@
|
|||||||
afl-showmap and other tools.
|
afl-showmap and other tools.
|
||||||
- afl-cc:
|
- afl-cc:
|
||||||
- detect overflow reads on initial input buffer for asan
|
- detect overflow reads on initial input buffer for asan
|
||||||
- new cmplog mode (incompatible with older afl++ versions)
|
- new cmplog mode (incompatible with older AFL++ versions)
|
||||||
- support llvm IR select instrumentation for default PCGUARD and LTO
|
- support llvm IR select instrumentation for default PCGUARD and LTO
|
||||||
- fix for shared linking on MacOS
|
- fix for shared linking on MacOS
|
||||||
- better selective instrumentation AFL_LLVM_{ALLOW|DENY}LIST
|
- better selective instrumentation AFL_LLVM_{ALLOW|DENY}LIST
|
||||||
|
@ -51,7 +51,7 @@ make source-only
|
|||||||
|
|
||||||
These build targets exist:
|
These build targets exist:
|
||||||
|
|
||||||
* all: the main afl++ binaries and llvm/gcc instrumentation
|
* all: the main AFL++ binaries and llvm/gcc instrumentation
|
||||||
* binary-only: everything for binary-only fuzzing: frida_mode, nyx_mode,
|
* binary-only: everything for binary-only fuzzing: frida_mode, nyx_mode,
|
||||||
qemu_mode, frida_mode, unicorn_mode, coresight_mode, libdislocator,
|
qemu_mode, frida_mode, unicorn_mode, coresight_mode, libdislocator,
|
||||||
libtokencap
|
libtokencap
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
// Be careful! _WANT_ORIGINAL_AFL_ALLOC is not compatible with custom mutators
|
// Be careful! _WANT_ORIGINAL_AFL_ALLOC is not compatible with custom mutators
|
||||||
|
|
||||||
#ifndef _WANT_ORIGINAL_AFL_ALLOC
|
#ifndef _WANT_ORIGINAL_AFL_ALLOC
|
||||||
// afl++ stuff without memory corruption checks - for speed
|
// AFL++ stuff without memory corruption checks - for speed
|
||||||
|
|
||||||
/* User-facing macro to sprintf() to a dynamically allocated buffer. */
|
/* User-facing macro to sprintf() to a dynamically allocated buffer. */
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* SanitizeCoverage.cpp ported to afl++ LTO :-) */
|
/* SanitizeCoverage.cpp ported to AFL++ LTO :-) */
|
||||||
|
|
||||||
#define AFL_LLVM_PASS
|
#define AFL_LLVM_PASS
|
||||||
|
|
||||||
@ -234,7 +234,7 @@ class ModuleSanitizerCoverageLTO
|
|||||||
|
|
||||||
SanitizerCoverageOptions Options;
|
SanitizerCoverageOptions Options;
|
||||||
|
|
||||||
// afl++ START
|
// AFL++ START
|
||||||
// const SpecialCaseList * Allowlist;
|
// const SpecialCaseList * Allowlist;
|
||||||
// const SpecialCaseList * Blocklist;
|
// const SpecialCaseList * Blocklist;
|
||||||
uint32_t autodictionary = 1;
|
uint32_t autodictionary = 1;
|
||||||
@ -260,7 +260,7 @@ class ModuleSanitizerCoverageLTO
|
|||||||
Value *MapPtrFixed = NULL;
|
Value *MapPtrFixed = NULL;
|
||||||
std::ofstream dFile;
|
std::ofstream dFile;
|
||||||
size_t found = 0;
|
size_t found = 0;
|
||||||
// afl++ END
|
// AFL++ END
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -404,7 +404,7 @@ bool ModuleSanitizerCoverageLTO::instrumentModule(
|
|||||||
Int8Ty = IRB.getInt8Ty();
|
Int8Ty = IRB.getInt8Ty();
|
||||||
Int1Ty = IRB.getInt1Ty();
|
Int1Ty = IRB.getInt1Ty();
|
||||||
|
|
||||||
/* afl++ START */
|
/* AFL++ START */
|
||||||
char *ptr;
|
char *ptr;
|
||||||
LLVMContext &Ctx = M.getContext();
|
LLVMContext &Ctx = M.getContext();
|
||||||
Ct = &Ctx;
|
Ct = &Ctx;
|
||||||
@ -978,7 +978,7 @@ bool ModuleSanitizerCoverageLTO::instrumentModule(
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// afl++ END
|
// AFL++ END
|
||||||
|
|
||||||
SanCovTracePCIndir =
|
SanCovTracePCIndir =
|
||||||
M.getOrInsertFunction(SanCovTracePCIndirName, VoidTy, IntptrTy);
|
M.getOrInsertFunction(SanCovTracePCIndirName, VoidTy, IntptrTy);
|
||||||
@ -1002,7 +1002,7 @@ bool ModuleSanitizerCoverageLTO::instrumentModule(
|
|||||||
for (auto &F : M)
|
for (auto &F : M)
|
||||||
instrumentFunction(F, DTCallback, PDTCallback);
|
instrumentFunction(F, DTCallback, PDTCallback);
|
||||||
|
|
||||||
// afl++ START
|
// AFL++ START
|
||||||
if (dFile.is_open()) dFile.close();
|
if (dFile.is_open()) dFile.close();
|
||||||
|
|
||||||
if (!getenv("AFL_LLVM_LTO_SKIPINIT") &&
|
if (!getenv("AFL_LLVM_LTO_SKIPINIT") &&
|
||||||
@ -1156,7 +1156,7 @@ bool ModuleSanitizerCoverageLTO::instrumentModule(
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// afl++ END
|
// AFL++ END
|
||||||
|
|
||||||
// We don't reference these arrays directly in any of our runtime functions,
|
// We don't reference these arrays directly in any of our runtime functions,
|
||||||
// so we need to prevent them from being dead stripped.
|
// so we need to prevent them from being dead stripped.
|
||||||
@ -1213,10 +1213,10 @@ static bool shouldInstrumentBlock(const Function &F, const BasicBlock *BB,
|
|||||||
// (catchswitch blocks).
|
// (catchswitch blocks).
|
||||||
if (BB->getFirstInsertionPt() == BB->end()) return false;
|
if (BB->getFirstInsertionPt() == BB->end()) return false;
|
||||||
|
|
||||||
// afl++ START
|
// AFL++ START
|
||||||
if (!Options.NoPrune && &F.getEntryBlock() == BB && F.size() > 1)
|
if (!Options.NoPrune && &F.getEntryBlock() == BB && F.size() > 1)
|
||||||
return false;
|
return false;
|
||||||
// afl++ END
|
// AFL++ END
|
||||||
|
|
||||||
if (Options.NoPrune || &F.getEntryBlock() == BB) return true;
|
if (Options.NoPrune || &F.getEntryBlock() == BB) return true;
|
||||||
|
|
||||||
@ -1258,10 +1258,10 @@ void ModuleSanitizerCoverageLTO::instrumentFunction(
|
|||||||
// if (Blocklist && Blocklist->inSection("coverage", "fun", F.getName()))
|
// if (Blocklist && Blocklist->inSection("coverage", "fun", F.getName()))
|
||||||
// return;
|
// return;
|
||||||
|
|
||||||
// afl++ START
|
// AFL++ START
|
||||||
if (!F.size()) return;
|
if (!F.size()) return;
|
||||||
if (!isInInstrumentList(&F, FMNAME)) return;
|
if (!isInInstrumentList(&F, FMNAME)) return;
|
||||||
// afl++ END
|
// AFL++ END
|
||||||
|
|
||||||
if (Options.CoverageType >= SanitizerCoverageOptions::SCK_Edge)
|
if (Options.CoverageType >= SanitizerCoverageOptions::SCK_Edge)
|
||||||
SplitAllCriticalEdges(
|
SplitAllCriticalEdges(
|
||||||
@ -1559,7 +1559,7 @@ bool ModuleSanitizerCoverageLTO::InjectCoverage(
|
|||||||
|
|
||||||
for (size_t i = 0, N = AllBlocks.size(); i < N; i++) {
|
for (size_t i = 0, N = AllBlocks.size(); i < N; i++) {
|
||||||
|
|
||||||
// afl++ START
|
// AFL++ START
|
||||||
if (BlockList.size()) {
|
if (BlockList.size()) {
|
||||||
|
|
||||||
int skip = 0;
|
int skip = 0;
|
||||||
@ -1581,7 +1581,7 @@ bool ModuleSanitizerCoverageLTO::InjectCoverage(
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// afl++ END
|
// AFL++ END
|
||||||
|
|
||||||
InjectCoverageAtBlock(F, *AllBlocks[i], i, IsLeafFunc);
|
InjectCoverageAtBlock(F, *AllBlocks[i], i, IsLeafFunc);
|
||||||
|
|
||||||
@ -1647,7 +1647,7 @@ void ModuleSanitizerCoverageLTO::InjectCoverageAtBlock(Function &F,
|
|||||||
|
|
||||||
if (Options.TracePCGuard) {
|
if (Options.TracePCGuard) {
|
||||||
|
|
||||||
// afl++ START
|
// AFL++ START
|
||||||
++afl_global_id;
|
++afl_global_id;
|
||||||
|
|
||||||
if (dFile.is_open()) {
|
if (dFile.is_open()) {
|
||||||
@ -1711,7 +1711,7 @@ void ModuleSanitizerCoverageLTO::InjectCoverageAtBlock(Function &F,
|
|||||||
// done :)
|
// done :)
|
||||||
|
|
||||||
inst++;
|
inst++;
|
||||||
// afl++ END
|
// AFL++ END
|
||||||
|
|
||||||
/*
|
/*
|
||||||
XXXXXXXXXXXXXXXXXXX
|
XXXXXXXXXXXXXXXXXXX
|
||||||
|
@ -584,7 +584,7 @@ bool isInInstrumentList(llvm::Function *F, std::string Filename) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Calculate the number of average collisions that would occur if all
|
// Calculate the number of average collisions that would occur if all
|
||||||
// location IDs would be assigned randomly (like normal afl/afl++).
|
// location IDs would be assigned randomly (like normal afl/AFL++).
|
||||||
// This uses the "balls in bins" algorithm.
|
// This uses the "balls in bins" algorithm.
|
||||||
unsigned long long int calculateCollisions(uint32_t edges) {
|
unsigned long long int calculateCollisions(uint32_t edges) {
|
||||||
|
|
||||||
|
@ -744,7 +744,7 @@ static void registerAFLdict2filePass(const PassManagerBuilder &,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static RegisterPass<AFLdict2filePass> X("afl-dict2file",
|
static RegisterPass<AFLdict2filePass> X("afl-dict2file",
|
||||||
"afl++ dict2file instrumentation pass",
|
"AFL++ dict2file instrumentation pass",
|
||||||
false, false);
|
false, false);
|
||||||
|
|
||||||
static RegisterStandardPasses RegisterAFLdict2filePass(
|
static RegisterStandardPasses RegisterAFLdict2filePass(
|
||||||
|
@ -356,7 +356,7 @@ fi
|
|||||||
|
|
||||||
if ! command -v "$CROSS" > /dev/null ; then
|
if ! command -v "$CROSS" > /dev/null ; then
|
||||||
if [ "$CPU_TARGET" = "$(uname -m)" ] ; then
|
if [ "$CPU_TARGET" = "$(uname -m)" ] ; then
|
||||||
echo "[+] Building afl++ qemu support libraries with CC=$CC"
|
echo "[+] Building AFL++ qemu support libraries with CC=$CC"
|
||||||
echo "[+] Building libcompcov ..."
|
echo "[+] Building libcompcov ..."
|
||||||
make -C libcompcov && echo "[+] libcompcov ready"
|
make -C libcompcov && echo "[+] libcompcov ready"
|
||||||
echo "[+] Building unsigaction ..."
|
echo "[+] Building unsigaction ..."
|
||||||
@ -371,7 +371,7 @@ if ! command -v "$CROSS" > /dev/null ; then
|
|||||||
echo "[!] Cross compiler $CROSS could not be found, cannot compile libcompcov libqasan and unsigaction"
|
echo "[!] Cross compiler $CROSS could not be found, cannot compile libcompcov libqasan and unsigaction"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "[+] Building afl++ qemu support libraries with CC=\"$CROSS $CROSS_FLAGS\""
|
echo "[+] Building AFL++ qemu support libraries with CC=\"$CROSS $CROSS_FLAGS\""
|
||||||
echo "[+] Building libcompcov ..."
|
echo "[+] Building libcompcov ..."
|
||||||
make -C libcompcov CC="$CROSS $CROSS_FLAGS" && echo "[+] libcompcov ready"
|
make -C libcompcov CC="$CROSS $CROSS_FLAGS" && echo "[+] libcompcov ready"
|
||||||
echo "[+] Building unsigaction ..."
|
echo "[+] Building unsigaction ..."
|
||||||
|
@ -642,7 +642,7 @@ static void edit_params(u32 argc, char **argv, char **envp) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//#if LLVM_MAJOR >= 13
|
//#if LLVM_MAJOR >= 13
|
||||||
// // Use the old pass manager in LLVM 14 which the afl++ passes still
|
// // Use the old pass manager in LLVM 14 which the AFL++ passes still
|
||||||
// use. cc_params[cc_par_cnt++] = "-flegacy-pass-manager";
|
// use. cc_params[cc_par_cnt++] = "-flegacy-pass-manager";
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
|
@ -489,7 +489,7 @@ static void report_error_and_exit(int error) {
|
|||||||
break;
|
break;
|
||||||
case FS_ERROR_OLD_CMPLOG:
|
case FS_ERROR_OLD_CMPLOG:
|
||||||
FATAL(
|
FATAL(
|
||||||
"the -c cmplog target was instrumented with an too old afl++ "
|
"the -c cmplog target was instrumented with an too old AFL++ "
|
||||||
"version, you need to recompile it.");
|
"version, you need to recompile it.");
|
||||||
break;
|
break;
|
||||||
case FS_ERROR_OLD_CMPLOG_QEMU:
|
case FS_ERROR_OLD_CMPLOG_QEMU:
|
||||||
@ -987,7 +987,7 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
|
|||||||
|
|
||||||
if ((status & FS_OPT_ENABLED) == FS_OPT_ENABLED) {
|
if ((status & FS_OPT_ENABLED) == FS_OPT_ENABLED) {
|
||||||
|
|
||||||
// workaround for recent afl++ versions
|
// workaround for recent AFL++ versions
|
||||||
if ((status & FS_OPT_OLD_AFLPP_WORKAROUND) == FS_OPT_OLD_AFLPP_WORKAROUND)
|
if ((status & FS_OPT_OLD_AFLPP_WORKAROUND) == FS_OPT_OLD_AFLPP_WORKAROUND)
|
||||||
status = (status & 0xf0ffffff);
|
status = (status & 0xf0ffffff);
|
||||||
|
|
||||||
@ -1059,7 +1059,7 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
|
|||||||
|
|
||||||
FATAL(
|
FATAL(
|
||||||
"Target's coverage map size of %u is larger than the one this "
|
"Target's coverage map size of %u is larger than the one this "
|
||||||
"afl++ is set with (%u). Either set AFL_MAP_SIZE=%u and restart "
|
"AFL++ is set with (%u). Either set AFL_MAP_SIZE=%u and restart "
|
||||||
" afl-fuzz, or change MAP_SIZE_POW2 in config.h and recompile "
|
" afl-fuzz, or change MAP_SIZE_POW2 in config.h and recompile "
|
||||||
"afl-fuzz",
|
"afl-fuzz",
|
||||||
tmp_map_size, fsrv->map_size, tmp_map_size);
|
tmp_map_size, fsrv->map_size, tmp_map_size);
|
||||||
|
@ -1280,16 +1280,16 @@ int main(int argc, char **argv_orig, char **envp) {
|
|||||||
|
|
||||||
if (afl->fsrv.mem_limit && afl->shm.cmplog_mode) afl->fsrv.mem_limit += 260;
|
if (afl->fsrv.mem_limit && afl->shm.cmplog_mode) afl->fsrv.mem_limit += 260;
|
||||||
|
|
||||||
OKF("afl++ is maintained by Marc \"van Hauser\" Heuse, Heiko \"hexcoder\" "
|
OKF("AFL++ is maintained by Marc \"van Hauser\" Heuse, Dominik Maier, Andrea "
|
||||||
"Eißfeldt, Andrea Fioraldi and Dominik Maier");
|
"Fioraldi and Heiko \"hexcoder\" Eißfeldt");
|
||||||
OKF("afl++ is open source, get it at "
|
OKF("AFL++ is open source, get it at "
|
||||||
"https://github.com/AFLplusplus/AFLplusplus");
|
"https://github.com/AFLplusplus/AFLplusplus");
|
||||||
OKF("NOTE: afl++ >= v3 has changed defaults and behaviours - see README.md");
|
OKF("NOTE: AFL++ >= v3 has changed defaults and behaviours - see README.md");
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
if (afl->fsrv.nyx_mode) {
|
if (afl->fsrv.nyx_mode) {
|
||||||
|
|
||||||
OKF("afl++ Nyx mode is enabled (developed and mainted by Sergej Schumilo)");
|
OKF("AFL++ Nyx mode is enabled (developed and mainted by Sergej Schumilo)");
|
||||||
OKF("Nyx is open source, get it at https://github.com/Nyx-Fuzz");
|
OKF("Nyx is open source, get it at https://github.com/Nyx-Fuzz");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
american fuzzy lop++ - wrapper for llvm 11+ lld
|
american fuzzy lop++ - wrapper for llvm 11+ lld
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
|
|
||||||
Written by Marc Heuse <mh@mh-sec.de> for afl++
|
Written by Marc Heuse <mh@mh-sec.de> for AFL++
|
||||||
|
|
||||||
Maintained by Marc Heuse <mh@mh-sec.de>,
|
Maintained by Marc Heuse <mh@mh-sec.de>,
|
||||||
Heiko Eißfeldt <heiko.eissfeldt@hexco.de>
|
Heiko Eißfeldt <heiko.eissfeldt@hexco.de>
|
||||||
@ -210,7 +210,7 @@ static void edit_params(int argc, char **argv) {
|
|||||||
|
|
||||||
if (strcmp(argv[i], "--afl") == 0) {
|
if (strcmp(argv[i], "--afl") == 0) {
|
||||||
|
|
||||||
if (!be_quiet) OKF("afl++ test command line flag detected, exiting.");
|
if (!be_quiet) OKF("AFL++ test command line flag detected, exiting.");
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// must use deferred forkserver as otherwise afl++ instrumentation aborts
|
// must use deferred forkserver as otherwise AFL++ instrumentation aborts
|
||||||
// because all dlopen() of instrumented libs must be before the forkserver
|
// because all dlopen() of instrumented libs must be before the forkserver
|
||||||
__AFL_INIT();
|
__AFL_INIT();
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ test -e ../afl-gcc-fast -a -e ../afl-compiler-rt.o && {
|
|||||||
$ECHO "$GREEN[+] gcc_plugin run reported $TUPLES instrumented locations which is fine"
|
$ECHO "$GREEN[+] gcc_plugin run reported $TUPLES instrumented locations which is fine"
|
||||||
} || {
|
} || {
|
||||||
$ECHO "$RED[!] gcc_plugin instrumentation produces a weird numbers: $TUPLES"
|
$ECHO "$RED[!] gcc_plugin instrumentation produces a weird numbers: $TUPLES"
|
||||||
$ECHO "$YELLOW[-] this is a known issue in gcc, not afl++. It is not flagged as an error because travis builds would all fail otherwise :-("
|
$ECHO "$YELLOW[-] this is a known issue in gcc, not AFL++. It is not flagged as an error because travis builds would all fail otherwise :-("
|
||||||
#CODE=1
|
#CODE=1
|
||||||
}
|
}
|
||||||
test "$TUPLES" -lt 2 && SKIP=1
|
test "$TUPLES" -lt 2 && SKIP=1
|
||||||
|
@ -7,7 +7,7 @@ FILE=$AFL_PERFORMANCE_FILE
|
|||||||
test -z "$FILE" && FILE=.afl_performance
|
test -z "$FILE" && FILE=.afl_performance
|
||||||
|
|
||||||
test -e $FILE || {
|
test -e $FILE || {
|
||||||
echo Warning: This script measure the performance of afl++ and saves the result for future comparisons into $FILE
|
echo Warning: This script measure the performance of AFL++ and saves the result for future comparisons into $FILE
|
||||||
echo Press ENTER to continue or CONTROL-C to abort
|
echo Press ENTER to continue or CONTROL-C to abort
|
||||||
read IN
|
read IN
|
||||||
}
|
}
|
||||||
@ -74,7 +74,7 @@ afl-system-config > /dev/null 2>&1
|
|||||||
echo Performance settings applied.
|
echo Performance settings applied.
|
||||||
echo
|
echo
|
||||||
|
|
||||||
$ECHO "${RESET}${GREY}[*] starting afl++ performance test framework ..."
|
$ECHO "${RESET}${GREY}[*] starting AFL++ performance test framework ..."
|
||||||
|
|
||||||
$ECHO "$BLUE[*] Testing: ${AFL_GCC}"
|
$ECHO "$BLUE[*] Testing: ${AFL_GCC}"
|
||||||
GCC=x
|
GCC=x
|
||||||
|
@ -133,7 +133,7 @@ MEM_LIMIT=none
|
|||||||
|
|
||||||
export PATH="${PATH}:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"
|
export PATH="${PATH}:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"
|
||||||
|
|
||||||
$ECHO "${RESET}${GREY}[*] starting afl++ test framework ..."
|
$ECHO "${RESET}${GREY}[*] starting AFL++ test framework ..."
|
||||||
|
|
||||||
test -z "$SYS" && $ECHO "$YELLOW[-] uname -m did not succeed"
|
test -z "$SYS" && $ECHO "$YELLOW[-] uname -m did not succeed"
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ git pull
|
|||||||
sh -c 'git stash && git stash drop' 1>/dev/null 2>/dev/null
|
sh -c 'git stash && git stash drop' 1>/dev/null 2>/dev/null
|
||||||
git checkout "$UNICORNAFL_VERSION" || exit 1
|
git checkout "$UNICORNAFL_VERSION" || exit 1
|
||||||
|
|
||||||
echo "[*] making sure afl++ header files match"
|
echo "[*] making sure AFL++ header files match"
|
||||||
cp "../../include/config.h" "./include" || exit 1
|
cp "../../include/config.h" "./include" || exit 1
|
||||||
|
|
||||||
echo "[*] Configuring Unicorn build..."
|
echo "[*] Configuring Unicorn build..."
|
||||||
|
Reference in New Issue
Block a user