-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Fix heap buffer overflow in decode_png
#7691
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/7691
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 2 Unrelated FailuresAs of commit 8cbf5d7: BROKEN TRUNK - The following jobs failed but were present on the merge base 5178a2e:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Hi @kobrineli! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
decode_png
decode_png
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @kobrineli , LGTM if green. We'll need you to sign the CLA before we can merge it.
@vfdev-5 maybe you want to give this a quick look?
@NicolasHug Hi! Thank you |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me as well, thanks @kobrineli
Hey @NicolasHug! You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py |
Reviewed By: vmoens Differential Revision: D47186584 fbshipit-source-id: cafbfcdc70b8a7bfe5160b07e671f0141e939aaf
Hi! We've been fuzzing torchvision project with sydr-fuzz.
We've found a heap buffer overflow error at
png.c:90
in libpng project.The error occurred because in
decode_png.cpp
in the first bytes of the input contents are compared with the png signature. But there is no check that the input size can be less than 8, so the heap buffer overflow atpng_sig_cmp
function may happentorchvision version: 9d0a93e
pytorch version: 0f1621df1a0a73956c7ce4e2f72f069e610e0137
OS: Ubuntu 20.04
How to reproduce
Build docker from here and run the container:
Run the target on this input:
You will see the following output: