Bug 996583 - Endless loop on broken image files
Endless loop on broken image files
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: python-exif (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Terje Røsten
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-13 09:25 EDT by Nils Philippsen
Modified: 2013-08-22 20:29 EDT (History)
2 users (show)

See Also:
Fixed In Version: python-exif-1.3.3-1.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-22 20:28:17 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Nils Philippsen 2013-08-13 09:25:37 EDT
Description of problem:
Attempting to read broken images (with EXIF.process_file()) can result in endless loops.

Version-Release number of selected component (if applicable):
python-exif-1.1.0-2.fc19.noarch

How reproducible:
Reproducible

Steps to Reproduce:
1. wget https://github.com/ianare/exif-samples/raw/master/jpg/invalid/image00971.jpg

2a. python -c 'import EXIF; EXIF.process_file(open("image00971.jpg", "rb"))'

OR:

2b. python -c 'import EXIF; EXIF.process_file(open("image00971.jpg", "rb"), debug=True)'

Actual results:
Endless loop, one CPU core hot (100%). With 2b), kilometers of:

[...]
Segment base 0x8B88
Unexpected/unhandled segment type or file content.
Got Segment base 0x8B88
Unexpected/unhandled segment type or file content.
Got Segment base 0x8B88
Unexpected/unhandled segment type or file content.
Got Segment base 0x8B88
Unexpected/unhandled segment type or file content.
Got Segment base 0x8B88
Unexpected/unhandled segment type or file content.
Got Segment base 0x8B88
[...]


Expected results:
Nothing, immediate return.

Additional info:
Comment 1 Nils Philippsen 2013-08-13 11:12:26 EDT
Upstream issue: https://github.com/ianare/exif-py/pull/10

Upstream commit fixing the issue: https://github.com/ianare/exif-py/commit/dbb7f291ec1e31ef256f3c3287cb376492402a7d

This is included in version 1.2.0 and later (1.3.3 is current). Newer tarballs seem to be in a different place than the download URL in the spec file, and it doesn't seem very RPM spec friendly (i.e. the URL's basename doesn't match the actual filename of the tarball):

https://github.com/ianare/exif-py/archive/1.3.3.tar.gz
Comment 2 Fedora Update System 2013-08-13 15:19:55 EDT
python-exif-1.3.3-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/python-exif-1.3.3-1.fc19
Comment 3 Fedora Update System 2013-08-13 15:20:03 EDT
python-exif-1.3.3-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/python-exif-1.3.3-1.fc18
Comment 4 Nils Philippsen 2013-08-14 04:45:49 EDT
Thanks for the quick fix!
Comment 5 Fedora Update System 2013-08-14 22:31:52 EDT
Package python-exif-1.3.3-1.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing python-exif-1.3.3-1.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-14690/python-exif-1.3.3-1.fc19
then log in and leave karma (feedback).
Comment 6 Fedora Update System 2013-08-22 20:28:17 EDT
python-exif-1.3.3-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 7 Fedora Update System 2013-08-22 20:29:05 EDT
python-exif-1.3.3-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.