Skip to content

OSS-Fuzz: Fix fuzzers and build for cups-filters #55

Draft
arthurscchan wants to merge 2 commits into
OpenPrinting:mainfrom
arthurscchan:fix-cups-filters-fuzzer
Draft

OSS-Fuzz: Fix fuzzers and build for cups-filters #55
arthurscchan wants to merge 2 commits into
OpenPrinting:mainfrom
arthurscchan:fix-cups-filters-fuzzer

Conversation

@arthurscchan

Copy link
Copy Markdown

This PR fixes the fuzzer and build script to address an OSS-Fuzz fuzzing build crash for the cups-filters project. The OSS-Fuzz side build script is also been fixed to allow the fuzzing fore cups-filters project back to normal.

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>

@fish98 fish98 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for the PR 😃 I noticed there are some large changes across many files, including a rewrite of fuzz_pdf.c and the removal of the Makefile.

I have two questions:

  1. Have you tested this locally, and does the current code compile successfully under OSS-Fuzz framewokr?
  2. The Makefile was previously used to make local builds easier without relying on OSS-Fuzz. Do we still need to remove it?

@arthurscchan

Copy link
Copy Markdown
Author

Thanks for your prompt reply.

  1. Yes, This PR, together with the fixes in OSS-Fuzz is initiated because the OSS-Fuzz build for cups-filters has been failing for some time. The major reason of the failed is because of the missing of required dependencies in Ubuntu 20.04 for building the latest cups-filters 1.X. Thus the OSS-Fuzz side fixes was to address that and update the base image to Ubuntu 24.04. Now the build is success in local test. So it works. And the changes in this repository mainly because the fuzzer is considered bad which actually does not cover code of cups-filters project correctly and always exit early after I have fixed the build. So I make changes to the fuzzer code itself to targets real portion of the code that are worth fuzzing. And the changes has also been tested in local build of OSS-Fuzz and it is working now.

  2. Sorry for the overlook, I failed to recognise the use of Makefile, I could restore that and will commit a change asap.

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
@arthurscchan arthurscchan marked this pull request as draft June 17, 2026 10:15

@fish98 fish98 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants