79 Commits

Author SHA1 Message Date
eda770fd32 push to stable (#1967)
* Output afl-clang-fast stuffs only if necessary (#1912)

* afl-cc header

* afl-cc common declarations

 - Add afl-cc-state.c
 - Strip includes, find_object, debug/be_quiet/have_*/callname setting from afl-cc.c
 - Use debugf_args in main
 - Modify execvp stuffs to fit new aflcc struct

* afl-cc show usage

* afl-cc mode selecting

1. compiler_mode by callname in argv[0]
2. compiler_mode by env "AFL_CC_COMPILER"
3. compiler_mode/instrument_mode by command line options "--afl-..."
4. instrument_mode/compiler_mode by various env vars including "AFL_LLVM_INSTRUMENT"
5. final checking steps
6. print "... - mode: %s-%s\n"
7. determine real argv[0] according to compiler_mode

* afl-cc macro defs

* afl-cc linking behaviors

* afl-cc fsanitize behaviors

* afl-cc misc

* afl-cc body update

* afl-cc all-in-one

formated with custom-format.py

* nits

---------

Co-authored-by: vanhauser-thc <vh@thc.org>

* changelog

* update grammar mutator

* lto llvm 12+

* docs(custom_mutators): fix missing ':' (#1953)

* Fix broken LTO mode and response file support (#1948)

* Strip `-Wl,-no-undefined` during compilation (#1952)

Make the compiler wrapper stripping `-Wl,-no-undefined` in addition to `-Wl,--no-undefined`.
Both versions of the flag are accepted by clang and, therefore, used by building systems in the wild (e.g., samba will not build without this fix).

* Remove dead code in write_to_testcase (#1955)

The custom_mutators_count check in if case is duplicate with if condition.
The else case is custom_mutators_count == 0, neither custom_mutator_list iteration nor sent check needed.

Signed-off-by: Xeonacid <h.dwwwwww@gmail.com>

* update qemuafl

* WIP: Add ability to generate drcov trace using QEMU backend (#1956)

* Document new drcov QEMU plugin

* Add link to lightkeeper for QEMU drcov file loading

---------

Co-authored-by: Jean-Romain Garnier <jean-romain.garnier@airbus.com>

* code format

* changelog

* sleep on uid != 0 afl-system-config

* fix segv about skip_next, warn on unsupported cases of linking options (#1958)

* todos

* ensure afl-cc only allows available compiler modes

* update grammar mutator

* disable aslr on apple

* fix for arm64

* help selective instrumentation

* typos

* macos

* add compiler test script

* apple fixes

* bump nyx submodules (#1963)

* fix docs

* update changelog

* update grammar mutator

* improve compiler test script

* gcc asan workaround (#1966)

* fix github merge fuckup

* fix

* Fix afl-cc (#1968)

- Check if too many cmdline params here, each time before insert a new param.
 - Check if it is "-fsanitize=..." before we do sth.
 - Remove improper param_st transfer.

* Avoid adding llvmnative instrumentation when linking rust sanitizer runtime (#1969)

* Dynamic instrumentation filtering for LLVM native (#1971)

* Add two dynamic instrumentation filter methods to runtime

* Always use pc-table with native pcguard

* Add make_symbol_list.py and README

* changelog

* todos

* new forkserver check

* fix

* nyx test for CI

* improve nyx docs

* Fixes to afl-cc and documentation (#1974)

* Always compile with -ldl when building for CODE_COVERAGE

When building with CODE_COVERAGE, the afl runtime contains code that
calls `dladdr` which requires -ldl. Under most circumstances, clang
already adds this (e.g. when building with pc-table), but there are some
circumstances where it isn't added automatically.

* Add visibility declaration to __afl_connected

When building with hidden visibility, the use of __AFL_LOOP inside such
code can cause linker errors due to __afl_connected being declared
"hidden".

* Update docs to clarify that CODE_COVERAGE=1 is required for dynamic_covfilter

* nits

* nyx build script updates

* test error output

* debug ci

* debug ci

* Improve afl-cc (#1975)

* update response file support

 - full support of rsp file
 - fix some segv issues

* Improve afl-cc

 - remove dead code about allow/denylist options of sancov
 - missing `if (!aflcc->have_msan)`
 - add docs for each function
 - typo

* enable nyx

* debug ci

* debug ci

* debug ci

* debug ci

* debug ci

* debug ci

* debug ci

* debug ci

* fix ci

* clean test script

* NO_NYX

* NO_NYX

* fix ci

* debug ci

* fix ci

* finalize ci fix

---------

Signed-off-by: Xeonacid <h.dwwwwww@gmail.com>
Co-authored-by: Sonic <50692172+SonicStark@users.noreply.github.com>
Co-authored-by: Xeonacid <h.dwwwwww@gmail.com>
Co-authored-by: Nils Bars <nils.bars@rub.de>
Co-authored-by: Jean-Romain Garnier <7504819+JRomainG@users.noreply.github.com>
Co-authored-by: Jean-Romain Garnier <jean-romain.garnier@airbus.com>
Co-authored-by: Sergej Schumilo <sergej@schumilo.de>
Co-authored-by: Christian Holler (:decoder) <choller@mozilla.com>
2024-02-01 14:13:07 +00:00
ac0ad56348 fix dictionary and cmin 2023-11-07 10:31:09 +01:00
b547a6ab0d nits 2023-07-10 17:43:21 +02:00
20dcb40c53 fix cmin -T 2023-07-08 13:31:06 +02:00
64b15a00f2 fix afl-cmin* for old afl vanilla issue 2023-06-21 12:20:10 +02:00
936b6dcb5d nits 2023-06-21 09:57:24 +02:00
fc1e352965 Fixes #1770: afl-cmin in -T mode doesn't correctly divide inputs among threads 2023-06-14 08:43:06 +01:00
3e84d6a2ae afl++ -> AFL++ 2023-04-27 11:49:00 +02:00
432671449f nits 2023-04-25 18:19:25 +02:00
d822181467 afl-cmin -T support 2023-04-25 13:13:43 +02:00
8c228b0d23 afl-showmap -I option 2023-04-24 18:08:27 +02:00
4e5f42cab6 afl-showmap custom mutator support 2023-04-20 10:39:23 +02:00
56f7e3aa08 hidden -Y option for nyx, code format 2023-04-16 12:42:32 +02:00
eefd98f374 add Nyx support in various tools (like afl-cmin) 2023-04-14 02:25:33 +02:00
2cbe49c6eb Update usage messages 2022-10-24 18:08:29 +02:00
7512316b46 Add AFL_FORK_SERVER_KILL_SIGNAL environment variable.
The AFL_FORK_SERVER_KILL_SIGNAL variable allows to configure the signal
used to kill the fork server on termination.
2022-10-21 12:47:00 +02:00
9cfe1d1394 afl-cmin -A 2022-09-17 13:44:34 +02:00
d7abf6936c fix afl-cmin 2022-08-16 09:46:11 +02:00
2462c61df9 fix new map size extraction for afl-gcc 2022-08-15 19:22:46 +02:00
ba14c353c0 get map size from binaries within afl-cmin* 2022-08-15 18:31:45 +02:00
338f1ae2f8 fix mawk bug 2022-07-11 21:42:03 +02:00
1441503c43 afl-cmin: avoid messages with \r when redirection is used 2022-05-27 15:26:24 +02:00
57db3e7f4f afl-cmin: quote program arguments
Quote the program arguments in the system() function to allow them to
contain spaces.
2022-04-13 13:47:51 +02:00
268339a683 showmap -A -> -H, accurate help output 2021-11-16 11:03:53 +01:00
b6a9e54c60 Added more AFL_NO_FORKSRV docu, changelog 2021-07-13 11:03:30 +02:00
c46f8c1f70 make afl-cmin actually work with subdirectories 2021-06-16 13:03:42 +02:00
d2e85cce50 afl-cmin help fix, aflpp_driver - + @@ support 2021-05-30 00:36:56 +02:00
ccf739f880 AFL_PRINT_FILENAMES added 2021-05-17 18:16:51 +02:00
1725e6be31 Fix support for afl-cmin and updated README 2021-03-25 17:41:14 +00:00
1ab125de63 afl-cmin: Allow @@ to be part of an arg
The previous implementation of "@@ handling"
in afl-cmin differed greatly from how it was
handled in afl-fuzz and how the documentation presented it.

It used to require that the @@ be its own argument separated
by whitespace and could not be used in situations like "--file=@@".

This change standardizes it to just look for @@ to be *in* an argument
in the same manner that afl-cmin.bash does, so that it will have
the expected and documented behavior.
2021-03-15 12:25:01 -07:00
eb1e8619eb fix handling of test case file names with spaces 2021-03-08 14:55:48 +01:00
9844e1a856 fix 2021-03-05 19:32:27 +01:00
385312c658 fix issue #732 afl-cmin and afl-showmap should support '-f' 2021-02-13 13:31:17 +01:00
981ffb27a8 making AFL_MAP_SIZE obsolete 2021-02-01 12:01:23 +01:00
2ef8dc4378 afl-cmin -m none 2021-01-21 21:42:15 +01:00
a06b25538f cleaned up AFL_KILL_SIGNAL 2021-01-07 23:21:10 +01:00
b6b907705e afl-cmin: skip instrumentation check if AFL_SKIP_BIN_CHECK is set 2020-12-18 00:18:30 +01:00
161c80014e change search order for afl-showmin in afl-cmin* 2020-12-10 17:25:22 +01:00
b31d5a7cef afl-cmin usage fix 2020-12-04 07:32:56 +01:00
a2e2fae840 AFL_CRASH_EXITCODE env var added, u8->bool 2020-12-03 14:43:06 +01:00
0942158ad1 remove docs/README symlink and update references 2020-12-01 23:17:20 +01:00
d8a058bf59 fix AFL_CMIN_CRASHES_ONLY=1 afl-showmap 2020-10-17 14:34:14 +02:00
bded51e4ea fix issue #583: afl-cmin -C incompatibility 2020-10-15 23:30:36 +02:00
53e63e9ded added forkserver init timeout 2020-08-31 18:28:36 +02:00
6cbd0f1faf avoid calling awk for 'which' replacement, use POSIX 'command -v' instead 2020-03-21 18:51:43 +01:00
eca6bdb85d afl-cmin: replace 'which' with 'type' 2020-03-19 00:15:48 +01:00
d8d89507b5 afl-cmin delete output directory when aborted 2020-03-11 11:25:58 +01:00
a24352ddfd fix leaks 2020-03-09 15:52:14 +01:00
13429d204d adapt child handling to nawk from *BSD 2020-03-06 20:57:28 +01:00
0d4f2da8db terminate afl-cmin early when signalled SIGINT 2020-03-06 19:33:02 +01:00