Commit ac3c81a8edcb44e2669485630d6718c96a6ad6e9

Authored by Jay Berkenbilt
1 parent 12db0989

Include tests for other infinite loop bugs

fixes #117
fixes #118
fixes #119
fixes #120

Several other infinite loop bugs were fixed by previous changes.
Include their test files in the test suite.
ChangeLog
1 1 2017-07-26 Jay Berkenbilt <ejb@ql.org>
2 2  
  3 + * Fixes to infinite loops below also fix problems reported in
  4 + other issues and cover CVE-2017-11624, CVE-2017-11625,
  5 + CVE-2017-11626, and CVE-2017-11627.
  6 +
3 7 * Don't attempt to interpret syntactic keywords (like R and
4 8 endobj) found while parsing content streams.
5 9  
... ...
qpdf/qtest/qpdf.test
... ... @@ -206,7 +206,7 @@ $td-&gt;runtest(&quot;remove page we don&#39;t have&quot;,
206 206 show_ntests();
207 207 # ----------
208 208 $td->notify("--- Miscellaneous Tests ---");
209   -$n_tests += 82;
  209 +$n_tests += 86;
210 210  
211 211 $td->runtest("qpdf version",
212 212 {$td->COMMAND => "qpdf --version"},
... ... @@ -225,6 +225,10 @@ foreach my $d (
225 225 ["99b", "object 0"],
226 226 ["100","xref reconstruction loop"],
227 227 ["101", "resolve for exception text"],
  228 + ["117", "other infinite loop"],
  229 + ["118", "other infinite loop"],
  230 + ["119", "other infinite loop"],
  231 + ["120", "other infinite loop"],
228 232 )
229 233 {
230 234 my ($n, $description) = @$d;
... ...
qpdf/qtest/qpdf/issue-117.out 0 → 100644
  1 +WARNING: issue-117.pdf: file is damaged
  2 +WARNING: issue-117.pdf: can't find startxref
  3 +WARNING: issue-117.pdf: Attempting to reconstruct cross-reference table
  4 +WARNING: issue-117.pdf (file position 66): loop detected resolving object 2 0
  5 +WARNING: issue-117.pdf (object 2 0, file position 67): attempting to recover stream length
  6 +attempt to make a stream into a direct object
... ...
qpdf/qtest/qpdf/issue-117.pdf 0 → 100644
No preview for this file type
qpdf/qtest/qpdf/issue-118.out 0 → 100644
  1 +WARNING: issue-118.pdf (file position 732): loop detected resolving object 2 0
  2 +issue-118.pdf (xref stream: object 8 0, file position 732): supposed object stream 2 is not a stream
... ...
qpdf/qtest/qpdf/issue-118.pdf 0 → 100644
No preview for this file type
qpdf/qtest/qpdf/issue-119.out 0 → 100644
  1 +WARNING: issue-119.pdf (file position 336): loop detected resolving object 4 0
  2 +issue-119.pdf (file position 298): dictionary key is not not a name token
... ...
qpdf/qtest/qpdf/issue-119.pdf 0 → 100644
No preview for this file type
qpdf/qtest/qpdf/issue-120.out 0 → 100644
  1 +WARNING: issue-120.pdf (file position 85): loop detected resolving object 3 0
  2 +issue-120.pdf (object 6 0, file position 85): supposed object stream 3 is not a stream
... ...
qpdf/qtest/qpdf/issue-120.pdf 0 → 100644
No preview for this file type