The Bitcoin Core fuzzing docs refer to "fuzzing harnesses". What is a harness in this context?

(There have been two previous Bitcoin Core PR review club sessions on fuzz testing at the time of writing, in January 2020 and in April 2020. The latter was on PR 18521 which added a process_messages harness.)

1 Answer 1


A fuzzing harness is a test case or a particular test target. This blog post defines a harness as an "entry point executable". When you want to fuzz input that is not reachable from the command line you need to write a new testing harness.

For example, if we wanted to assess the security of a client/server application, a testing harness would need to perform many actions, like starting the server process prior to sending network input from a client connection. Or if we wanted to fuzz test the inputs of functions in a DLL (loaded library), since there is no entry point defined we would need to write a testing harness to pass input from the command line into DLL functions.

This blog post goes through an example of writing a test harness to take input from a file and then pass that input to a vulnerable function that we want to fuzz.

There is also a glossary of fuzzing terms here.

Thanks to Marco Falke for answering this question on IRC.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.