0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-05 10:17:30 -05:00
bitcoin-bitcoin-core/src/test/fuzz
MarcoFalke e45863166f
Merge bitcoin/bitcoin#21169: fuzz: Add RPC interface fuzzing. Increase fuzzing coverage from 65% to 70%.
545404e7e1 fuzz: Add RPC interface fuzzing. Increase fuzzing coverage from 65% to 70%. (practicalswift)

Pull request description:

  Add RPC interface fuzzing.

  This PR increases overall fuzzing line coverage from [~65%](https://marcofalke.github.io/btc_cov/fuzz.coverage/) to ~70% 🎉

  To test this PR:

  ```
  $ make distclean
  $ ./autogen.sh
  $ CC=clang CXX=clang++ ./configure --enable-fuzz --with-sanitizers=address,fuzzer,undefined
  $ make -C src/ test/fuzz/fuzz
  $ FUZZ=rpc src/test/fuzz/fuzz
  ```

  See [`doc/fuzzing.md`](https://github.com/bitcoin/bitcoin/blob/master/doc/fuzzing.md) for more information on how to fuzz Bitcoin Core. Don't forget to contribute any coverage increasing inputs you find to the [Bitcoin Core fuzzing corpus repo](https://github.com/bitcoin-core/qa-assets).

  Happy fuzzing :)

ACKs for top commit:
  MarcoFalke:
    Concept ACK 545404e7e1

Tree-SHA512: 35fc1b508af42bf480ee3762326b09ff2eecdb7960a1917ad16345fadd5c0c21d666dafe736176e5a848ff6492483c782e4ea914cd9000faf50190df051950fd
2021-04-28 09:45:30 +02:00
..
addition_overflow.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
addrdb.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
addrman.cpp fuzz: Use ConsumeWeakEnum in addrman for service flags 2021-03-20 12:03:12 +01:00
asmap.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
asmap_direct.cpp test: add missing netaddress include headers 2021-03-16 19:52:37 +01:00
autofile.cpp scripted-diff: remove Optional & nullopt 2021-03-15 10:41:30 +08:00
banman.cpp Move MakeNoLogFileContext to common libtest_util, and use it in bench 2021-03-03 09:17:37 +01:00
base_encode_decode.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
bech32.cpp Implement Bech32m encoding/decoding 2021-03-15 17:26:35 -07:00
block.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
block_header.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
blockfilter.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
bloom_filter.cpp scripted-diff: Rename MakeFuzzingContext to MakeNoLogFileContext 2021-02-22 10:27:22 +01:00
buffered_file.cpp scripted-diff: remove Optional & nullopt 2021-03-15 10:41:30 +08:00
chain.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
checkqueue.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
coins_view.cpp fuzz: Removed unused try-catch in coins_view 2021-03-30 10:16:22 +02:00
connman.cpp [net] remove CConnman::AddNewAddresses 2021-03-20 10:24:40 +00:00
crypto.cpp scripted-diff: Rename MakeFuzzingContext to MakeNoLogFileContext 2021-02-22 10:27:22 +01:00
crypto_aes256.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
crypto_aes256cbc.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
crypto_chacha20.cpp scripted-diff: Rename MakeFuzzingContext to MakeNoLogFileContext 2021-02-22 10:27:22 +01:00
crypto_chacha20_poly1305_aead.cpp scripted-diff: Rename MakeFuzzingContext to MakeNoLogFileContext 2021-02-22 10:27:22 +01:00
crypto_common.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
crypto_hkdf_hmac_sha256_l32.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
crypto_poly1305.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
cuckoocache.cpp build: Fix fuzz-cuckoocache cross-compiling for Windows with DEBUG=1 2021-03-03 12:23:41 +02:00
danger_link_all.sh build: Add option --enable-danger-fuzz-link-all 2020-12-14 16:55:56 +01:00
data_stream.cpp Move MakeNoLogFileContext to common libtest_util, and use it in bench 2021-03-03 09:17:37 +01:00
decode_tx.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
descriptor_parse.cpp scripted-diff: remove MakeUnique<T>() 2021-03-11 13:45:14 +08:00
deserialize.cpp refactor: post Optional<> removal cleanups 2021-03-17 14:56:20 +08:00
eval_script.cpp scripted-diff: remove MakeUnique<T>() 2021-03-11 13:45:14 +08:00
fee_rate.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
fees.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
flatfile.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
float.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
fuzz.cpp scripted-diff: Rename MakeFuzzingContext to MakeNoLogFileContext 2021-02-22 10:27:22 +01:00
fuzz.h scripted-diff: Rename MakeFuzzingContext to MakeNoLogFileContext 2021-02-22 10:27:22 +01:00
FuzzedDataProvider.h fuzz: Bump FuzzedDataProvider.h 2021-03-09 12:56:44 +01:00
golomb_rice.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
hex.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
http_request.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
i2p.cpp fuzz: add tests for the I2P Session public interface 2021-03-16 14:58:38 +01:00
integer.cpp util: Avoid invalid integer negation in ValueFromAmount: make ValueFromAmount(const CAmount& n) well-defined also when n is std::numeric_limits<CAmount>::min() 2021-03-02 16:05:28 +00:00
key.cpp scripted-diff: remove MakeUnique<T>() 2021-03-11 13:45:14 +08:00
key_io.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
kitchen_sink.cpp scripted-diff: Rename MakeFuzzingContext to MakeNoLogFileContext 2021-02-22 10:27:22 +01:00
load_external_block_file.cpp scripted-diff: Rename MakeFuzzingContext to MakeNoLogFileContext 2021-02-22 10:27:22 +01:00
locale.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
merkleblock.cpp scripted-diff: Rename MakeFuzzingContext to MakeNoLogFileContext 2021-02-22 10:27:22 +01:00
message.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
muhash.cpp scripted-diff: Rename MakeFuzzingContext to MakeNoLogFileContext 2021-02-22 10:27:22 +01:00
multiplication_overflow.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
net.cpp refactor: post Optional<> removal cleanups 2021-03-17 14:56:20 +08:00
net_permissions.cpp fuzz: Add ConsumeWeakEnum helper, Extract ALL_NET_PERMISSION_FLAGS 2021-01-02 15:07:07 +01:00
netaddress.cpp scripted-diff: Rename MakeFuzzingContext to MakeNoLogFileContext 2021-02-22 10:27:22 +01:00
netbase_dns_lookup.cpp p2p, refactor: pass and use uint16_t CService::port as uint16_t 2021-03-16 19:52:31 +01:00
node_eviction.cpp Add m_inbound_onion to AttemptToEvictConnection() 2021-03-19 20:11:45 +01:00
p2p_transport_deserializer.cpp refactor: post Optional<> removal cleanups 2021-03-17 14:56:20 +08:00
parse_hd_keypath.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
parse_iso8601.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
parse_numbers.cpp test: add ParseUInt16() test coverage 2021-03-19 23:50:36 +01:00
parse_script.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
parse_univalue.cpp scripted-diff: remove MakeUnique<T>() 2021-03-11 13:45:14 +08:00
policy_estimator.cpp Move MakeNoLogFileContext to common libtest_util, and use it in bench 2021-03-03 09:17:37 +01:00
policy_estimator_io.cpp Move MakeNoLogFileContext to common libtest_util, and use it in bench 2021-03-03 09:17:37 +01:00
pow.cpp fuzz: [refactor] Use PickValue where possible 2021-03-24 06:57:55 +01:00
prevector.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
primitives_transaction.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
process_message.cpp net: Restrict period when cs_vNodes mutex is locked 2021-04-22 17:28:39 +03:00
process_messages.cpp net: Restrict period when cs_vNodes mutex is locked 2021-04-22 17:28:39 +03:00
protocol.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
psbt.cpp fuzz: Extend psbt fuzz target a bit 2021-04-09 13:17:37 +02:00
random.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
rbf.cpp Merge #20560: fuzz: Link all targets once 2020-12-15 19:00:36 +01:00
rolling_bloom_filter.cpp scripted-diff: Rename MakeFuzzingContext to MakeNoLogFileContext 2021-02-22 10:27:22 +01:00
rpc.cpp fuzz: Add RPC interface fuzzing. Increase fuzzing coverage from 65% to 70%. 2021-04-28 06:34:20 +00:00
script.cpp rpc: deprecate addresses and reqSigs from rpc outputs 2021-03-23 10:51:43 -04:00
script_assets_test_minimizer.cpp Make all SignatureChecker explicit about missing data 2021-03-15 17:29:39 -07:00
script_bitcoin_consensus.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
script_descriptor_cache.cpp refactor: post Optional<> removal cleanups 2021-03-17 14:56:20 +08:00
script_flags.cpp fuzz: Ensure prevout is consensus-valid 2021-04-25 10:36:00 +02:00
script_interpreter.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
script_ops.cpp scripted-diff: Rename MakeFuzzingContext to MakeNoLogFileContext 2021-02-22 10:27:22 +01:00
script_sigcache.cpp Merge #20560: fuzz: Link all targets once 2020-12-15 19:00:36 +01:00
script_sign.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
scriptnum_ops.cpp scripted-diff: Rename MakeFuzzingContext to MakeNoLogFileContext 2021-02-22 10:27:22 +01:00
secp256k1_ec_seckey_import_export_der.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
secp256k1_ecdsa_signature_parse_der_lax.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
signature_checker.cpp fuzz: [refactor] Use IsValidFlagCombination in signature_checker fuzz target 2021-03-30 10:42:45 +02:00
signet.cpp Move MakeNoLogFileContext to common libtest_util, and use it in bench 2021-03-03 09:17:37 +01:00
socks5.cpp test: add missing netaddress include headers 2021-03-16 19:52:37 +01:00
span.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
spanparsing.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
string.cpp test: add missing netaddress include headers 2021-03-16 19:52:37 +01:00
strprintf.cpp scripted-diff: Rename MakeFuzzingContext to MakeNoLogFileContext 2021-02-22 10:27:22 +01:00
system.cpp scripted-diff: remove Optional & nullopt 2021-03-15 10:41:30 +08:00
timedata.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
torcontrol.cpp fuzz: Add missing include (test/util/setup_common.h) 2021-03-04 08:39:27 +01:00
transaction.cpp rpc: deprecate addresses and reqSigs from rpc outputs 2021-03-23 10:51:43 -04:00
tx_in.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
tx_out.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
tx_pool.cpp doc: Fix typos from codespell lint 2021-04-07 19:26:25 +01:00
txrequest.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
util.cpp fuzz: use ConsumeBool() instead of !ConsumeBool() 2021-04-15 08:51:39 +02:00
util.h fuzz: split FuzzedSock interface and implementation 2021-04-15 08:51:36 +02:00
validation_load_mempool.cpp tests: Add fuzzing harness for LoadMempool(...) and DumpMempool(...) 2021-03-15 15:42:15 +00:00
versionbits.cpp versionbits: simplify state transitions 2021-04-12 11:14:49 +10:00