6083 Commits

Author SHA1 Message Date
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
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
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
d67ee17778 fix 2023-04-05 13:30:06 +02:00
vanhauser-thc
dba93705a7 better new weighting 2023-04-05 13:07:22 +02:00
vanhauser-thc
36127fb197 add -z switch 2023-04-05 12:59:20 +02:00
van Hauser
5fea071ae9
Merge pull request #1692 from nj00001/dev
fix getOperand out of range
2023-04-03 10:33:59 +02:00
nj00001
a01138e1c8
fix getOperand out of range
This commit fixes a sloppy function call that should normally check the number of insn's Operand before calling insn's getOperand method. The fix is that if it is 0 it should continue the loop.
I solved problem https://github.com/AFLplusplus/AFLplusplus/issues/1688#issue-1648543691 using this modification
2023-04-03 15:32:52 +08:00
vanhauser-thc
319b2e8e6f fix ui layout with slow targets in pizza mode 2023-04-02 12:08:54 +02:00
vanhauser-thc
e46e0bce44 allow pizza mode to be disabled 2023-04-02 12:03:45 +02:00
vanhauser-thc
4d02d8e43d fix buffer overflow in pizza mode :( 2023-04-02 11:52:36 +02:00
vanhauser-thc
be96253f52 nits 2023-03-31 11:02:27 +02:00
vanhauser-thc
2d0d1e267e better aflpp driver 2023-03-30 14:07:33 +02:00
vanhauser-thc
a061e1304d further magma adaption 2023-03-30 10:18:45 +02:00
vanhauser-thc
dbdf2d79f2 magma support 2023-03-29 10:57:57 +02:00
vanhauser-thc
48816417ee introspection 2023-03-29 10:13:18 +02:00
van Hauser
661b626c87
Merge pull request #1686 from tuliom/minor-fixes
Minor fixes
2023-03-28 19:29:04 +02:00
vanhauser-thc
214e24fff0 fix arm64 build 2023-03-28 17:23:07 +02:00
Tulio Magno Quites Machado Filho
67e8c4f100 Fix unsupported operands in .custom-format.py
Python 3.11 complains that int and str are unsupported operand types for
operator +.
2023-03-28 12:15:20 -03:00
Tulio Magno Quites Machado Filho
5d9c1bc3a3 [afs-as] Allow debugging arguments after the input file
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-28 12:15:20 -03:00
Tulio Magno Quites Machado Filho
c594a58583 Stop using removed pipeline extensions
LLVM commit 7ae6838defb21737963b1dd8ff9de7e87052c74f removed the
following extensions:

- PassManagerBuilder::EP_OptimizerLast
- PassManagerBuilder::EP_EnabledOnOptLevel0
- PassManagerBuilder::EP_FullLinkTimeOptimizationLast
2023-03-28 12:15:20 -03:00
vanhauser-thc
01236f47bc nits 2023-03-28 16:50:05 +02:00
vanhauser-thc
b1bfc1ae76 time_wo_finds in fuzzer_stats 2023-03-27 17:52:01 +02:00
van Hauser
0faa323f12
Merge pull request #1683 from cdown/cdown/2023-03-26/ver
Clarify confusing version message
2023-03-27 13:04:38 +02:00
Chris Down
2d3c5cc6d8 Clarify confusing version message
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-26 20:44:57 -04:00
van Hauser
7101192865
Merge pull request #1682 from AFLplusplus/dev
push to stable
2023-03-26 13:36:31 +02:00
vanhauser-thc
19f9612910 fix frida mode 2023-03-26 12:14:35 +02:00
vanhauser-thc
d955409178 disable frida in the ci for the moment it is working nowhere 2023-03-25 20:37:08 +01:00
vanhauser-thc
9bc5abc4ec reduce CI resources 2023-03-25 12:14:08 +01:00
van Hauser
64fd01d46c
Merge pull request #1681 from AFLplusplus/dev
Push to stable
2023-03-25 10:47:58 +01:00
van Hauser
b2f9802f9f
Merge pull request #1680 from yuawn/add_check_for_n_fuzz_update
add check for n_fuzz update
2023-03-25 10:47:02 +01:00
yuawn
e24ae96361 add likely() to cksum check 2023-03-25 09:45:02 +00:00
yuawn
0f62e0b167 add check for n_fuzz update 2023-03-25 09:28:35 +00:00
vanhauser-thc
478f0bbc1e ci test 2023-03-21 16:23:51 +01:00
van Hauser
3d7bad99b6
Merge pull request #1678 from dmitris/patch-1
nit: fix minor typos
2023-03-21 16:22:57 +01:00