Overview
Fast Exploration Mutation is described as a deterministic mutation designed to increase the exploration speed of a coverage-guided fuzzer. It appears in the enhanced mutation set for an AFL-based processor-verification workflow, alongside Enhanced Havoc.
Procedure
Fast Exploration adds a preliminary exploration phase before the normal mutation procedure. The phase begins by inserting each RISC-V instruction at the beginning of every test vector. Instruction arguments are fixed to source/destination register x0 and immediate 0; the paper gives addi x0, x0, 0 as an example inserted instruction.
After insertion, the fuzzer executes the newly generated test vector. The test vector is saved only if it increases coverage. This coverage-gated retention is used to limit the state space and prevent state-space explosion.
The technique then applies bitflip mutation. The stated purpose of the bitflips is to cover possible instruction arguments and uncover unknown instructions. Instruction insertion and bitflip mutation are repeated iteratively until no new test vectors are found.
Intended effect
The mutation prephase is intended to cover a broad region of the RISC-V instruction-sequence state space without relying on a lucky random seed and without running into scalability problems.
Overhead characteristics
The described implementation has low overhead for three reasons:
- RV32I contains only 40 different instructions.
- The insertion and bitflip operations are applied only to test vectors that reach new coverage points, not to every generated test vector.
- Bitflip mutation does not add new actual overhead because it is moved into this phase rather than added as an extra later operation.
Implementation note
The authors state that implementing the mutation for their case study was straightforward because AFL's simple design made control-flow adjustments easy.
Relationship to Enhanced Havoc
Enhanced Havoc is described separately as another enhanced mutation. Like Fast Exploration, it adds insertion of RISC-V instructions, but unlike Fast Exploration its instruction arguments are not fixed to zero and it also supports compressed instructions. Enhanced Havoc also includes a replacement variant that does not change the size of the test vector.