README.TXT 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. This directory contain fuzzer main functions and scripts for the
  2. Google OSS Fuzz project: https://github.com/google/oss-fuzz/
  3. The main build scripts are in:
  4. https://github.com/google/oss-fuzz/tree/master/projects/openjpeg
  5. and call scripts in this directory.
  6. The list of issues is in:
  7. https://bugs.chromium.org/p/oss-fuzz/issues/list?q=openjpeg
  8. - Simulate the build of (dummy) fuzzers like OSS Fuzz does:
  9. Preliminary steps:
  10. $ cd ${ROOT_OF_OPENJPEG}
  11. $ git clone --depth 1 https://github.com/uclouvain/openjpeg-data data
  12. $ mkdir build
  13. $ cd build
  14. $ cmake ..
  15. $ make
  16. $ cd ..
  17. Actual building of fuzzer and seed corpus:
  18. $ cd tests/fuzzers
  19. $ make
  20. They are created in /tmp/*_fuzzer as well as with the
  21. /tmp/*_fuzzer_seed_corpus.zip files
  22. Run one:
  23. $ /tmp/opj_decompress_fuzzer a_file_name
  24. - Run locally OSS Fuzz:
  25. $ git clone https://github.com/google/oss-fuzz.git
  26. $ cd oss-fuzz
  27. $ python infra/helper.py build_image openjpeg
  28. Build fuzzers with the address sanitizer (could use undefined, etc...)
  29. $ python infra/helper.py build_fuzzers --sanitizer address openjpeg
  30. Test a particular fuzzer (replace opj_decompress_fuzzer by other fuzzers
  31. like the ones generated in /tmp by "make dummyfuzzers")
  32. $ python infra/helper.py run_fuzzer openjpeg opj_decompress_fuzzer
  33. How to deal with issues reported in https://bugs.chromium.org/p/oss-fuzz/issues/list?q=openjpeg ?
  34. 1. Leave a comment in (chromium database) bug entry to indicate that you work on it
  35. 2. Work
  36. 3. Commit a bug fix with log including "Credit to OSS-Fuzz" and a link to the bugs.chromium.org ticket
  37. 4. Add in the bugs.chromium.org ticket a link to the github commit implementing the fix.
  38. 5. Check chromium closed the bug (after one or two days typically)