We deleted the i2p target (#28692) because it wasn’t effective at covering the i2p code and as a result never found any bugs. Someone should re-work the target and then re-introduce it to the repo.
Some of the short comings of the previous harness were identified:
- The temporary file created for the private key should be deleted at the end of each iteration (https://github.com/bitcoin/bitcoin/blob/106ab20f121f14d021725c8a657999079dbabfc1/src/test/fuzz/i2p.cpp#L34), or better yet don’t use a temporary file at all somehow.
- The i2p code expects base32/64 encoded inputs in a couple places, which a fuzzer might be blocked by.
- A dictionary (see below) could help with fuzzing this target as the i2p SAM protocol is somewhat involved. The dictionary should be added to
qa-assets/fuzz_dicts
, once the target is fixed and re-intorduced.
0"HELLO VERSION"
1"HELLO REPLY RESULT=OK VERSION="
2"HELLO REPLY RESULT=NOVERSION"
3"HELLO REPLY RESULT=I2P_ERROR"
4"SESSION CREATE"
5"SESSION STATUS RESULT=OK DESTINATION="
6"SESSION STATUS RESULT=DUPLICATED_ID"
7"SESSION STATUS RESULT=DUPLICATED_DEST"
8"SESSION STATUS RESULT=INVALID_ID"
9"SESSION STATUS RESULT=INVALID_KEY"
10"SESSION STATUS RESULT=I2P_ERROR MESSAGE="
11"SESSION ADD"
12"SESSION REMOVE"
13"STREAM CONNECT"
14"STREAM STATUS RESULT=OK"
15"STREAM STATUS RESULT=INVALID_ID"
16"STREAM STATUS RESULT=INVALID_KEY"
17"STREAM STATUS RESULT=CANT_REACH_PEER"
18"STREAM STATUS RESULT=I2P_ERROR MESSAGE="
19"STREAM ACCEPT"
20"STREAM FORWARD"
21"DATAGRAM SEND"
22"RAW SEND"
23"DEST GENERATE"
24"DEST REPLY PUB= PRIV="
25"DEST REPLY RESULT=I2P_ERROR"
26"NAMING LOOKUP"
27"NAMING REPLY RESULT=OK NAME= VALUE="
28"DATAGRAM RECEIVED DESTINATION= SIZE="
29"RAW RECEIVED SIZE="
30"NAMING REPLY RESULT=INVALID_KEY NAME="
31"NAMING REPLY RESULT=KEY_NOT_FOUND NAME="
32"MIN"
33"MAX"
34"STYLE"
35"ID"
36"SILENT"
37"DESTINATION"
38"NAME"
39"SIGNATURE_TYPE"
40"CRYPTO_TYPE"
41"SIZE"
42"HOST"
43"PORT"
44"FROM_PORT"
45"TRANSIENT"
46"STREAM"
47"DATAGRAM"
48"RAW"
49"MASTER"
50"true"
51"false"