Commit Graph

7563 Commits

Author SHA1 Message Date
2e7f191f3b extract function to resize map buffers 2025-05-25 09:33:34 +08:00
8090c82c63 fix resize afl->top_rated 2025-05-24 23:36:54 +08:00
f610f53838 remove redundent code
these field are already copied in afl_fsrv_init_dup
2025-05-24 22:28:26 +08:00
be00ea9f00 Merge pull request #2446 from kcwu/fix-save_if_interesting
fix save_if_interesting
2025-05-24 12:43:26 +02:00
d0df78f07a use functions instead of macros 2025-05-24 16:39:31 +08:00
7e1dc85450 nit 2025-05-23 09:19:42 +02:00
8152def40e changelog 2025-05-23 09:18:55 +02:00
e6ed31d550 Merge pull request #2449 from AFLplusplus/hidden
instrument all hidden edges
2025-05-23 09:16:17 +02:00
77758a1343 nits in calibrate_case 2025-05-23 08:50:37 +02:00
ea1fbb75b3 Merge pull request #2448 from kcwu/setup-ld-preload
Refactor and simplify handling of AFL_PRELOAD
2025-05-23 08:22:03 +02:00
d62a885f0f simplify code 2025-05-23 10:48:56 +08:00
55d534cd6d extract function afl_fsrv_setup_preload 2025-05-23 10:39:03 +08:00
cee764689c fix save_if_interesting
The value of `classified`, `bits_new`, and `cksum`, were not always
correctly maintained.
 1. In the past, `afl->queue_top->exec_cksum` was always assigned when
    `add_to_queue`, however it became conditional since cd57641705.
    This doesn't change correctness because calibrate_case() will
    calculate the checksum. However, this mean one calibration run is
    wasted.

 2. Sometimes `classified` is set incorrectly.
    For example, this code snippet
    ```
    new_bits = has_new_bits_unclassified(afl, afl->virgin_bits);
    classified = 1;
    ```
    should be changed to
    ```
    new_bits = has_new_bits_unclassified(afl, afl->virgin_bits);
    if (new_bits) classified = 1;
    ```

This commit fixed above issues and use macros to make the code easier to
understand. This should prevent to forget to set classified in the
future (like the bug fixed by 30c93d1321).

The macros also defers the calculations to where the values are really
needed. This could save cpu if the code returns earlier. For example,
if a case is timeout first and not timeout the second time, the current
code does classify_counts, which is not always needed.
2025-05-22 23:14:40 +08:00
d02390e62e add desock option 2025-05-22 17:08:12 +02:00
ff1e0580b0 changelog 2025-05-22 12:00:10 +02:00
4730fa4226 Merge pull request #2444 from AFLplusplus/better_sync
Better sync
2025-05-22 11:55:53 +02:00
50fb923691 nit 2025-05-22 11:55:39 +02:00
300fc1f002 fix startup check 2025-05-21 11:52:57 +02:00
4ff40ee6fd add comment 2025-05-20 17:09:52 +02:00
c3d5f3f471 skip entried synced from us if we have not restarted 2025-05-20 17:07:30 +02:00
45a7d65207 Merge pull request #2433 from kcwu/not-sync-known-case
skip known case if the file is actually coming from us
2025-05-20 16:09:14 +02:00
b8d1f16979 Merge pull request #2441 from abhisen7/fix/afl-cmin
Execute ASan targets without leak checks to read AFL_MAP_SIZE
2025-05-19 14:11:00 +02:00
c699aa252d reduce overhead 2025-05-19 18:53:22 +08:00
7c27fc7cfe skip known case if the file is actually coming from us
Assume we have one main node and N secondary nodes in a parallel
fuzzing campaign. Every time the main node found a new case, the case
will be synced to all secondary nodes. Later when the main node sync,
the main node need to run the file again to see if the file is
interesting because they are "new" cases on the secondary nodes.

In other words, for one new case, the main node has to run the redundent
test N times. This is wasteful and slowed down the progress of main
node.

The wasteful issue on secondary nodes is acceptable because we can run
more secondary nodes to mitigate the inefficiency. OTOH, increasing the
number of secondary nodes slow down the main node further.
2025-05-19 18:50:22 +08:00
46b9efbf7d Execute ASan targets without leak checks to read AFL_MAP_SIZE 2025-05-19 11:52:40 +02:00
92d1a60096 print deubg on before missed instrumented instructions 2025-05-19 10:23:22 +02:00
f90fafc07a Merge pull request #2440 from AFLplusplus/dev
push to hidden
2025-05-19 10:02:12 +02:00
59c2198532 Merge pull request #2437 from AFLplusplus/fixsync
Fix sync for restarted instances
2025-05-18 17:30:30 +02:00
c7654c028d nit 2025-05-18 17:26:57 +02:00
ccc7ab5944 use goto and free glob 2025-05-18 17:23:53 +02:00
06afa48e02 code format 2025-05-18 14:07:03 +02:00
816334000a Merge branch 'stable' into dev 2025-05-18 14:06:09 +02:00
2573ccb66e flush stdout for AFL_DUMP_MAP_SIZE 2025-05-18 14:02:58 +02:00
767b990af6 fix syncing to restarted instances 2025-05-18 11:03:40 +02:00
1631e5988f nit 2025-05-17 13:57:24 +02:00
3ee3b5c384 code format 2025-05-17 00:05:31 +02:00
7f7d5ff29b Merge pull request #2427 from kcwu/dev
avoid duplicated code
2025-05-16 18:05:48 +02:00
6dcd0aa089 Add env variable SHM_FUZZ_MAP_SIZE (#2430)
* Add env variable SHM_FUZZ_PAGE_SIZE to tell the forkserver about the max shm input size

* fix

* PAGE_SIZE->MAP_SIZE

* fix more nits

* More cleanup
2025-05-16 12:14:58 +02:00
c47221db7c Fix aflpp_driver compilation on MacOS (#2431) (#2432)
* Fix aflpp_driver compilation on MacOS

* less newline
2025-05-15 19:43:30 +02:00
d6bb210410 Fix aflpp_driver compilation on MacOS (#2431)
* Fix aflpp_driver compilation on MacOS

* less newline
2025-05-15 19:05:20 +02:00
c2a026f68f Merge pull request #2428 from AFLplusplus/dev
push to stable
2025-05-15 14:12:44 +02:00
2a97350754 Merge pull request #2426 from AFLplusplus/fix_resume
Fix resume for syncing
2025-05-15 14:09:09 +02:00
9004be20b8 update changelog 2025-05-15 14:08:49 +02:00
dffd6537ae avoid duplicated code 2025-05-15 18:44:25 +08:00
25d7d65216 workaround for compiler asan+lto issues 2025-05-15 11:46:39 +02:00
7a32331c99 better solution 2025-05-15 11:05:02 +02:00
b27e861a51 fix resume for syncing 2025-05-15 10:47:36 +02:00
875c3902f0 Merge pull request #2425 from AFLplusplus/dev
push to stable
2025-05-15 10:20:25 +02:00
bedb38e216 fix UAF in -F 2025-05-14 21:05:38 +02:00
ef0c236427 update fuzzing_in_depth 2025-05-14 16:45:23 +02:00