Triforce Internals
Triforce Internals
## Fuzzing Design
Note that since the fuzzer runs in a forked copy of the virtual
machine, the entire in-memory state of the kernel for each test
case is isolated. If the operating system uses any other resources
besides memory, these resources will not be isolated between test
cases. For this reason, its usually desirable to boot the
operating system using an in-memory filesystem such as a Linux ramdisk image.
AFL is typically used with programs that are quite a bit smaller
than a kernel. To cope with the larger program, we adjusted
the edge map size from 2^16 to 2^21 to reduce edge collisions
to an acceptable level and we updated the hash function to
a better hash recommended by Peter Gutmann. More information
about the measurements that lead to this map size can be
found in
https://groups.google.com/forum/#!searchin/afl-users/hash/afl-users/iHCx2Z2WncI/
Okyn1oXkIwAJ .
## AFL utilities
We did not need to make very many changes to the AFL utilities.
The most ubiquitous change was to add a new `-QQ` option
to many of the tools. The old `-Q` option enables QEMU user-mode emulation.
The new `-QQ` mode enables full-system emulation in QEMU.
Unlike the user-mode version, the system-mode feature does not
attempt to be clever in setting up the command line, and
expects the user to pass in the path to the QEMU emulator and
its flags.