tests: Add fuzzing harness for {Read,Write}{LE,BE}{16,32,64} (crypto/common.h) #19247

pull practicalswift wants to merge 2 commits into bitcoin:master from practicalswift:fuzzers-crypto_common changing 3 files +91 −0
  1. practicalswift commented at 1:10 PM on June 11, 2020: contributor

    Add fuzzing harness for {Read,Write}{LE,BE}{16,32,64} (crypto/common.h).

    See doc/fuzzing.md for 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.

    Happy fuzzing :)

  2. fanquake added the label Tests on Jun 11, 2020
  3. practicalswift force-pushed on Jun 11, 2020
  4. MarcoFalke commented at 1:17 PM on June 11, 2020: member

    Any thoughts on clarifying that ConsumeFixedLengthByteVector returns a zero-filled byte vector when there remaining bytes are insufficient?

  5. practicalswift force-pushed on Jun 11, 2020
  6. practicalswift commented at 1:48 PM on June 11, 2020: contributor

    @MarcoFalke Good idea. Added!

  7. tests: Add std::vector<uint8_t> ConsumeFixedLengthByteVector(FuzzedDataProvider& fuzzed_data_provider, const size_t length) 4a8181b303
  8. tests: Add fuzzing harness for {Read,Write}{LE,BE}{16,32,64} (crypto/common.h) cf5b8f64b3
  9. in src/test/fuzz/util.h:218 in b429e0f8a8 outdated
     213 | @@ -214,4 +214,16 @@ NODISCARD inline bool ContainsSpentInput(const CTransaction& tx, const CCoinsVie
     214 |      return false;
     215 |  }
     216 |  
     217 | +// Returns a byte vector of size `length` regardless of the number of remaining bytes available
     218 | +// from the fuzzer. Pads with zero value bytes if needed to achieve a vector size of `length`.
    


    MarcoFalke commented at 1:56 PM on June 11, 2020:

    Sadly doxygen is disabled on the test directory, but for good karma I suggest to still use doxygen comments (see dev notes for example formattings)


    practicalswift commented at 2:06 PM on June 11, 2020:

    Fixed!

  10. practicalswift force-pushed on Jun 11, 2020
  11. DrahtBot commented at 4:23 PM on June 11, 2020: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #19222 (tests: Add fuzzing harness for BanMan by practicalswift)
    • #19203 (net: Add regression fuzz harness for CVE-2017-18350. Add FuzzedSocket. Add thin SOCKET wrapper. by practicalswift)
    • #19143 (tests: Add fuzzing harnesses for CAutoFile, CBufferedFile, LoadExternalBlockFile and other FILE* consumers by practicalswift)
    • #19074 (tests: Use BasicTestingSetup to initialise fuzzing environment by practicalswift)

    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.

  12. DrahtBot cross-referenced this on Jun 11, 2020 from issue tests: Add fuzzing harness for BanMan by practicalswift
  13. MarcoFalke commented at 4:55 PM on June 11, 2020: member

    ACK cf5b8f64b3fef053035fa11231601b79bfa53aff

  14. MarcoFalke merged this on Jun 11, 2020
  15. MarcoFalke closed this on Jun 11, 2020

  16. DrahtBot cross-referenced this on Jun 11, 2020 from issue net: Add regression fuzz harness for CVE-2017-18350. Add FuzzedSocket. by practicalswift
  17. DrahtBot cross-referenced this on Jun 11, 2020 from issue tests: Add fuzzing harnesses for CAutoFile, CBufferedFile, LoadExternalBlockFile and other FILE* consumers by practicalswift
  18. DrahtBot cross-referenced this on Jun 11, 2020 from issue tests: Use BasicTestingSetup to initialise fuzzing environment by practicalswift
  19. Fabcien referenced this in commit db8ba86527 on Feb 1, 2021
  20. practicalswift deleted the branch on Apr 10, 2021
  21. kwvg referenced this in commit c3fa75aa2a on May 7, 2022
  22. kwvg referenced this in commit a7cf951783 on May 7, 2022
  23. kwvg referenced this in commit e81ae7823f on Jun 14, 2022
  24. kwvg referenced this in commit adc85f6fa8 on Jun 14, 2022
  25. kwvg referenced this in commit 71e68f89e8 on Jun 14, 2022
  26. kwvg referenced this in commit 6c9af2b89f on Jun 18, 2022
  27. kwvg referenced this in commit 7cb3b5048c on Jun 18, 2022
  28. kwvg referenced this in commit 05f6e59be3 on Jul 4, 2022
  29. kwvg referenced this in commit 755668dd9c on Jul 4, 2022
  30. kwvg referenced this in commit 3d3ffdf916 on Jul 6, 2022
  31. kwvg referenced this in commit fcbe7e773d on Jul 6, 2022
  32. kwvg referenced this in commit c2e59403a8 on Jul 6, 2022
  33. kwvg referenced this in commit 1f2cf39924 on Jul 13, 2022
  34. kwvg referenced this in commit 765995fd39 on Jul 13, 2022
  35. kwvg referenced this in commit cd9b83c15e on Jul 15, 2022
  36. PastaPastaPasta referenced this in commit 30d6584cb6 on Jul 17, 2022
  37. bitcoin locked this on Aug 16, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-20 06:54 UTC