The fuzzer plugin for libfastboot is designed based on the understanding of the source code and tries to achieve the following:
The configuration parameters are not hardcoded, but instead selected based on incoming data. This ensures more code paths are reached by the fuzzer.
libfastboot supports the following parameters:
year
)month
)day
)version
)fsOption
)Parameter | Valid Values | Configured Value |
---|---|---|
year | 2000 to 2127 | Value obtained from FuzzedDataProvider |
month | 1 to 12 | Value obtained from FuzzedDataProvider |
day | 1 to 31 | Value obtained from FuzzedDataProvider |
version | 0 to 127 | Value obtained from FuzzedDataProvider |
fsOption | 0. casefold 1. projid 2. compress | Value obtained from FuzzedDataProvider |
The plugin feeds the entire input data to the module. This ensures that the plugin tolerates any kind of input (empty, huge, malformed, etc) and doesnt exit()
on any input and thereby increasing the chance of identifying vulnerabilities.
This describes steps to build fastboot_fuzzer binary.
Build the fuzzer
$ mm -j$(nproc) fastboot_fuzzer_fuzzer
To run on host
$ $ANDROID_HOST_OUT/fuzz/${TARGET_ARCH}/fastboot_fuzzer/fastboot_fuzzer CORPUS_DIR