Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Parsing, PDModel
    • Labels:
      None

      Description

      As part of a fuzzing run with the AFL-based Kelinci fuzzer found at https://github.com/isstac/kelinci for a larger software that uses PDFBox I found the following StackOverflowError issues:

      Exception in thread "main" java.lang.StackOverflowError
          at java.util.HashMap.hash(HashMap.java:338)
          at java.util.LinkedHashMap.get(LinkedHashMap.java:440)
          at org.apache.pdfbox.cos.COSDictionary.getDictionaryObject(COSDictionary.java:188)
          at org.apache.pdfbox.pdfparser.COSParser.checkPagesDictionary(COSParser.java:2207)
          at org.apache.pdfbox.pdfparser.COSParser.checkPagesDictionary(COSParser.java:2230)
          at org.apache.pdfbox.pdfparser.COSParser.checkPagesDictionary(COSParser.java:2230)
          at org.apache.pdfbox.pdfparser.COSParser.checkPagesDictionary(COSParser.java:2230)
          at org.apache.pdfbox.pdfparser.COSParser.checkPagesDictionary(COSParser.java:2230)
          at org.apache.pdfbox.pdfparser.COSParser.checkPagesDictionary(COSParser.java:2230)
          at org.apache.pdfbox.pdfparser.COSParser.checkPagesDictionary(COSParser.java:2230)
          at org.apache.pdfbox.pdfparser.COSParser.checkPagesDictionary(COSParser.java:2230)
          at org.apache.pdfbox.pdfparser.COSParser.checkPagesDictionary(COSParser.java:2230)
          at org.apache.pdfbox.pdfparser.COSParser.checkPagesDictionary(COSParser.java:2230)
          at org.apache.pdfbox.pdfparser.COSParser.checkPagesDictionary(COSParser.java:2230)
          at org.apache.pdfbox.pdfparser.COSParser.checkPagesDictionary(COSParser.java:2230)
          at org.apache.pdfbox.pdfparser.COSParser.checkPagesDictionary(COSParser.java:2230)
          at org.apache.pdfbox.pdfparser.COSParser.checkPagesDictionary(COSParser.java:2230)
          [...]
          at org.apache.pdfbox.pdfparser.COSParser.checkPagesDictionary(COSParser.java:2230)

      Additionally, a second StackOverflowError was found:

      Exception in thread "main" java.lang.StackOverflowError
          at java.util.HashMap.hash(HashMap.java:338)
          at java.util.LinkedHashMap.get(LinkedHashMap.java:440)
          at org.apache.pdfbox.cos.COSDictionary.getDictionaryObject(COSDictionary.java:188)
          at org.apache.pdfbox.pdmodel.PDPageTree.getInheritableAttribute(PDPageTree.java:102)
          at org.apache.pdfbox.pdmodel.PDPageTree.getInheritableAttribute(PDPageTree.java:111)
          at org.apache.pdfbox.pdmodel.PDPageTree.getInheritableAttribute(PDPageTree.java:111)
          at org.apache.pdfbox.pdmodel.PDPageTree.getInheritableAttribute(PDPageTree.java:111)
          at org.apache.pdfbox.pdmodel.PDPageTree.getInheritableAttribute(PDPageTree.java:111)
          at org.apache.pdfbox.pdmodel.PDPageTree.getInheritableAttribute(PDPageTree.java:111)
          at org.apache.pdfbox.pdmodel.PDPageTree.getInheritableAttribute(PDPageTree.java:111)
          at org.apache.pdfbox.pdmodel.PDPageTree.getInheritableAttribute(PDPageTree.java:111)
          at org.apache.pdfbox.pdmodel.PDPageTree.getInheritableAttribute(PDPageTree.java:111)
          at org.apache.pdfbox.pdmodel.PDPageTree.getInheritableAttribute(PDPageTree.java:111)
          at org.apache.pdfbox.pdmodel.PDPageTree.getInheritableAttribute(PDPageTree.java:111)
          at org.apache.pdfbox.pdmodel.PDPageTree.getInheritableAttribute(PDPageTree.java:111)
          at org.apache.pdfbox.pdmodel.PDPageTree.getInheritableAttribute(PDPageTree.java:111)
          at org.apache.pdfbox.pdmodel.PDPageTree.getInheritableAttribute(PDPageTree.java:111)
          at org.apache.pdfbox.pdmodel.PDPageTree.getInheritableAttribute(PDPageTree.java:111)
      
          [...]
          at org.apache.pdfbox.pdmodel.PDPageTree.getInheritableAttribute(PDPageTree.java:111)

      The issues can be reproduced with the attached files.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              floyd floyd
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: