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

Infinite loop on corrupted JPEG input. #13

Open
adambuchbinder opened this issue Jul 21, 2017 · 0 comments
Open

Infinite loop on corrupted JPEG input. #13

adambuchbinder opened this issue Jul 21, 2017 · 0 comments

Comments

@adambuchbinder
Copy link

Running exifprobe -L hang.jpg leads to an infinite loop. (Without -L, it does the same, but it's harder to read.) The beginning of the output looks like:

FileName = hang.jpg
FileType = JPEG
FileSize = 911
JPEG.APP0           = @2:16       
JPEG.APP0.Version       = 1.1
JPEG.APP0.Units         = 'dots/inch'
JPEG.APP0.Xdensity      = 96
JPEG.APP0.Ydensity      = 96
JPEG.APP0.XThumbnail    = 0
JPEG.APP0.YThumbnail    = 0
JPEG.APP1           = @20:294      
JPEG.APP1.Ifd0.DateTime                    = 'AAAAAAAAAAAAAAAAAAA'
JPEG.APP1.Ifd0.TAG_0x5100                  = 0
JPEG.APP1.Ifd0.TAG_0x5101                  = 1
JPEG.APP1.Ifd0.JPEGInterchangeFormatLength = 00,00,00,ff,ff,ff,ff,ff,ff,00,00,00
JPEG.APP1.Ifd0.TAG_0x5103                  = 0
JPEG.APP1.Ifd0.TAG_0x5104                  = 2
JPEG.APP1.Ifd0.ExifIFDPointer              = @198
JPEG.APP1.Ifd0.PreviewDateTime             = 'CCCC !"#$%&'()*+,-./<=>?@'
JPEG.APP1.Ifd0.Exif.Version                     = '0231'
JPEG.APP1.Ifd0.Exif.DateTimeOriginal            = 'A:.B:.C:.D:.E:.F:.G|'
JPEG.APP1.Ifd0.Exif.DateTimeDigitized           = 'BBBBBBBBBBBBBBBBBBB'
JPEG.APP1.Ifd0.Exif.ComponentsConfiguration     = 1,2,3,0 = 'YCbCr'
JPEG.APP1.Ifd0.Exif.FlashPixVersion             = '0100'
JPEG.APP1.Ifd0.Exif.ColorSpace                  = 65535 = 'uncalibrated'
JPEG.APP1.APP0           = @2:16       
JPEG.APP1.APP0.Version       = 1.1
JPEG.APP1.APP0.Units         = 'dots/inch'
JPEG.APP1.APP0.Xdensity      = 96
JPEG.APP1.APP0.Ydensity      = 96
JPEG.APP1.APP0.XThumbnail    = 0
JPEG.APP1.APP0.YThumbnail    = 0
JPEG.APP1.APP1           = @20:294      
JPEG.APP1.APP1.Ifd0.DateTime                    = 'AAAAAAAAAAAAAAAAAAA'
JPEG.APP1.APP1.Ifd0.TAG_0x5100                  = 0
JPEG.APP1.APP1.Ifd0.TAG_0x5101                  = 1
JPEG.APP1.APP1.Ifd0.JPEGInterchangeFormatLength = 00,00,00,ff,ff,ff,ff,ff,ff,00,00,00
JPEG.APP1.APP1.Ifd0.TAG_0x5103                  = 0
JPEG.APP1.APP1.Ifd0.TAG_0x5104                  = 2
JPEG.APP1.APP1.Ifd0.ExifIFDPointer              = @198
JPEG.APP1.APP1.Ifd0.PreviewDateTime             = 'CCCC !"#$%&'()*+,-./<=>?@'
JPEG.APP1.APP1.Ifd0.Exif.Version                     = '0231'
JPEG.APP1.APP1.Ifd0.Exif.DateTimeOriginal            = 'A:.B:.C:.D:.E:.F:.G|'
JPEG.APP1.APP1.Ifd0.Exif.DateTimeDigitized           = 'BBBBBBBBBBBBBBBBBBB'
JPEG.APP1.APP1.Ifd0.Exif.ComponentsConfiguration     = 1,2,3,0 = 'YCbCr'
JPEG.APP1.APP1.Ifd0.Exif.FlashPixVersion             = '0100'
JPEG.APP1.APP1.Ifd0.Exif.ColorSpace                  = 65535 = 'uncalibrated'
JPEG.APP1.APP1.APP0           = @2:16       
JPEG.APP1.APP1.APP0.Version       = 1.1
JPEG.APP1.APP1.APP0.Units         = 'dots/inch'
JPEG.APP1.APP1.APP0.Xdensity      = 96
JPEG.APP1.APP1.APP0.Ydensity      = 96
JPEG.APP1.APP1.APP0.XThumbnail    = 0
JPEG.APP1.APP1.APP0.YThumbnail    = 0
JPEG.APP1.APP1.APP1           = @20:294      
JPEG.APP1.APP1.APP1.Ifd0.DateTime                    = 'AAAAAAAAAAAAAAAAAAA'

And eventually:

JPEG.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1           = @20:294      
JPEG.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.Ifd0.DateTime                    = 'AAAAAAAAAAAAAAAAAAA'
JPEG.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.APP1.Ifd0.TAG_0x5100                  = 0

And so on. It looks like there's some sort of infinite loop here.

The image is attached here: hang

This issue was discovered using american fuzzy lop, with a starting image from AlexAltea's collection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant