diff --git a/fuzzing/CMakeLists.txt b/fuzzing/CMakeLists.txt index 5f2e4d55..1fb1f60f 100644 --- a/fuzzing/CMakeLists.txt +++ b/fuzzing/CMakeLists.txt @@ -7,7 +7,7 @@ endif() # project information project(Fuzzer VERSION 1.0 - DESCRIPTION "Contract parser of Boilerplate plugin app" + DESCRIPTION "Contract parser of Lisk plugin app" LANGUAGES C) # guard against bad build-type strings @@ -51,7 +51,7 @@ set(SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../src") set(ETH_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../ethereum-plugin-sdk") add_compile_definitions( - APPNAME="PluginBoilerplate" + APPNAME="Lisk" ) add_compile_definitions( diff --git a/fuzzing/README.md b/fuzzing/README.md index 393e38c1..1c75274c 100644 --- a/fuzzing/README.md +++ b/fuzzing/README.md @@ -4,7 +4,7 @@ Fuzzing allows us to test how a program behaves when provided with invalid, unexpected, or random data as input. -In the case of `app-plugin-boilerplate` we want to test the code that is responsible for handling the contract data. +In the case of `lisk-app-plugin` we want to test the code that is responsible for handling the contract data. The fuzzer needs to implement `int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)`, which provides an array of random bytes that can be used to simulate a serialized transaction. If the application crashes, or a [sanitizer](https://github.com/google/sanitizers) detects any kind of access violation, the fuzzing process is stopped, a report regarding the vulnerability is shown, and the input that triggered the bug is written to disk under the name `crash-*`. The vulnerable input file created can be passed as an argument to the fuzzer to triage the issue. @@ -70,13 +70,13 @@ The principle is to build the container, and run it to perform the fuzzing. # Prepare directory tree mkdir fuzzing/{corpus,out} # Container generation -docker build -t app-plugin-boilerplate --file .clusterfuzzlite/Dockerfile . +docker build -t lisk-app-plugin --file .clusterfuzzlite/Dockerfile . ``` ### Compilation ```console -docker run --rm --privileged -e FUZZING_LANGUAGE=c -v "$(realpath .)/fuzzing/out:/out" -ti app-plugin-boilerplate +docker run --rm --privileged -e FUZZING_LANGUAGE=c -v "$(realpath .)/fuzzing/out:/out" -ti lisk-app-plugin ``` ### Run