Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.13
-
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.