You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/src/introduction.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,6 @@ feel free to use and mutate an Abstract Syntax Tree instead, for structured fuzz
29
29
-`scalable`: As part of LibAFL, we developed `Low Level Message Passing`, `LLMP` for short, which allows LibAFL to scale almost linearly over cores. That is, if you chose to use this feature - it is your fuzzer, after all.
30
30
Scaling to multiple machines over TCP is also possible, using LLMP's `broker2broker` feature.
31
31
-`fast`: We do everything we can at compile time so that the runtime overhead is as minimal as it can get.
32
-
-`bring your own target`: We support binary-only modes, like QEMU-Mode and Frida-Mode with ASAN and CmpLog, as well as multiple compilation passes for sourced-based instrumentation.
32
+
-`bring your own target`: We support binary-only modes, like (full-system) QEMU-Mode and Frida-Mode with ASan and CmpLog, as well as multiple compilation passes for sourced-based instrumentation.
33
33
Of course, we also support custom instrumentation, as you can see in the Python example based on Google's Atheris.
34
34
-`usable`: This one is on you to decide. Dig right in!
Copy file name to clipboardexpand all lines: docs/src/message_passing/configurations.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
Configurations for individual fuzzer nodes are relevant for multi node fuzzing.
4
4
The chapter describes how to run nodes with different configurations
5
5
in one fuzzing cluster.
6
-
This allows, for example, a node compiled with ASAN, to know that it needs to rerun new testcases for a node without ASAN, while the same binary/configuration does not.
6
+
This allows, for example, a node compiled with ASan, to know that it needs to rerun new testcases for a node without ASan, while the same binary/configuration does not.
7
7
8
8
Fuzzers with the same configuration can exchange Observers for new testcases and reuse them without rerunning the input.
9
9
A different configuration indicates, that only the raw input can be exchanged, it must be rerun on the other node to capture relevant observations.
Copy file name to clipboardexpand all lines: docs/src/message_passing/spawn_instances.md
+6-2
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Multiple fuzzer instances can be spawned using different ways.
4
4
5
5
## Manually, via a TCP port
6
6
7
-
The straightforward way to do Multi-Threading is to use the `LlmpRestartingEventManager`, specifically to use `setup_restarting_mgr_std`.
7
+
The straightforward way to do Multi-Threading is to use the [`LlmpRestartingEventManager`](https://docs.rs/libafl/latest/libafl/events/llmp/struct.LlmpRestartingEventManager.html), specifically to use [`setup_restarting_mgr_std`](https://docs.rs/libafl/latest/libafl/events/llmp/fn.setup_restarting_mgr_std.html).
8
8
It abstracts away all the pesky details about restarts on crash handling (for in-memory fuzzers) and multi-threading.
9
9
With it, every instance you launch manually tries to connect to a TCP port on the local machine.
10
10
@@ -13,7 +13,7 @@ If the port is not yet bound, this instance becomes the broker, binding itself t
13
13
If the port is already bound, the EventManager will try to connect to it.
14
14
The instance becomes a client and can now communicate with all other nodes.
15
15
16
-
Launching nodes manually has the benefit that you can have multiple nodes with different configurations, such as clients fuzzing with and without ASAN.
16
+
Launching nodes manually has the benefit that you can have multiple nodes with different configurations, such as clients fuzzing with and without `ASan``.
17
17
18
18
While it's called "restarting" manager, it uses `fork` on Unix-like operating systems as optimization and only actually restarts from scratch on Windows.
19
19
@@ -42,13 +42,17 @@ To use launcher, first you need to write an anonymous function `let mut run_clie
42
42
This first starts a broker, then spawns `n` clients, according to the value passed to `cores`.
43
43
The value is a string indicating the cores to bind to, for example, `0,2,5` or `0-3`.
44
44
For each client, `run_client` will be called.
45
+
If the launcher uses `fork`, it will hide child output, unless the settings indicate otherwise, or the `LIBAFL_DEBUG_OUTPUT` env variable is set.
45
46
On Windows, the Launcher will restart each client, while on Unix-alikes, it will use `fork`.
46
47
47
48
Advanced use-cases:
48
49
49
50
1. To connect multiple nodes together via TCP, you can use the `remote_broker_addr`. this requires the `llmp_bind_public` compile-time feature for `LibAFL`.
50
51
2. To use multiple launchers for individual configurations, you can set `spawn_broker` to `false` on all instances but one.
51
52
3. Launcher will not select the cores automatically, so you need to specify the `cores` that you want.
53
+
4. On `Unix`, you can chose between a forking and non-forking version of Launcher by setting the `fork` feature in LibAFL. Some targets may not like forking, but it is faster than restarting processes from scratch. Windows will never fork.
54
+
5. For simple debugging, first set the `LIBAFL_DEBUG_OUTPUT` env variable to see if a child process printed anything.
55
+
6. For further debugging of fuzzer failures, it may make sense to replace `Launcher` temporarily with a [`SimpleEventManager`](https://docs.rs/libafl/latest/libafl/events/simple/struct.SimpleEventManager.html#method.new) and call your harness fn (`run_client(None, mgr, 0);`) directly, so that fuzzing runs in the same thread and is easier to debug, before moving back to `Launcher` after the bugfix.
52
56
53
57
For more examples, you can check out `qemu_launcher` and `libfuzzer_libpng_launcher` in [`./fuzzers/`](https://github.com/AFLplusplus/LibAFL/tree/main/fuzzers).
0 commit comments