New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 642462 link

Starred by 4 users

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , iOS , All , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Specifically crafted JPEG will hang the render process.

Project Member Reported by caban...@adobe.com, Aug 30 2016

Issue description

Version: All (verified chrome 55)
OS: at least mac and windows

What steps will reproduce the problem?
(1) copy html and jpeg to a directory
(2) open the HTML
(3) observe how the render process is at 100% and never times out

What is the expected output?
Chrome should detect the invalid jpeg and time out

What do you see instead?
infinite loop.
In src\third_party\WebKit\Source\platform\image-decoders\JPEGImageDecoder.cpp, the case statement "JPEG_START_DECOMPRESS:" never exists

Please use labels and text to provide additional information.

 

Comment 1 by caban...@adobe.com, Aug 30 2016

eoflop.jpg
7.8 MB View Download
index.html
105 bytes View Download

Comment 2 by caban...@adobe.com, Aug 31 2016

Labels: OS-Android OS-Chrome OS-iOS OS-Linux OS-All

Comment 3 by vakh@chromium.org, Sep 1 2016

Components: Internals>Images>Codecs
Labels: Security_Impact-Stable
Owner: schenney@chromium.org
schenney@ -- can you please take a look and help triage this more accurately? Thanks.

Adding component "Internals>Images>Codecs" though I am not sure if that is the right component.

Comment 4 by vakh@chromium.org, Sep 1 2016

Status: Available (was: Untriaged)

Comment 5 by vakh@chromium.org, Sep 1 2016

Reproduces on 53.0.2785.89 (64-bit) on OSX

Comment 6 by vakh@chromium.org, Sep 1 2016

Labels: -Pri-2 M-55 Security_Severity-Low Pri-3
Project Member

Comment 7 by sheriffbot@chromium.org, Sep 1 2016

Status: Assigned (was: Available)
Cc: schenney@chromium.org
Owner: noel@chromium.org
Status: Available (was: Assigned)
That's the right component. Thanks.
Project Member

Comment 9 by sheriffbot@chromium.org, Sep 2 2016

Status: Assigned (was: Available)

Comment 10 by noel@chromium.org, Nov 3 2016

Cc: scroggo@chromium.org msarett@chromium.org noel@chromium.org
Components: Blink>Image
Owner: ----
Status: Available (was: Assigned)
I'm OOO at the moment.  Looks like a denial of service corrupt JPEG, bones Firefox and the OSX image viewer too.
Owner: msarett@chromium.org
Status: Started (was: Available)
Looks to be stuck in jpeg_start_decompress().  It isn't fixed in the latest version of upstream.

I'm taking a look.  Can anyone suggest if it's ok to CC the maintainer of libjpeg-turbo on this type of bug?
Labels: -Type-Bug-Security -Security_Severity-Low -Security_Impact-Stable Type-Bug
Removing security labels.
Cc: d...@virtualgl.org
DRC, have you seen this?
Sounds suspiciously like a problem reported in

http://www.libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf

Can you confirm that the specially-crafted JPEG is a progressive image with a ridiculous number of scans?  If so, then the report details a technique that you can use to restrict the allowable number of progressive scans to a more reasonable value.

Yes that's exactly the issue.  Is the maximum number of scans allowed configurable?
The report includes sample code on how to accomplish that using a libjpeg progress monitor.
Page 15
Status: Fixed (was: Started)
Project Member

Comment 22 by bugdroid1@chromium.org, Nov 8 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3baac7bfbce401ba30bd36b6210561f9bda2f94d

commit 3baac7bfbce401ba30bd36b6210561f9bda2f94d
Author: msarett <msarett@google.com>
Date: Tue Nov 08 22:08:01 2016

Replace many-progressive-scans test image with smaller version

Drops test time to 1ms on my Linux machine.

BUG= 663354 
BUG= 642462 

Review-Url: https://codereview.chromium.org/2486043002
Cr-Commit-Position: refs/heads/master@{#430734}

[modify] https://crrev.com/3baac7bfbce401ba30bd36b6210561f9bda2f94d/third_party/WebKit/Source/platform/image-decoders/testing/many-progressive-scans.jpg

Status: Verified (was: Fixed)

Sign in to add a comment