Commit Graph

2173 Commits

Author SHA1 Message Date
12271064f8 fix fix 2024-09-27 09:20:08 +02:00
55b67f1372 fix postprocess for calibration 2024-09-26 14:42:59 +02:00
8b35dd49be Fix macOS build 2024-09-23 21:22:17 +02:00
db172473b5 Save crash log returned by nyx when AFL_CRASHING_SEEDS_AS_NEW_CRASH environment variable is enabled
nyx also returns a crash log when reporting a crash, both files are saved in the afl++ fuzzing run, whereas with the AFL_CRASHING_SEEDS_AS_NEW_CRASH setting, only the crash file is saved in the dry run phase if crashes are included in the supplied seeds.
This commit adds crash log saving to keep the behavior consistent
2024-09-23 15:50:20 +08:00
1d6cd5dd19 fix AFL_AUTORESUME=1 for Nyx mode 2024-09-14 03:51:20 +02:00
fc7c95e9f4 nits 2024-09-12 10:24:05 +02:00
3ec794c806 Merge pull request #2203 from ktpss95112/patch-1
Update the doc string of read_foreign_testcases()
2024-09-06 11:50:33 +02:00
bf46ff8823 Merge pull request #2202 from smoelius/permissive_create-in-mark_as_variable
Use `permissive_create` in `mark_as_variable`
2024-09-06 11:48:34 +02:00
6f61fca15a Update the doc string of read_foreign_testcases() 2024-09-06 11:39:49 +08:00
b8cb35fa8c Use permissive_create in mark_as_variable 2024-09-05 09:56:38 -04:00
d7c99007ff No longer need the extra line break 2024-08-21 20:04:30 +10:00
bdb5622bd4 Skip the save/restore example 2024-08-21 20:03:33 +10:00
cf2ddf437b Wording tweaks 2024-08-21 19:05:41 +10:00
2b7aae66b6 Offer more explicit core dump handling tip 2024-08-21 19:02:38 +10:00
1689a8e053 code format, llvm 18 2024-08-19 16:25:32 +02:00
93fb1d1a24 fix custom post process with custom send 2024-08-16 10:46:01 +02:00
6ddd5ecf4a fix missing trace_mini check 2024-08-14 18:47:44 +02:00
e3b08d430c Merge pull request #2173 from ahuo1/dev
To support AFL instrumentation, add default settings of map_size in forkserver.
2024-08-08 09:21:38 +02:00
4f35c30371 Merge pull request #2181 from tchebb/fix-no-zlib
Fix syntax error when compiling without zlib
2024-08-07 12:28:08 +02:00
9df9064549 Fix syntax error when compiling without zlib
commit ecb5854be0 ("add zlib compression for fast resume") added new
logic selected at compile-time when zlib is present. Unfortunately, it
also broke the existing logic by removing the last line of a multi-line
if statement, resulting in a syntax error when zlib isn't present.

Restore the line as it was.
2024-08-06 11:37:19 -07:00
b928303dd0 Merge branch 'AFLplusplus:dev' into dev 2024-08-05 22:21:52 +08:00
76b26ac2c6 Merge pull request #2174 from killerra/dev
Fixed lsan defaults evaluation
2024-08-03 10:19:15 +02:00
dd16be405a Handle detect_leaks 0 and false 2024-08-02 14:51:42 +01:00
2e57d86576 lower mem usage attempt 2024-08-02 15:27:57 +02:00
26ae4124f3 fixed lasan defaults evaluation 2024-07-28 11:30:48 +01:00
25945d51a4 To support AFL instrumentation, add default settings. 2024-07-28 16:45:45 +08:00
69a596c089 ensure this does not happen again 2024-07-14 10:20:53 +02:00
ccb952dde8 Revert "Replace gettimeofday with clock_gettime (#2159)"
This reverts commit 7c380a6612.
2024-07-14 10:18:23 +02:00
7c380a6612 Replace gettimeofday with clock_gettime (#2159) 2024-07-14 00:25:58 +02:00
bd83eb0f42 check the sync_id length once 2024-07-12 16:22:17 -04:00
ea42feb06a Initialize max_length in afl_fsrv_init #2155 2024-07-12 20:08:52 +02:00
02f4f75526 Fix missed updates of alias table when INTROSPECTION is on
In src/afl-fuzz.c `prev_queued_items` is used to decide whether the alias table should be recreated through the comparison with `afl->queued_items`.
43f462c91b/src/afl-fuzz.c (L3103-L3117)

However, this variable is also updated to `afl->queued_items` when INTROSPECTION is enabled and the `fuzz_one` appends seeds.
43f462c91b/src/afl-fuzz.c (L3135-L3140)

Due to the update of `prev_queued_items` when INTROSPECTION is on, alias table may not be recreated when it actually should be.

This can lead to potential heap buffer-overflow in `select_next_queue_entry` due to the lack of `afl_realloc` called in `create_alias_table`.

This patch fixes this bug by utilizing another variable for the INTROSPECTION part like other variables such as `prev_saved_tmouts`.
2024-07-10 21:39:04 +09:00
37d9afc5cc Make fallthroughs explicit in afl-fuzz-extras.c
Using `__attribute__((fallthrough))` makes fallthroughs explicit in a way the compiler can understand. This allows the enablement of `-Wimplicit-fallthrough`.
2024-07-01 06:59:37 -07:00
ba7313b521 AFL_CUSTOM_MUTATOR_LATE_SEND added 2024-06-27 18:51:58 +02:00
af47531745 improved seed selection algorithm 2024-06-26 01:12:10 +02:00
ac5815d994 Optimize bit counting using __builtin_popcount
Use the __builtin_popcount intrinsic to optimize the bit counting
function if the compiler supports it. This change replaces the manual
bit counting algorithm with the more efficient built-in function, which
leverages hardware support on compatible processors.

This modification ensures that the code remains backward-compatible by
falling back to the original implementation when __builtin_popcount is
not available.
2024-06-24 06:52:07 +08:00
ecb5854be0 add zlib compression for fast resume 2024-06-21 14:40:23 +02:00
2fbc0aefb1 Auto disable memory limits for FASAN 2024-06-20 00:10:40 +02:00
8fcca6fb41 Collect persistent coverage data and dump it at the end of the run
With CODE_COVERAGE builds, we need to collect the coverage data of each
iteration in a persistant buffer that has the same size as the regular
trace buffer used for fuzzing. We dump this information at the end of
the run and when combined with pointer data and module info, this can be
used to calculate code coverage.
2024-06-19 12:36:58 +02:00
b8568034f0 code format and changelog 2024-06-18 15:42:34 +02:00
3ebf41ba34 Merge pull request #2128 from AFLplusplus/fastrestart
Fastrestart
2024-06-18 15:28:56 +02:00
304e84502d fast resume option 2024-06-18 15:24:38 +02:00
de176a10bc nit 2024-06-17 09:31:42 +02:00
e7da8b9d6b Revert "MONOTONIC"
This reverts commit 0c9b460cc4.
2024-06-13 09:19:11 +02:00
0c9b460cc4 MONOTONIC 2024-06-12 09:17:07 +02:00
dd762726dc fastresume implementation 2024-06-12 09:10:35 +02:00
0c9d8e5929 Fix undefined behavior by casting to uint64_t before left shift
According to the C standard, left-shifting a value by an amount greater
than or equal to the width of its promoted type results in undefined
behavior. To prevent potential unexpected results, explicitly cast the
uint8_t variable type to uint64_t before performing the left shift
operation by 56 bits. This ensures the operation is well-defined and
adheres to the standard.

Fixes: 40df85d1 ("adjust cmplog header")
2024-06-12 12:48:13 +08:00
6ed0a2b4aa fast resume setup detection 2024-06-10 18:22:06 +02:00
44b5e1f488 fix no_forkserver mode 2024-06-09 12:26:48 +02:00
31652eeb2a nit 2024-06-09 12:19:58 +02:00