In just 3 weeks we're hosting BTC++ Exploits edition in Florianopolis, Brazil, so we thought it would be fun to offer up some bounties for the best technical explanations of exploits-related concepts.
This week's bounty is for Fuzzing. We've got 10,000 sats for the best explanation of what fuzzing is and how it is used in Bitcoin development.
Go!
10,000 sats bounty
Mining aims to find new blocks, fuzzing tries to find new vulnerabilities. Both require wast amounts of computing power to explore the search space.
For a cryptographic hash function we believe there is no shortcut and you just have to bruteforce to find the desired prefix, in fuzzing you can have heuristics to guide you - like is the program crashing, was this function visited or did something else unexpected happen with this random input.
Fuzzing is an automated software testing technique designed to discover bugs, crashes, memory issues, assertion failures, and potential security vulnerabilities by feeding a program a massive number of semi-random, mutated, or invalid inputs (often called "fuzz" inputs) and observing how the code behaves under those extreme conditions.
The core idea is simple but powerful: instead of writing hand-crafted test cases for every possible scenario (which is impossible for complex systems), a fuzzer generates or mutates inputs intelligently, runs the target code repeatedly, and uses feedback (especially code coverage — which branches/paths were executed) to guide the generation of new, more interesting inputs that explore previously untested areas of the codebase. When the program crashes, hangs, leaks memory, or triggers undefined behavior on some input, that's a signal of a potential bug worth investigating.
There are different styles of fuzzing:
Popular coverage-guided fuzzers used in open-source projects include libFuzzer (from LLVM/Clang, in-process and very fast), AFL++ (American Fuzzy Lop successor, great for binary-only targets), and Honggfuzz.
How Fuzzing Is Used in Bitcoin DevelopmentHow Fuzzing Is Used in Bitcoin Development
Bitcoin Core (the reference implementation) has integrated coverage-guided fuzzing deeply into its development process since around 2016–2018, evolving from early experiments to a mature infrastructure. This helps catch subtle bugs — especially in parsing, deserialization, validation, and consensus-critical code — before they become exploitable vulnerabilities on mainnet.
Key aspects in Bitcoin Core:
In short: fuzzing acts as an automated "adversary" that tries to break Bitcoin Core's code with weird inputs 24/7, making the network more robust against real-world exploits. It's one of the most cost-effective ways the project invests in security.
Thanks ChatGPT.
From my understanding it’s a way for a programmer to test their code with different input and scenarios to see if the code is secure
Fuzzing is a form of program-driven quality testing. It is used to purposefully input bad or erroneous data into Bitcoin Core node software to find bugs, errors and glitches. The results can the be used to build in protections going forward, making the blockchain network stronger and more resilient.
deleted by author