cups: add fuzz harnesses for eight cups subsystems#72
Open
tc-agent wants to merge 2 commits into
Open
Conversation
Fuzzing Coverage ReportTested: project
Per-harness
Δ = (after − before) / before, to accommodate that denominators may change. "new" when before is 0; "deleted" when after is 0. |
tc-agent
force-pushed
the
master
branch
4 times, most recently
from
May 28, 2026 18:05
af7f9a7 to
806b281
Compare
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.
Adds eight libFuzzer harnesses that cover cups subsystems with no existing target in OpenPrinting/fuzzing. The Dockerfile overlays this project's
harnesses/andseeds/onto the cloned fuzzing repo sooss_fuzz_build.shpicks them up unmodified — the intent is to upstream each harness to OpenPrinting/fuzzing once the API surface is settled, at which point this oss-fuzz overlay can go away.New harnesses
fuzz_ipp_supportcups/ipp-support.c—ippAttributeString,ippCreateRequestedArray, and the fullipp{Op,Tag,Error,Enum,State}String/Valuelookup tables.fuzz_encodecups/encode.c—cupsParseOptions+cupsEncodeOptions{,2}for eachIPP_TAG_*group; iterates_ippFindOption.fuzz_transcodecups/transcode.c—cupsCharsetToUTF8/cupsUTF8ToCharset/cupsUTF8ToUTF32/cupsUTF32ToUTF8across thecups_encoding_tenum.fuzz_formcups/form.c—cupsFormDecode+cupsFormEncoderound-trip.fuzz_ppd_emitcups/ppd-emit.c—ppdOpenFile+ppdMarkDefaults/ppdMarkOption+ppdEmit{,String,JCL,JCLEnd,Fd}over everyppd_section_t.fuzz_ipp_filecups/ipp-file.c—ippFileNew/ippFileOpen/ippFileReadon text-format ipptool.testfiles.fuzz_hashcups/hash.c,cups/md5.c—cupsHashData/cupsHashStringacross the supported algorithm table.fuzz_pwgcups/pwg-media.c—pwgMediaForLegacy/PPD/PWG/Size+pwgFormatSizeName.Coverage motivation
Per the Fuzz Introspector baseline the existing 9 OSS-Fuzz harnesses leave large cups source files at 0% line coverage:
ipp-support.c(1679 lines),ipp-file.c(1193),ppd-emit.c(643),pwg-media.c(483),encode.c(296),form.c(204),md5.c(153),hash.c(118), withtranscode.cat 10%. Each new harness walks an explicit list of entry points / lookup keys so coverage is meaningful in the first few minutes of fuzzing rather than relying on libFuzzer to rediscover them.Routing note
Long-term these harnesses belong in OpenPrinting/fuzzing alongside the existing cups harnesses; this PR is the smallest-possible vehicle to start exercising the listed files in OSS-Fuzz immediately while a parallel upstream conversation happens. The Dockerfile change is two
COPYlines and reverts cleanly.Seed corpora
All committed seeds are human-readable: PPDs are copied from
cups/test/andcups/cups/,.testfiles fromcups/test/andcups/examples/, and the form/pwg/encode/transcode seeds are committed text. Harnesses that pick an enum case from the first input byte (fuzz_transcode,fuzz_hash) rely on libFuzzer mutation rather than committing binary seeds.