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

Issue 603489 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug

Blocking:
issue 62400



Sign in to add a comment

Undefined-shift in CFDE_XMLSyntaxParser::ParseTextChar

Project Member Reported by ClusterFuzz, Apr 14 2016

Issue description

Detailed report: https://cluster-fuzz.appspot.com/testcase?key=6016808452096000

Fuzzer: libfuzzer_pdf_xml_fuzzer
Job Type: libfuzzer_chrome_ubsan
Platform Id: linux

Crash Type: Undefined-shift
Crash Address: 
Crash State:
  CFDE_XMLSyntaxParser::ParseTextChar
  CFDE_XMLSyntaxParser::DoSyntaxParse
  CXFA_XMLParser::DoParser
  
Regressed: https://cluster-fuzz.appspot.com/revisions?job=libfuzzer_chrome_ubsan&range=386932:386961

Minimized Testcase (0.03 Kb):
Download: https://cluster-fuzz.appspot.com/download/AMIfv94FlKSfj9dMNME-L2DRSGkIsBjVn84WK6Av21EfhRBACNaVKOesxKzboAz1uPqyJmFVmreQDNqi4m3sBgwoSPT8e4aPCUX31sk-z-gFkpw3QZKYC7Wh26I3_k389PwK6rP5ImCLnN7xH5G4FHbdfuucez4p8Q
&#xaDBDFFFDF-10b:l;EI


Filer: mmoroz

See https://dev.chromium.org/Home/chromium-security/bugs/reproducing-clusterfuzz-bugs for more information.
 

Comment 1 by mmoroz@chromium.org, Apr 14 2016

Cc: och...@chromium.org kcc@chromium.org aizatsky@chromium.org
Components: Internals>Plugins>PDF
Cc: tsepez@chromium.org
Blocking: 62400
Owner: hong_zh...@foxitsoftware.com
Status: Assigned (was: Available)
Project Member

Comment 5 by ClusterFuzz, Jul 14 2016

Detailed report: https://cluster-fuzz.appspot.com/testcase?key=5284958671470592

Fuzzer: libfuzzer_pdf_xml_fuzzer
Job Type: libfuzzer_chrome_ubsan
Platform Id: linux

Crash Type: Undefined-shift
Crash Address: 
Crash State:
  CFDE_XMLSyntaxParser::ParseTextChar
  CFDE_XMLSyntaxParser::DoSyntaxParse
  CXFA_XMLParser::DoParser
  
Regressed: https://cluster-fuzz.appspot.com/revisions?job=libfuzzer_chrome_ubsan&range=395640:395746

Minimized Testcase (0.02 Kb):
Download: https://cluster-fuzz.appspot.com/download/AMIfv95N4Vm8PPpmdXghc3vUefZ_6AqUCF_LIUSLVo5-XVs1fnWAq_3j3BHNSUdOzgMfb3iCRiydgpKnswKCbLt_rhKegctIUZBvLH-7-oiBX7e42XJc6Y59qbiTBXNN3LYyxz1fWoD4zIA0KQSDCkrBdqG_KBp-aw?testcase_id=5284958671470592
&#x�DBDFFFDF40b�l;&x2;EI


Filer: brajkumar

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

Comment 6 by ClusterFuzz, Jul 29 2016

Detailed report: https://cluster-fuzz.appspot.com/testcase?key=5135280059449344

Fuzzer: libfuzzer_pdf_xml_fuzzer
Job Type: libfuzzer_chrome_ubsan
Platform Id: linux

Crash Type: Undefined-shift
Crash Address: 
Crash State:
  CFDE_XMLSyntaxParser::ParseTextChar
  CFDE_XMLSyntaxParser::DoSyntaxParse
  CXFA_XMLParser::DoParser
  
Regressed: https://cluster-fuzz.appspot.com/revisions?job=libfuzzer_chrome_ubsan&range=395640:395746

Minimized Testcase (0.08 Kb):
Download: https://cluster-fuzz.appspot.com/download/AMIfv96dCW-EVHUqMDWg9mkajjfpxRRCSjoM574WTqnUeCtAt4et5HI6-xKS8Mow9eR8krhmwCJcAG7qB5ux27IcyuMo1FHcWVSm2U0ouqfcq_zx9yKSTXLwNzXCrPhrbn5tPPyZ03wbhxVYcBgbWkXn7CnBjuE9xA?testcase_id=5135280059449344
&#xaDD0FFFBFD[]��EB]C�ATA="&a;2"IU(ED&#xeFF�04U;�1&#�a]AFT�CDA:=


Filer: rnimmagadda

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

Author: delcypher
Project: chromium-libfuzzer
Changelist: https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer.git/+/c84c7383e7b76dd6e3258ca5e5df4584b57d2297
Time: Thu May 19 22:00:33 2016
Lines 441-447 of file FuzzerLoop.cpp which potentially caused crash are changed in this cl (frame #6, "fuzzer::Fuzzer::RunOne").
Minimum distance from crash line to modified line: 0. (file: FuzzerLoop.cpp, crashed on: 441, modified: 441).
Gentle Ping.

@hong_zhang: Could you please provide some update on this issue.

Thank you.
Owner: dsinclair@chromium.org
Status: Started (was: Assigned)
https://codereview.chromium.org/2223823003/
Project Member

Comment 10 by bugdroid1@chromium.org, Aug 11 2016

The following revision refers to this bug:
  https://pdfium.googlesource.com/pdfium.git/+/22eeccb34f91f9932f7cec295bcaf641ba249e3a

commit 22eeccb34f91f9932f7cec295bcaf641ba249e3a
Author: dsinclair <dsinclair@chromium.org>
Date: Thu Aug 11 14:50:08 2016

Guard against undefined shift.

This Cl fixes the CFDE_XMLSyntaxParser::ParseTextChar() to handle entities
where the value goes negative. Currently this could cause an undefined-shift
as due to the (ch << 4) calls. Instead, detect if the value has gone negative
and return a space character.

BUG= chromium:603489 

Review-Url: https://codereview.chromium.org/2223823003

[modify] https://crrev.com/22eeccb34f91f9932f7cec295bcaf641ba249e3a/xfa/fde/xml/fde_xml_imp.cpp
[modify] https://crrev.com/22eeccb34f91f9932f7cec295bcaf641ba249e3a/xfa/fde/xml/fde_xml_imp_unittest.cpp

Status: Fixed (was: Started)
Should be picked up by the next PDFium roll.
Project Member

Comment 13 by ClusterFuzz, Aug 13 2016

ClusterFuzz has detected this issue as fixed in range 411369:411551.

Detailed report: https://cluster-fuzz.appspot.com/testcase?key=5135280059449344

Fuzzer: libfuzzer_pdf_xml_fuzzer
Job Type: libfuzzer_chrome_ubsan
Platform Id: linux

Crash Type: Undefined-shift
Crash Address: 
Crash State:
  CFDE_XMLSyntaxParser::ParseTextChar
  CFDE_XMLSyntaxParser::DoSyntaxParse
  CXFA_XMLParser::DoParser
  
Regressed: https://cluster-fuzz.appspot.com/revisions?job=libfuzzer_chrome_ubsan&range=395640:395746
Fixed: https://cluster-fuzz.appspot.com/revisions?job=libfuzzer_chrome_ubsan&range=411369:411551

Minimized Testcase (0.08 Kb):
Download: https://cluster-fuzz.appspot.com/download/AMIfv96dCW-EVHUqMDWg9mkajjfpxRRCSjoM574WTqnUeCtAt4et5HI6-xKS8Mow9eR8krhmwCJcAG7qB5ux27IcyuMo1FHcWVSm2U0ouqfcq_zx9yKSTXLwNzXCrPhrbn5tPPyZ03wbhxVYcBgbWkXn7CnBjuE9xA?testcase_id=5135280059449344
&#xaDD0FFFBFD[]��EB]C�ATA="&a;2"IU(ED&#xeFF�04U;&#xc0FbD12F002CDCDADA;1&#�a]AFT�CDA:=


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 14 by ClusterFuzz, Aug 13 2016

ClusterFuzz has detected this issue as fixed in range 411369:411551.

Detailed report: https://cluster-fuzz.appspot.com/testcase?key=5284958671470592

Fuzzer: libfuzzer_pdf_xml_fuzzer
Job Type: libfuzzer_chrome_ubsan
Platform Id: linux

Crash Type: Undefined-shift
Crash Address: 
Crash State:
  CFDE_XMLSyntaxParser::ParseTextChar
  CFDE_XMLSyntaxParser::DoSyntaxParse
  CXFA_XMLParser::DoParser
  
Regressed: https://cluster-fuzz.appspot.com/revisions?job=libfuzzer_chrome_ubsan&range=395640:395746
Fixed: https://cluster-fuzz.appspot.com/revisions?job=libfuzzer_chrome_ubsan&range=411369:411551

Minimized Testcase (0.02 Kb):
Download: https://cluster-fuzz.appspot.com/download/AMIfv95N4Vm8PPpmdXghc3vUefZ_6AqUCF_LIUSLVo5-XVs1fnWAq_3j3BHNSUdOzgMfb3iCRiydgpKnswKCbLt_rhKegctIUZBvLH-7-oiBX7e42XJc6Y59qbiTBXNN3LYyxz1fWoD4zIA0KQSDCkrBdqG_KBp-aw?testcase_id=5284958671470592
&#x�DBDFFFDF40b�l;&x2;EI


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 15 by sheriffbot@chromium.org, Nov 22 2016

Labels: -Restrict-View-EditIssue
Removing EditIssue view restrictions from ClusterFuzz filed bugs. If you believe that this issue should still be restricted, please reapply the label.

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

Sign in to add a comment