|
| size_t | LLVMFuzzerMutate (uint8_t *data, size_t size, size_t max_size) |
| |
| const size_t absolution_globals_size | __attribute__ ((weak)) |
| |
| static size_t | fuzz_prefix_size (void) |
| |
| static int | fuzz_split_is_valid (size_t prefix_size, size_t max_size) |
| |
| static size_t | fuzz_bootstrap_input (uint8_t *data, size_t size, size_t prefix_size, size_t max_size) |
| |
| static void | fuzz_mutate_window (uint8_t *data, size_t data_len, size_t max_span, unsigned int pick) |
| |
| static void | fuzz_mutate_prefix_window (uint8_t *data, size_t prefix_size, unsigned int pick) |
| |
| static void | fuzz_mutate_ctrl (uint8_t *data) |
| |
| static size_t | fuzz_mutate_post_prefix (uint8_t *data, size_t size, size_t max_size) |
| |
| static int | fuzz_should_inject_token (unsigned int seed) |
| |
| static size_t | fuzz_mutate_structured (uint8_t *data, size_t prefix_size, size_t post_prefix_size, size_t max_size, unsigned int seed) |
| |
| static size_t | fuzz_mutate_raw (uint8_t *data, size_t prefix_size, size_t post_prefix_size, size_t max_size, unsigned int seed) |
| |
| static size_t | fuzz_mutate_with_split (uint8_t *data, size_t size, size_t max_size, unsigned int seed) |
| |
| static size_t | fuzz_custom_mutator (uint8_t *data, size_t size, size_t max_size, unsigned int seed) |
| |
Prefix-aware LibFuzzer custom mutator.
LibFuzzer's default mutator treats the input as a flat byte array and would silently corrupt the Absolution prefix that holds the app's restored global state. This header provides fuzz_custom_mutator() which keeps prefix and tail as separate mutation regions: the control bytes are steered independently, the prefix is mutated in small windows to stay coherent, and the tail is mutated freely by LLVMFuzzerMutate().
Wire it by defining FUZZ_PREFIX_SIZE_FALLBACK, FUZZ_CTRL_OFF/LEN, and fuzz_lane_is_structured() from mock/scenario_layout.h before including this header, then forwarding LLVMFuzzerCustomMutator() to fuzz_custom_mutator(). See The harness for the full pattern. For TLV-framed payloads see tlv_mutator.h.
Definition in file fuzz_mutator.h.