From c0bacd1b332a8fe6e5bc9dc6c7f297f856ad9662 Mon Sep 17 00:00:00 2001 From: hatef Date: Tue, 4 Jun 2024 15:52:22 +0300 Subject: [PATCH] :bug: Fix a typo in the fuzzing --- fuzzing/CMakeLists.txt | 2 +- fuzzing/README.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fuzzing/CMakeLists.txt b/fuzzing/CMakeLists.txt index 5f2e4d55..d80aab35 100644 --- a/fuzzing/CMakeLists.txt +++ b/fuzzing/CMakeLists.txt @@ -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..5207ad8b 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` 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 --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 ``` ### Run