-
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
Several bugs in exiv2 0.27-rc3 #590
Comments
@cool-tomato Thanks for letting me know about this. They'll be investigated this week. I'm curious about how you found them as I thought we had dealt with every reported POCs, fixed them and added them to our test suite. Are those new discoveries, or something we didn't fix? |
I have checked these bugs, and they are new discoveries. Actually, I forget how I found these poc files, they are from the accumulation of the past. I just tested them with several command line options, plus ASAN-compiled version, that's all. |
Thanks for the update. I'm looking at them now. I thought we were done with this - however we're not. Let me see what I can get done about this. |
I've submitted a fix for (2) tiffimage_int-out-of-bound-read-poc-2.dms I had difficulty reproducing this. On MacOS-X I get (with/without the patch).
On Ubuntu, without the fix, I get:
With the fix, I get:
The fix is to "unroll" the pointers at the location of the crash.
|
I've realised why I couldn't consistently reproduce this! When the fix is in place, the file is successfully modified. Running the command (even with defective code) on the modified file, the crash does not occur. The fix is solid and working OK on MacOS-X/clang and Ubuntu 18.04/gcc. |
I've submitted fixes for the 3 JP2000 files in this issue report:
I know the fixes are effective on those particular files. I'm not familiar with the JPEG 2000 format and I'd like to study it more and look at both the fixes and the code generally to see if it can be improved. I'd also like to add tests to our test suite respect those files. I'm rather lost by the lack of structure in the names of the files. Here's what I believe we're dealing with:
I believe they are correctly copied to GitHub:
|
My fix has disturbed the test harness for 188:
Looking at the code in the test harness, we have:
This is a JP2000 file. I've almost certainly detected the FUZZ earlier in the file parser before it arrives at the arithmetic overflow. This reinforces my thoughts about studying both the JP2000 file format and the parser (and encoder) in jp2image.cpp and decide what's best. |
We will not accept these changes for v0.27. I hope to incorporate them into Exiv2 v0.27.1 which hasn't been defined, however will probably be released at the end of March 2019. |
I just went trough all the 5 cases and:
|
(cherry picked from commit a557c7f)
(cherry picked from commit a557c7f)
I have tested them in latest version 0.27-RC3.
And, more info can be found at https://github.com/TeamSeri0us/pocs/tree/master/exiv2/20181206.
The text was updated successfully, but these errors were encountered: