Skip to content

Commit

Permalink
🐛 Fix a typo in the fuzzing
Browse files Browse the repository at this point in the history
  • Loading branch information
hrmhatef committed Jun 4, 2024
1 parent 5e88310 commit 0e79882
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fuzzing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
6 changes: 3 additions & 3 deletions fuzzing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0e79882

Please sign in to comment.