CERT-FI has provided us with a sample PDF file that causes various xpdf-based PDF viewers to crash. File causes xpdf to enter an infinite loop, resulting in exhaustion of the stack memory and application crash.
Additional details: xpdf uses XRef::readXRef() (XRef.cc) to read xref object form the PDF file. This method gets xref object position as an argument. This calls XRef::readXRefTable() to read "old-style" xref table. This method parses xref table and reads "trailer" directory. This trailer may define /XRefStm key, which points to additional xref object (used by linearized PDFs). XRef::readXRef() is called against with position specified by /XRefStm, which may be identical to the position of the main xref object, resulting in an infinite loop. This is not considered a security flaw for PDF viewers.
Upstream bug: https://bugs.freedesktop.org/show_bug.cgi?id=28172