-
Notifications
You must be signed in to change notification settings - Fork 37.7k
tests: Add fuzzing harnesses for various Base{32,58,64} and hex related functions #17229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: Add fuzzing harnesses for various Base{32,58,64} and hex related functions #17229
Conversation
728a7b7
to
59f7c87
Compare
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
59f7c87
to
7c7d3f3
Compare
7c7d3f3
to
a2be454
Compare
4d8b706
to
d1e3524
Compare
d1e3524
to
c6a2063
Compare
Rebased! :) |
c6a2063
to
370c0da
Compare
Rebased! :) |
2557f6d
to
8c1c321
Compare
8c1c321
to
c8b3595
Compare
e5d1142
to
ac290ab
Compare
…ce). Add NODISCARD.
ac290ab
to
c184057
Compare
ACK c184057 🔁 Show signature and timestampSignature:
Timestamp of file with hash |
… and hex related functions c184057 tests: Add fuzzing harness for various hex related functions (practicalswift) 526dd78 tests: Add fuzzing harness for various Base{32,58,64} related functions (practicalswift) 32e2712 util: Move TrimString(...). Introduce default pattern (trims whitespace). Add NODISCARD. (practicalswift) 22d9bae tests: Add corpora suppression (FUZZERS_MISSING_CORPORA) for fuzzers missing in https://github.com/bitcoin-core/qa-assets/tree/master/fuzz_seed_corpus (practicalswift) Pull request description: Add fuzzing harnesses for various Base{32,58,64} and hex related functions. **Testing this PR** Run: ``` $ CC=clang CXX=clang++ ./configure --enable-fuzz \ --with-sanitizers=address,fuzzer,undefined $ make $ src/test/fuzz/base_encode_decode … $ src/test/fuzz/hex … ``` ACKs for top commit: MarcoFalke: ACK c184057 🔁 Tree-SHA512: 4fcbe4f641fc553e43fd5c3c40a6beec0d2ce90c5ffc718213b37fc18aba4c055e51e26f93d01ea1248fd89473d07c9dce77db7f014b47d3abd045f61b5f1905
…,58,64} and hex related functions c184057 tests: Add fuzzing harness for various hex related functions (practicalswift) 526dd78 tests: Add fuzzing harness for various Base{32,58,64} related functions (practicalswift) 32e2712 util: Move TrimString(...). Introduce default pattern (trims whitespace). Add NODISCARD. (practicalswift) 22d9bae tests: Add corpora suppression (FUZZERS_MISSING_CORPORA) for fuzzers missing in https://github.com/bitcoin-core/qa-assets/tree/master/fuzz_seed_corpus (practicalswift) Pull request description: Add fuzzing harnesses for various Base{32,58,64} and hex related functions. **Testing this PR** Run: ``` $ CC=clang CXX=clang++ ./configure --enable-fuzz \ --with-sanitizers=address,fuzzer,undefined $ make $ src/test/fuzz/base_encode_decode … $ src/test/fuzz/hex … ``` ACKs for top commit: MarcoFalke: ACK c184057 🔁 Tree-SHA512: 4fcbe4f641fc553e43fd5c3c40a6beec0d2ce90c5ffc718213b37fc18aba4c055e51e26f93d01ea1248fd89473d07c9dce77db7f014b47d3abd045f61b5f1905
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK c184057 - code review and tested on master posthumously 🏃♂️
bitcoin/bitcoin (master)$ src/test/fuzz/base_encode_decode
INFO: Seed: 1034069505
INFO: Loaded 1 modules (5201 inline 8-bit counters): 5201 [0x559140d7b920, 0x559140d7cd71),
INFO: Loaded 1 PC tables (5201 PCs): 5201 [0x559140d7cd78,0x559140d91288),
INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 4096 bytes
INFO: A corpus is not provided, starting from an empty corpus
#2 INITED cov: 451 ft: 452 corp: 1/1b lim: 4 exec/s: 0 rss: 41Mb
#3 NEW cov: 460 ft: 557 corp: 2/3b lim: 4 exec/s: 0 rss: 41Mb L: 2/2 MS: 1 InsertByte-
#5 NEW cov: 460 ft: 559 corp: 3/5b lim: 4 exec/s: 0 rss: 41Mb L: 2/2 MS: 2 ShuffleBytes-CopyPart-
#7 NEW cov: 461 ft: 560 corp: 4/7b lim: 4 exec/s: 0 rss: 41Mb L: 2/2 MS: 2 ShuffleBytes-ChangeBit-
bitcoin/bitcoin (master)$ src/test/fuzz/hex
INFO: Seed: 1110008671
INFO: Loaded 1 modules (3630 inline 8-bit counters): 3630 [0x5602274bbe40, 0x5602274bcc6e),
INFO: Loaded 1 PC tables (3630 PCs): 3630 [0x5602274bcc70,0x5602274caf50),
INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 4096 bytes
INFO: A corpus is not provided, starting from an empty corpus
#2 INITED cov: 176 ft: 177 corp: 1/1b lim: 4 exec/s: 0 rss: 41Mb
#5 NEW cov: 183 ft: 197 corp: 2/3b lim: 4 exec/s: 0 rss: 41Mb L: 2/2 MS: 3 ShuffleBytes-ShuffleBytes-InsertByte-
#6 NEW cov: 183 ft: 198 corp: 3/5b lim: 4 exec/s: 0 rss: 41Mb L: 2/2 MS: 1 InsertByte-
#7 NEW cov: 184 ft: 212 corp: 4/7b lim: 4 exec/s: 0 rss: 41Mb L: 2/2 MS: 1 ShuffleBytes-
- rpc/wallet: initialize nFeeRequired to avoid using garbage value on failure bitcoin#18274 - httpserver: use own HTTP status codes bitcoin#18168 - tests: Add fuzzing harnesses for various Base{32,58,64} and hex related functions bitcoin#17229 - util: Don't allow Base32/64-decoding or ParseMoney(…) on strings with embedded NUL characters. Add tests. bitcoin#17753 - util: Fail to parse empty string in ParseMoney bitcoin#18225 - util: Fail to parse whitespace-only strings in ParseMoney(...) (instead of parsing as zero) bitcoin#18270 - Replace the LogPrint function with a macro bitcoin#17218 - Fix wallet unload race condition bitcoin#18338 - qt: Fix Window -> Minimize menu item bitcoin#18549 - windows: Enable heap terminate-on-corruption bitcoin#17916
…ed functions Summary: ``` Add fuzzing harnesses for various Base{32,58,64} and hex related functions. ``` Backport of core [[bitcoin/bitcoin#17229 | PR17229]]. The missing corpora change is irrelevant for us. Depends on D8155. Test Plan: ninja bitcoin-fuzzers ./test/fuzz/test_runner.py <path_to_corpus> Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D8156
…,58,64} and hex related functions c184057 tests: Add fuzzing harness for various hex related functions (practicalswift) 526dd78 tests: Add fuzzing harness for various Base{32,58,64} related functions (practicalswift) 32e2712 util: Move TrimString(...). Introduce default pattern (trims whitespace). Add NODISCARD. (practicalswift) 22d9bae tests: Add corpora suppression (FUZZERS_MISSING_CORPORA) for fuzzers missing in https://github.com/bitcoin-core/qa-assets/tree/master/fuzz_seed_corpus (practicalswift) Pull request description: Add fuzzing harnesses for various Base{32,58,64} and hex related functions. **Testing this PR** Run: ``` $ CC=clang CXX=clang++ ./configure --enable-fuzz \ --with-sanitizers=address,fuzzer,undefined $ make $ src/test/fuzz/base_encode_decode … $ src/test/fuzz/hex … ``` ACKs for top commit: MarcoFalke: ACK c184057 🔁 Tree-SHA512: 4fcbe4f641fc553e43fd5c3c40a6beec0d2ce90c5ffc718213b37fc18aba4c055e51e26f93d01ea1248fd89473d07c9dce77db7f014b47d3abd045f61b5f1905
…ault pattern, NODISCARD
… and hex related functions
… and hex related functions
… and hex related functions
… and hex related functions
… and hex related functions
… and hex related functions
… and hex related functions
…ault pattern, NODISCARD
Add fuzzing harnesses for various Base{32,58,64} and hex related functions.
Testing this PR
Run: