about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)Author
2023-04-13remove -z option, use -p mmopt insteadvanhauser-thc
2023-04-10Merge pull request #1698 from neuschaefer/nodefervan Hauser
afl-cc: Don't offer __AFL_INIT() etc. in GCC/CLANG modes
2023-04-10afl-cc: Don't offer __AFL_INIT() etc. in GCC/CLANG modesJonathan Neuschäfer
instrumentation/README.persistent_mode.md documents in the section about deferred forkserver initialization: > With the location selected, add this code in the appropriate spot: > > ```c > #ifdef __AFL_HAVE_MANUAL_CONTROL > __AFL_INIT(); > #endif > ``` > > You don't need the #ifdef guards, but including them ensures that the program > will keep working normally when compiled with a tool other than afl-clang-fast/ > afl-clang-lto/afl-gcc-fast. > > Finally, recompile the program with afl-clang-fast/afl-clang-lto/afl-gcc-fast > (afl-gcc or afl-clang will *not* generate a deferred-initialization binary) - > and you should be all set! This strongly implies that you can compile a program that uses __AFL_INIT() under an `#ifdef __AFL_HAVE_MANUAL_CONTROL` guard with afl-gcc/-clang. However, this currently fails: $ cat example.c #include <stdio.h> int main(void) { #ifdef __AFL_HAVE_MANUAL_CONTROL __AFL_INIT(); #endif puts("Hello"); } $ afl-gcc example.c -o example afl-cc++4.06a by Michal Zalewski, Laszlo Szekeres, Marc Heuse - mode: GCC-GCC [!] WARNING: You are using outdated instrumentation, install LLVM and/or gcc-plugin and use afl-clang-fast/afl-clang-lto/afl-gcc-fast instead! afl-as++4.06a by Michal Zalewski [+] Instrumented 1 locations (64-bit, non-hardened mode, ratio 100%). /usr/bin/ld: /tmp/ccuJHcpt.o: in function `main': /home/jn/dev/fuzz/AFLplusplus/example.c:5: undefined reference to `__afl_manual_init' collect2: error: ld returned 1 exit status The issue here is an inconsistency in afl-gcc (i.e. afl-cc operating in GCC mode): - afl-cc defines __AFL_HAVE_MANUAL_CONTROL and __AFL_INIT unconditionally - __AFL_INIT relies on __afl_manual_init, which is defined in afl-compiler-rt.o - afl-cc doesn't link afl-compiler-rt in GCC or CLANG mode Since afl-gcc/-clang is documented as not supporting deferred forkserver initialization, this patch omits the definitions of __AFL_HAVE_MANUAL_CONTROL and related macros in GCC/CLANG mode. This restores the ability to compile a deferred-forkserver program under afl-gcc, if it can also be compiled under gcc. [ In case someone reads this an feels adventurous enough (as I did) to think about enabling deferred forkserver under afl-gcc: Whether the deferred forkserver actually works can be verified by placing a usleep(100000) or similar at the start of main (before __AFL_INIT()), and watching the execution speed. It doesn't work. ]
2023-04-09remove pointer to removed docvanhauser-thc
2023-04-08afl-cc: Avoid casts of string literals to char*, in definition of ↵Jonathan Neuschäfer
__AFL_INIT() etc. With the right -W options, compilers may complain about the cast of string literals (for PERSIST_SIG and DEFER_SIG) to (char*), and they're right to do so, because string literals are constant. Since some projects enable -Werror, this can lead to a broken build with afl-cc. Let's simply cast to (const char *), which preserves the constness of the string literal.
2023-04-08show custom mutator name in UIvanhauser-thc
2023-04-08hopefully better -z algorithmvanhauser-thc
2023-04-05fixvanhauser-thc
2023-04-05better new weightingvanhauser-thc
2023-04-05add -z switchvanhauser-thc
2023-04-02fix ui layout with slow targets in pizza modevanhauser-thc
2023-04-02allow pizza mode to be disabledvanhauser-thc
2023-04-02fix buffer overflow in pizza mode :(vanhauser-thc
2023-03-31nitsvanhauser-thc
2023-03-29introspectionvanhauser-thc
2023-03-28[afs-as] Allow debugging arguments after the input fileTulio Magno Quites Machado Filho
Clang may call as with extra debugging arguments after the input file, e.g. as --64 -o /tmp/hello-617ff5.o /tmp/hello-6b6f52.s -g -gdwarf-4
2023-03-28nitsvanhauser-thc
2023-03-27time_wo_finds in fuzzer_statsvanhauser-thc
2023-03-26Clarify confusing version messageChris Down
When running, the following gets printed in quick succession on startup: afl-fuzz++4.00c based on afl by Michal Zalewski and a large online community [...] [+] NOTE: This is v3.x which changes defaults and behaviours - see README.md Don't assert that this is v3, just that v3+ changes defaults and behaviours.
2023-03-26fix frida modevanhauser-thc
2023-03-25add likely() to cksum checkyuawn
2023-03-25add check for n_fuzz updateyuawn
2023-03-10Merge pull request #1672 from AFLplusplus/devvan Hauser
Dev
2023-03-09code formatvanhauser-thc
2023-03-09various fixesvanhauser-thc
2023-03-09fix attempt at lsanvanhauser-thc
2023-03-09fast schedules n_fuzz update after classifyvanhauser-thc
2023-03-06Merge pull request #1667 from amitelka/feature/opt_statsfile_update_intervalvan Hauser
Added env variable to allow custom interval update of fuzzer_stats file
2023-03-06Fixed according to CRAmit Elkabetz
2023-03-06fix IGNORE_PROBLEMS and update qemuaflvanhauser-thc
2023-03-05Changed warning message to use const instead of magicAmit Elkabetz
2023-03-05Fixed according to PR comment, moved cli flag to an env variableAmit Elkabetz
2023-03-05Added minimum interval of 1 sec to avoid undefined behaviour in intervalAmit Elkabetz
2023-03-05auto code format fixesAmit Elkabetz
2023-03-05Added flag -u to allow custom interval to update fuzzer_stats fileAmit Elkabetz
2023-03-02Fix.Eli Kobrin
2023-03-02Fix exit on time.Eli Kobrin
2023-02-27div hitsvanhauser-thc
2023-02-25Merge pull request #1654 from tokatoka/typovan Hauser
Redqueen typo
2023-02-24Update afl-fuzz-redqueen.cDongjia "toka" Zhang
2023-02-23fix custom python splice optoutvanhauser-thc
2023-02-23regression fixvanhauser-thc
2023-02-21Merge pull request #1651 from AFLplusplus/devvan Hauser
Dev
2023-02-21nitvanhauser-thc
2023-02-21fix regressionvanhauser-thc
2023-02-16fixesvanhauser-thc
2023-02-15debug outputvanhauser-thc
2023-02-15bettern custom mut warningvanhauser-thc
2023-02-13AFL_LLVM_DICT2FILE_NO_MAIN supportvanhauser-thc
2023-02-13autodisable and better performancevanhauser-thc