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

An infinite loop and hang in Exiv2::Jp2Image::readMetadata() #1011

Closed
boo0m opened this issue Sep 30, 2019 · 3 comments
Closed

An infinite loop and hang in Exiv2::Jp2Image::readMetadata() #1011

boo0m opened this issue Sep 30, 2019 · 3 comments
Assignees
Labels
Milestone

Comments

@boo0m
Copy link

boo0m commented Sep 30, 2019

Describe the bug
An input file can result in an infinite loop and hang, with high CPU consumption. Remote attackers could leverage this vulnerability to cause a denial of service via a crafted file.

To Reproduce
Steps to reproduce the behaviour:
excute 'build/bin/exiv2 Jp2Image_readMetadata_loop.poc'

Expected behavior
An infinite loop and hang, with high CPU consumption
image

Additional context
The poc is here
Jp2Image_readMetadata_loop.poc.zip

The code:

io_->seek(restore,BasicIo::beg);
io_->seek(subBox.length, Exiv2::BasicIo::cur);

leads to an infinite loop.

@boo0m boo0m added the bug label Sep 30, 2019
@clanmills clanmills self-assigned this Sep 30, 2019
@clanmills clanmills added this to the v0.27.4 milestone Sep 30, 2019
@clanmills
Copy link
Collaborator

Thank you for reporting this. It will be investigate and I hope we'll include a fix with Exiv2 v0.27.4 which is scheduled for 2019-13-31.

@clanmills
Copy link
Collaborator

Fix submitted #1013

piponazo pushed a commit that referenced this issue Oct 5, 2019
D4N added a commit that referenced this issue Oct 5, 2019
Fix #1011 fix_1011_jp2_readmetadata_loop
mergify bot pushed a commit that referenced this issue Oct 5, 2019
(cherry picked from commit 1b917c3)

# Conflicts:
#	src/jp2image.cpp
piponazo pushed a commit that referenced this issue Nov 18, 2019
(cherry picked from commit 1b917c3)
dirkmueller pushed a commit to dirkmueller/exiv2 that referenced this issue Mar 23, 2020
(cherry picked from commit 1b917c3)
(cherry picked from commit 55af053)
dirkmueller pushed a commit to dirkmueller/exiv2 that referenced this issue Mar 23, 2020
(cherry picked from commit 1b917c3)
(cherry picked from commit 55af053)
D4N added a commit that referenced this issue Mar 24, 2020
Fix #1011 fix_1011_jp2_readmetadata_loop
@vcunat
Copy link

vcunat commented Mar 29, 2020

For reference, the issue has been assigned name CVE-2019-20421.

@clanmills clanmills self-assigned this Mar 29, 2020
1div0 pushed a commit to 1div0/exiv2 that referenced this issue Jun 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants