|
Embedded SDK
Embedded SDK
|
Prefix-aware LibFuzzer custom mutator. More...


Go to the source code of this file.
Typedefs | |
| typedef size_t(* | fuzz_input_mutator_fn) (uint8_t *input, size_t size, size_t max_size, unsigned int seed) |
| Mutates a harness input in place, returning its new size. | |
Functions | |
| size_t | LLVMFuzzerMutate (uint8_t *data, size_t size, size_t max_size) |
| size_t | fuzz_prefix_size (void) |
| Where Absolution's sampled state ends (see cmake/EmitPrefixSize.cmake). | |
| size_t | fuzz_custom_mutator (uint8_t *data, size_t size, size_t max_size, unsigned int seed) |
The framework's LLVMFuzzerCustomMutator() body. | |
| size_t | fuzz_mutate_input_with (uint8_t *data, size_t size, size_t max_size, unsigned int seed, fuzz_input_mutator_fn mutate_input) |
| Run a grammar-aware mutator over the harness input only, leaving the sampled prefix untouched. | |
Prefix-aware LibFuzzer custom mutator.
A fuzzer input is [ Absolution prefix | harness input ] (see fuzz_defs.h). LibFuzzer's default mutator treats that as a flat byte array, which mostly produces incoherent global state; fuzz_custom_mutator() splits the two and treats them differently:
LLVMFuzzerMutate(),fuzz_harness.h forwards LLVMFuzzerCustomMutator() here by default; the only layout fact needed is the prefix size.
An app with its own input grammar defines FUZZ_APP_CUSTOM_MUTATOR and builds on fuzz_mutate_input_with(). For TLV-framed payloads see tlv_mutator.h.
Definition in file fuzz_mutator.h.
| typedef size_t(* fuzz_input_mutator_fn) (uint8_t *input, size_t size, size_t max_size, unsigned int seed) |
Mutates a harness input in place, returning its new size.
Definition at line 40 of file fuzz_mutator.h.
| size_t fuzz_custom_mutator | ( | uint8_t * | data, |
| size_t | size, | ||
| size_t | max_size, | ||
| unsigned int | seed | ||
| ) |
The framework's LLVMFuzzerCustomMutator() body.
| size_t fuzz_mutate_input_with | ( | uint8_t * | data, |
| size_t | size, | ||
| size_t | max_size, | ||
| unsigned int | seed, | ||
| fuzz_input_mutator_fn | mutate_input | ||
| ) |
Run a grammar-aware mutator over the harness input only, leaving the sampled prefix untouched.
Harnesses with their own input grammar (TLV, for example) use this instead of repeating the prefix arithmetic themselves.
| size_t fuzz_prefix_size | ( | void | ) |
Where Absolution's sampled state ends (see cmake/EmitPrefixSize.cmake).
|
extern |