Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Include test for other infinite loop bugs
fixes qpdf#117
fixes qpdf#118
fixes qpdf#119
fixes qpdf#120

Several other infinite loop bugs were fixed by previous changes.
Include their test files in the test suite.
  • Loading branch information
jberkenbilt committed Jul 26, 2017
1 parent 163ab9b commit 2f56805
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog
@@ -1,5 +1,9 @@
2017-07-26 Jay Berkenbilt <ejb@ql.org>

* Fixes to infinite loops below also fix problems reported in
other issues and cover CVE-2017-11624, CVE-2017-11625,
CVE-2017-11626, and CVE-2017-11627.

* Don't attempt to interpret syntactic keywords (like R and
endobj) found while parsing content streams.

Expand Down
6 changes: 5 additions & 1 deletion qpdf/qtest/qpdf.test
Expand Up @@ -206,7 +206,7 @@ $td->runtest("remove page we don't have",
show_ntests();
# ----------
$td->notify("--- Miscellaneous Tests ---");
$n_tests += 82;
$n_tests += 86;

$td->runtest("qpdf version",
{$td->COMMAND => "qpdf --version"},
Expand All @@ -225,6 +225,10 @@ foreach my $d (
["99b", "object 0"],
["100","xref reconstruction loop"],
["101", "resolve for exception text"],
["117", "other infinite loop"],
["118", "other infinite loop"],
["119", "other infinite loop"],
["120", "other infinite loop"],
)
{
my ($n, $description) = @$d;
Expand Down
6 changes: 6 additions & 0 deletions qpdf/qtest/qpdf/issue-117.out
@@ -0,0 +1,6 @@
WARNING: issue-117.pdf: file is damaged
WARNING: issue-117.pdf: can't find startxref
WARNING: issue-117.pdf: Attempting to reconstruct cross-reference table
WARNING: issue-117.pdf (file position 66): loop detected resolving object 2 0
WARNING: issue-117.pdf (object 2 0, file position 67): attempting to recover stream length
attempt to make a stream into a direct object
Binary file added qpdf/qtest/qpdf/issue-117.pdf
Binary file not shown.
2 changes: 2 additions & 0 deletions qpdf/qtest/qpdf/issue-118.out
@@ -0,0 +1,2 @@
WARNING: issue-118.pdf (file position 732): loop detected resolving object 2 0
issue-118.pdf (xref stream: object 8 0, file position 732): supposed object stream 2 is not a stream
Binary file added qpdf/qtest/qpdf/issue-118.pdf
Binary file not shown.
2 changes: 2 additions & 0 deletions qpdf/qtest/qpdf/issue-119.out
@@ -0,0 +1,2 @@
WARNING: issue-119.pdf (file position 336): loop detected resolving object 4 0
issue-119.pdf (file position 298): dictionary key is not not a name token
Binary file added qpdf/qtest/qpdf/issue-119.pdf
Binary file not shown.
2 changes: 2 additions & 0 deletions qpdf/qtest/qpdf/issue-120.out
@@ -0,0 +1,2 @@
WARNING: issue-120.pdf (file position 85): loop detected resolving object 3 0
issue-120.pdf (object 6 0, file position 85): supposed object stream 3 is not a stream
Binary file added qpdf/qtest/qpdf/issue-120.pdf
Binary file not shown.

0 comments on commit 2f56805

Please sign in to comment.