Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace the assert in mel_init to an if statement to address an issue with fuzzing. #1436

Merged
merged 2 commits into from
Aug 11, 2022

Conversation

aous72
Copy link
Contributor

@aous72 aous72 commented Jul 16, 2022

Hi Even, Everyone,

This is to address the issue with the Fuzzer in
https://bugs.chromium.org/p/chromium/issues/detail?id=1343737
A wrong sequence should produce erroneous result, but should not cause a crash.
A similar if statement can be added to mel_read(), but this requires more changes -- no fuzzing issue produced for this.

I tried to run openjpeg fuzzing, but I did not know how to tell oss-fuzz what source to use. I tried
python infra/helper.py build_fuzzers --architecture x86_64 --sanitizer address openjpeg ~/openjpeg
The first time, it ran with an error message at the end about conformance.
The second time, it is producing an error mkdir: cannot create directory 'build': File exists, but I do not know where this folder is to delete it.
I am happy to run fuzzing on this pull request.

Kind regards,
Aous.

PS: There is another small modification, unrelated to Chromium fuzzer, to some quantities to make them more meaningful, but let's get this thing through.

aous72 and others added 2 commits July 13, 2022 11:30
… statement, returning false when an incorrect sequence of bytes are encountered in the MEL segment. Similar code should be added to the main MEL decoding subrountine, but the change is more involved; in any case, an incorrect sequence produces incorrect results, but should not be harmful or cause a crash.
@rouault rouault merged commit 4da04cd into uclouvain:master Aug 11, 2022
@rouault
Copy link
Collaborator

rouault commented Aug 11, 2022

thanks. sorry for the delay!

lukas-w pushed a commit to lukas-w/pdfium that referenced this pull request Aug 16, 2022
Cherrypick the fix [1] from upstream OpenJPEG.

[1] uclouvain/openjpeg#1436

Bug: chromium:1343737
Change-Id: Ie92a9b8b81dc105df8aa8159480d2f0ba0ccc569
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/96471
Reviewed-by: Tom Sepez <[email protected]>
Commit-Queue: Lei Zhang <[email protected]>
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