Skip to content

Commit

Permalink
Merge bitcoin/bitcoin#30908: doc: remove Eclipser fuzzing documentation
Browse files Browse the repository at this point in the history
735436d Remove outdated Eclipser fuzzing documentation (Jon Atack)

Pull request description:

  Remove the Eclipser fuzzing documentation from `doc/fuzzing.md`, as that repository (https://github.com/SoftSec-KAIST/Eclipser) hasn't been updated in several years, appears possibly unmaintained, and likely isn't being actively used for fuzzing Bitcoin Core.

  These docs were originally added in bitcoin/bitcoin#22585.

ACKs for top commit:
  maflcko:
    review ACK 735436d
  brunoerg:
    ACK 735436d

Tree-SHA512: 7ccbf93c10add53e92edf67a622722935029add63f8fbb6e733b96e9d155faeb8d5d3678adb0e7f2ce8ccbdffd2a34c3dc93adbcf4e3ce0cdd03e20ad3e6bbd6
  • Loading branch information
fanquake committed Sep 18, 2024
2 parents 6b97882 + 735436d commit 69409bc
Showing 1 changed file with 0 additions and 65 deletions.
65 changes: 0 additions & 65 deletions doc/fuzzing.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,71 +282,6 @@ $ ./honggfuzz/honggfuzz --exit_upon_crash --quiet --timeout 4 -n 1 -Q \
-debug
```
# Fuzzing Bitcoin Core using Eclipser (v1.x)
## Quickstart guide
To quickly get started fuzzing Bitcoin Core using [Eclipser v1.x](https://github.com/SoftSec-KAIST/Eclipser/tree/v1.x):
```sh
$ git clone https://github.com/bitcoin/bitcoin
$ cd bitcoin/
$ sudo vim /etc/apt/sources.list # Uncomment the lines starting with 'deb-src'.
$ sudo apt-get update
$ sudo apt-get build-dep qemu
$ sudo apt-get install libtool libtool-bin wget automake autoconf bison gdb
```
At this point, you must install the .NET core. The process differs, depending on your Linux distribution.
See [this link](https://learn.microsoft.com/en-us/dotnet/core/install/linux) for details.
On Ubuntu 20.04, the following should work:
```sh
$ wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb
$ sudo dpkg -i packages-microsoft-prod.deb
$ rm packages-microsoft-prod.deb
$ sudo apt-get update
$ sudo apt-get install -y dotnet-sdk-2.1
```
You will also want to make sure Python is installed as `python` for the Eclipser install to succeed.
```sh
$ git clone https://github.com/SoftSec-KAIST/Eclipser.git
$ cd Eclipser
$ git checkout v1.x
$ make
$ cd ..
$ cmake -B build_fuzz -DBUILD_FOR_FUZZING=ON
$ mkdir -p outputs/
$ FUZZ=bech32 dotnet ./Eclipser/build/Eclipser.dll fuzz -p build_fuzz/src/test/fuzz/fuzz -t 36000 -o outputs --src stdin
```
This will perform 10 hours of fuzzing.
To make further use of the inputs generated by Eclipser, you
must first decode them:
```sh
$ dotnet Eclipser/build/Eclipser.dll decode -i outputs/testcase -o decoded_outputs
```
This will place raw inputs in the directory `decoded_outputs/decoded_stdins`. Crashes are in the `outputs/crashes` directory, and must
be decoded in the same way.
Fuzzing with Eclipser will likely be much more effective if using an existing corpus:
```sh
$ git clone https://github.com/bitcoin-core/qa-assets
$ FUZZ=bech32 dotnet Eclipser/build/Eclipser.dll fuzz -p build_fuzz/src/test/fuzz/fuzz -t 36000 -i qa-assets/fuzz_corpora/bech32 outputs --src stdin
```
Note that fuzzing with Eclipser on certain targets (those that create 'full nodes', e.g. `process_message*`) will,
for now, slowly fill `/tmp/` with improperly cleaned-up files, which will cause spurious crashes.
See [this proposed patch](https://github.com/bitcoin/bitcoin/pull/22472) for more information.
Read the [Eclipser documentation for v1.x](https://github.com/SoftSec-KAIST/Eclipser/tree/v1.x) for more details on using Eclipser.
# OSS-Fuzz
Bitcoin Core participates in Google's [OSS-Fuzz](https://github.com/google/oss-fuzz/tree/master/projects/bitcoin-core)
Expand Down

0 comments on commit 69409bc

Please sign in to comment.