2103 Commits

Author SHA1 Message Date
58b80b68bc 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
2024-01-26 14:46:56 +00:00
2f9eeef60c Avoid adding llvmnative instrumentation when linking rust sanitizer runtime (#1969) 2024-01-26 13:41:23 +00:00
4d493452a4 tmp 2024-01-25 17:00:53 +01:00
d88c97ad28 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.
2024-01-25 08:57:50 +00:00
ba28c4982b fix 2024-01-24 18:22:17 +01:00
8746b3e310 fix github merge fuckup 2024-01-24 18:06:02 +01:00
a5db79e4d6 Merge branch 'stable' into dev 2024-01-24 18:05:12 +01:00
d5812786f3 gcc asan workaround (#1966) 2024-01-24 16:54:57 +00:00
8fedf49984 replay mode support 2024-01-23 19:36:49 +01:00
9cefc4d3d4 fix docs 2024-01-22 11:00:56 +01:00
ab0823cd3b apple fixes 2024-01-19 15:51:57 +01:00
660b697ed9 typos 2024-01-19 10:28:39 +01:00
0c054f520e push to stable (#1960)
* 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

---------

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>
2024-01-18 15:17:48 +00:00
e731a1c1ab fix for arm64 2024-01-18 12:01:26 +01:00
523ce154c3 disable aslr on apple 2024-01-18 11:22:06 +01:00
136febaf68 ensure afl-cc only allows available compiler modes 2024-01-18 09:17:25 +01:00
8412b17d79 fix segv about skip_next, warn on unsupported cases of linking options (#1958) 2024-01-18 07:56:28 +00:00
46ef6a54e1 code format 2024-01-12 15:43:12 +01:00
b99bbf671b 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>
2024-01-11 13:13:47 +00:00
9d3c25ac81 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).
2024-01-11 10:45:26 +00:00
4e9c6050d0 Fix broken LTO mode and response file support (#1948) 2024-01-11 10:44:40 +00:00
aad9ac2b33 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>
2024-01-04 13:35:25 +00:00
1eb54c4c3e finish injection implementation 2023-12-30 10:49:00 +01:00
98a2a334de inject docs 2023-12-27 13:58:25 +01:00
1fc1b32db2 initial simple injection detection support 2023-12-27 13:53:11 +01:00
353ae3682a switch to explore powerschedule as default 2023-12-15 10:24:12 +01:00
b2d118f821 fix 2023-12-10 14:07:25 +01:00
a062e84ba6 add n_fuzz to ignore_timeouts 2023-12-10 14:05:41 +01:00
520daf5e0f nit 2023-12-10 13:23:59 +01:00
bb1d4a2491 afl-cc fixes 2023-12-07 16:15:18 +01:00
6c04d4cc80 fixing -Wl,-rpath=<LLVM_LIBDIR> 2023-12-05 13:53:09 +01:00
0e7afb75dd removing options "-Wl,-rpath" "LLVM_LIBDIR" when using gcc 2023-12-04 16:46:30 +01:00
3fc9e680f3 Stop hardcoding the path /usr/local/lib/afl in afl-ld-lto.c and respect the configured PREFIX. 2023-12-01 16:28:33 +00:00
39be50e2a8 nit 2023-11-28 16:32:36 +01:00
74f8ca6b46 improve cmplog 2023-11-28 10:26:37 +01:00
dd9a04c901 code format 2023-11-28 09:14:29 +01:00
d2aef74ad7 changes 2023-11-28 08:59:04 +01:00
e4f3ebcebb Merge pull request #1915 from yangzao/dev
add custom mutator function for running script after target gets executed
2023-11-28 05:55:23 +01:00
81b43cefdf merge function 2023-11-27 10:25:12 -07:00
bb523b4648 update 2023-11-27 09:59:02 -07:00
c9e0f01b43 format code 2023-11-27 09:58:03 -07:00
0547c49b2b Merge pull request #1913 from choller/nyx-id-fix-2
Pass correct Nyx ID when creating a Nyx runner
2023-11-27 09:09:38 +01:00
faedb3fb29 update python module 2023-11-25 21:18:32 -07:00
8af74bcaee update afl-fuzz-run 2023-11-24 22:47:50 -07:00
770e868d04 add custom_post_run.c 2023-11-24 11:06:06 -07:00
c96aa400e4 mini fix 2023-11-23 21:28:44 +01:00
a2a4171039 Pass correct Nyx ID when creating a Nyx runner 2023-11-22 15:08:26 +01:00
1179bfeab7 Merge pull request #1909 from ifyGecko/quick_fix
missing closing parenthesis
2023-11-17 07:43:32 +01:00
b05e3f7ac0 missing closing parenthesis 2023-11-16 19:02:46 -05:00
a071430983 fix inf in stats 2023-11-16 11:00:40 +01:00