6284 Commits

Author SHA1 Message Date
Maik Betka
70e3095864 added first dummy atnwalk.c file 2023-04-17 17:09:48 +02:00
vanhauser-thc
02b9e583f2 v4.07a init 2023-04-17 14:41:05 +02:00
van Hauser
a326c23210
Merge pull request #1706 from AFLplusplus/dev
push to stable, 4.06c release
4.06c
2023-04-17 10:26:33 +02:00
vanhauser-thc
7f734c96d1 v4.06c release 2023-04-17 10:25:10 +02:00
vanhauser-thc
4d29e484b7 update nyx readme 2023-04-16 18:47:50 +02:00
vanhauser-thc
56f7e3aa08 hidden -Y option for nyx, code format 2023-04-16 12:42:32 +02:00
van Hauser
87b9dc4ba0
Merge pull request #1702 from schumilo/dev
add Nyx support in afl-showmap, afl-tmin, afl-cmin and afl-analyze
2023-04-16 12:24:10 +02:00
Sergej Schumilo
d0b86bf055 pass absolute paths to libnyx 2023-04-16 06:23:38 +02:00
Sergej Schumilo
0a699d885b add some documentation 2023-04-16 06:19:39 +02:00
Sergej Schumilo
61aeb44863 remove redundant access() call 2023-04-16 05:19:09 +02:00
Sergej Schumilo
d213071e13 bump packer version 2023-04-16 05:16:01 +02:00
Sergej Schumilo
6d4234b305 bump libnyx version 2023-04-16 05:14:32 +02:00
Sergej Schumilo
059d470e8d improved Nyx tmp dir handling (additional sanity checks) 2023-04-16 04:42:09 +02:00
Sergej Schumilo
47833bcf9e fix remove_nyx_tmp_workdir function 2023-04-16 04:28:19 +02:00
vanhauser-thc
2f6242d3f8 update docs 2023-04-15 12:28:39 +02:00
vanhauser-thc
120d009e7d wasm support 2023-04-15 11:36:58 +02:00
vanhauser-thc
e12acaa203 fix custom mutator C examples 2023-04-15 10:12:20 +02:00
vanhauser-thc
8f6d9d66ef fix post_process 2023-04-15 09:11:33 +02:00
van Hauser
2b81d2d63f
Merge pull request #1703 from YSaxon/patch-1
Fixing typo: & (background) to && (and)
2023-04-14 17:43:18 +02:00
Yaakov Saxon
50678ed369
Fixing typo: & (background) to && (and) 2023-04-14 11:24:10 -04:00
vanhauser-thc
9764483693 remove warning 2023-04-14 16:27:32 +02:00
vanhauser-thc
0c4f0dd4c4 oss-fuzz fix for LLVMFuzzerTestOneInput driver 2023-04-14 16:09:55 +02:00
vanhauser-thc
b5f7f42cd0 update qemuafl, info in afl-plot 2023-04-14 10:22:00 +02:00
Sergej Schumilo
c34c3e2f5f add some sanity checks and remove duplicate nyx_shutdown calls 2023-04-14 06:24:46 +02:00
Sergej Schumilo
4f6ec6cb08 add NYX_REUSE_SNAPSHOT env-var option 2023-04-14 06:21:43 +02:00
Sergej Schumilo
a96cdc649f switch to latest libnyx API 2023-04-14 05:59:12 +02:00
Sergej Schumilo
e2fedce6ec bump libnyx version 2023-04-14 04:40:26 +02:00
Sergej Schumilo
afc47868ee bump QEMU-Nyx version
The QEMU-Nyx compile script does not set "--enable-gtk" anymore.
So it is no longer necessary to patch the compile_qemu_nyx.sh script manually.
2023-04-14 04:39:15 +02:00
Sergej Schumilo
eefd98f374 add Nyx support in various tools (like afl-cmin) 2023-04-14 02:25:33 +02:00
vanhauser-thc
2adf5aac0f libfuzzer driver nits 2023-04-13 15:32:06 +02:00
vanhauser-thc
f756734ad2 fix attempt at post_process implementation 2023-04-13 12:07:27 +02:00
vanhauser-thc
6cc8d607fb remove -z option, use -p mmopt instead 2023-04-13 11:44:39 +02:00
vanhauser-thc
824385f52c make llvm 17 work 2023-04-12 14:03:29 +02:00
vanhauser-thc
d304f4e4f1 update lto doc 2023-04-12 11:24:56 +02:00
van Hauser
4f2d9eeaaa
Merge pull request #1700 from AFLplusplus/dev
push to stable
2023-04-12 10:54:08 +02:00
vanhauser-thc
743ae50775 nits 2023-04-12 10:53:23 +02:00
van Hauser
a5a122a533
Merge pull request #1698 from neuschaefer/nodefer
afl-cc: Don't offer __AFL_INIT() etc. in GCC/CLANG modes
2023-04-10 17:50:11 +02:00
van Hauser
1589e17213
Merge pull request #1697 from devnexen/llvm_instr_warning_fix
LLVM instrumentation disable build warning.
2023-04-10 14:35:56 +02:00
Jonathan Neuschäfer
9e3e1a5512 afl-cc: Don't offer __AFL_INIT() etc. in GCC/CLANG modes
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-10 13:47:19 +02:00
David CARLIER
a0818c4fce LLVM instrumentation disable build warning.
Since clang 16 is the version for Ubuntu 23 04/Fedora 38 and is easy enough to fix..
2023-04-10 12:38:26 +01:00
vanhauser-thc
0782ed3841 remove pointer to removed doc 2023-04-09 10:33:39 +02:00
van Hauser
0911525194
Merge pull request #1694 from neuschaefer/dev
afl-cc: Avoid casts of string literals to char*, in definition of __AFL_INIT() etc.
2023-04-08 17:33:41 +02:00
Jonathan Neuschäfer
0eace0212e afl-cc: Avoid casts of string literals to char*, in definition of __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-08 17:24:02 +02:00
vanhauser-thc
c1af004451 afl-whatsup tput 2023-04-08 15:29:43 +02:00
van Hauser
abd6b06fa4
Merge pull request #1693 from hardik05/patch-1
display instance name
2023-04-08 14:42:08 +02:00
Hardik Shah
35151cefe8
display instance name 2023-04-08 17:57:08 +05:30
vanhauser-thc
75d7a09469 show custom mutator name in UI 2023-04-08 13:48:07 +02:00
vanhauser-thc
f9851dbfbb hopefully better -z algorithm 2023-04-08 13:00:57 +02:00
vanhauser-thc
400c5e92cb renaming 2023-04-07 09:41:22 +02:00
vanhauser-thc
fcb5eda5d0 nit 2023-04-05 16:34:08 +02:00