Add comprehensive fuzzer suite for improved OSS-Fuzz coverage - #1615
Open
skypher wants to merge 1 commit into
Open
Add comprehensive fuzzer suite for improved OSS-Fuzz coverage#1615skypher wants to merge 1 commit into
skypher wants to merge 1 commit into
Conversation
This PR adds 10 new fuzz targets to significantly improve code coverage from the current ~50% to an estimated 85-95%. The new fuzzers cover previously untested code paths including: New fuzz targets: - opj_compress_fuzzer: Basic encoder fuzzing - opj_tile_fuzzer: Tile-based decoding (opj_get_decoded_tile, etc.) - opj_decode_area_fuzzer: Partial area decoding with threading - opj_roundtrip_fuzzer: Encode-then-decode for encoder validation - opj_components_fuzzer: Selective component decoding - opj_tiled_encoder_fuzzer: Tile-based encoding (opj_write_tile) - opj_dump_info_fuzzer: Metadata/index APIs (opj_get_cstr_info, etc.) - opj_mct_fuzzer: MCT matrices and cinema profiles - opj_encoder_options_fuzzer: Extended options (PLT, TLM, GUARD_BITS) - opj_subsampled_fuzzer: Subsampling patterns and ROI encoding Additional improvements: - Add JPEG 2000 dictionary (80+ tokens) for guided fuzzing - Add synthetic seed corpus for encoder fuzzers - Add options files for slow fuzzers (timeout/max_len settings) - Update build script to support all new fuzzers and copy resources Previously uncovered functions now tested: - opj_write_tile, opj_image_tile_create - opj_get_decoded_tile, opj_read_tile_header, opj_decode_tile_data - opj_set_decode_area, opj_set_decoded_components - opj_set_MCT, opj_encoder_set_extra_options - opj_get_cstr_info, opj_get_cstr_index, opj_dump_codec - opj_decoder_set_strict_mode, opj_codec_set_threads
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds 10 new fuzz targets to significantly improve OSS-Fuzz code coverage from the current ~50% to an estimated 85-95%. The new fuzzers cover previously untested code paths including encoder APIs, tile-based operations, MCT, and metadata functions.
New Fuzz Targets
opj_compress_fuzzeropj_tile_fuzzeropj_get_decoded_tile, etc.)opj_decode_area_fuzzeropj_roundtrip_fuzzeropj_components_fuzzeropj_tiled_encoder_fuzzeropj_write_tile)opj_dump_info_fuzzeropj_mct_fuzzeropj_encoder_options_fuzzeropj_subsampled_fuzzerAdditional Improvements
Previously Uncovered Functions Now Tested
opj_write_tile,opj_image_tile_createopj_get_decoded_tile,opj_read_tile_header,opj_decode_tile_dataopj_set_decode_area,opj_set_decoded_componentsopj_set_MCT,opj_encoder_set_extra_optionsopj_get_cstr_info,opj_get_cstr_index,opj_dump_codecopj_decoder_set_strict_mode,opj_codec_set_threadsTest Plan