-
Notifications
You must be signed in to change notification settings - Fork 282
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
Integer overflow in Photoshop::setIptcIrb #2179
Comments
kevinbackhouse
added
bug
OSS-Fuzz
Bug reported by https://google.github.io/oss-fuzz/
labels
Mar 31, 2022
|
antermin
pushed a commit
to antermin/exiv2
that referenced
this issue
Mar 16, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reported by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=45302
There is an integer overflow here:
exiv2/src/jpgimage.cpp
Line 185 in 790fc46
The problem is that there is no check that
pos <= sizePsData
, so the subtraction can overflow. This problem used to be a latent bug, masked by the use of the signed typelong
, but the recent switch tosize_t
has made it triggerable. This problem only exists onmain
. It does not affect any released versions of Exiv2.poc: poc.tar.gz
To reproduce:
It doesn't actually cause a crash for me. OSS-Fuzz must be using different build settings to catch it. I had to set a breakpoint on
Exiv2::Photoshop::setIptcIrb
and step through the loop to see the overflow manually.The text was updated successfully, but these errors were encountered: