New issue
Advanced search Search tips

Issue 722115 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Mac
Pri: ----
Type: Bug-Security

Blocking:
issue 62400



Sign in to add a comment

Heap-buffer-overflow in CGifLZWDecoder::ClearTable

Project Member Reported by ClusterFuzz, May 14 2017

Issue description

Detailed report: https://clusterfuzz.com/testcase?key=6207408358817792

Fuzzer: afl_pdf_codec_gif_fuzzer
Job Type: afl_chrome_asan
Platform Id: linux

Crash Type: Heap-buffer-overflow WRITE 1
Crash Address: 0x62a000005232
Crash State:
  CGifLZWDecoder::ClearTable
  InitTable
  gif_load_frame
  
Sanitizer: address (ASAN)

Recommended Security Severity: High

Reproducer Testcase: https://clusterfuzz.com/download?testcase_id=6207408358817792


Issue filed automatically.

See https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/reproducing.md for more information.
 
Cc: npm@chromium.org
Components: Internals>Plugins>PDF
Labels: -Security_Impact-Stable Security_Impact-None
Owner: dsinclair@chromium.org
Status: Assigned (was: Untriaged)
Another similar xfa issue with similar stack (on different line)
comparison was with  issue 722037 .
Blocking: 62400
Project Member

Comment 4 by bugdroid1@chromium.org, May 15 2017

The following revision refers to this bug:
  https://pdfium.googlesource.com/pdfium/+/34f8e1fd650883c8107d925a6c6b87090d52d278

commit 34f8e1fd650883c8107d925a6c6b87090d52d278
Author: Nicolas Pena <npm@chromium.org>
Date: Mon May 15 15:54:13 2017

Gif: error out on invalid code sizes

From the Gif spec:
'The output codes are of variable length, starting at <code size>+1 bits per
code, up to 12 bits per code. This defines a maximum code value of 4095
(0xFFF).'
'Because the LZW compression used for GIF creates a series of variable length
codes, of between 3 and 12 bits each'

Bug:  chromium:722115 
Change-Id: Ic9cff99e6012195a6b5173693b029dc710285688
Reviewed-on: https://pdfium-review.googlesource.com/5490
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>

[modify] https://crrev.com/34f8e1fd650883c8107d925a6c6b87090d52d278/core/fxcodec/lgif/fx_gif.cpp

Cc: -npm@chromium.org dsinclair@chromium.org
Owner: npm@chromium.org
Status: Fixed (was: Assigned)
Project Member

Comment 6 by ClusterFuzz, May 15 2017

Labels: OS-Mac
Project Member

Comment 7 by ClusterFuzz, May 16 2017

ClusterFuzz has detected this issue as fixed in range 471819:471872.

Detailed report: https://clusterfuzz.com/testcase?key=6207408358817792

Fuzzer: afl_pdf_codec_gif_fuzzer
Job Type: afl_chrome_asan
Platform Id: linux

Crash Type: Heap-buffer-overflow WRITE 1
Crash Address: 0x62a000005232
Crash State:
  CGifLZWDecoder::ClearTable
  InitTable
  gif_load_frame
  
Sanitizer: address (ASAN)

Recommended Security Severity: High

Fixed: https://clusterfuzz.com/revisions?job=afl_chrome_asan&range=471819:471872

Reproducer Testcase: https://clusterfuzz.com/download?testcase_id=6207408358817792


See https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/reproducing.md for more information.

If you suspect that the result above is incorrect, try re-doing that job on the test case report page.
Project Member

Comment 8 by sheriffbot@chromium.org, May 16 2017

Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify
Project Member

Comment 9 by sheriffbot@chromium.org, Aug 22 2017

Labels: -Restrict-View-SecurityNotify allpublic
This bug has been closed for more than 14 weeks. Removing security view restrictions.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment