{"id":3683,"date":"2017-09-06T01:52:00","date_gmt":"2017-09-05T23:52:00","guid":{"rendered":"http:\/\/borncity.com\/win\/?p=3683"},"modified":"2024-10-05T23:26:02","modified_gmt":"2024-10-05T21:26:02","slug":"6-year-old-loop-bug-in-many-pdf-viewers","status":"publish","type":"post","link":"https:\/\/borncity.com\/win\/2017\/09\/06\/6-year-old-loop-bug-in-many-pdf-viewers\/","title":{"rendered":"6 year old loop bug in many PDF viewers"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" style=\"float: left; margin: 0px 10px 0px 0px; display: inline\" src=\"http:\/\/www.borncity.com\/blog\/wp-content\/uploads\/2015\/01\/Schutz.jpg\" width=\"40\" align=\"left\" height=\"47\">[<a href=\"http:\/\/www.borncity.com\/blog\/2017\/09\/05\/6-jahre-alter-loop-bug-in-vielen-pdf-viewern\/\" target=\"_blank\" rel=\"noopener\">German<\/a>]In 2011 an obscure bug was found in a PDF parsing library. Six years later, this bug is still contained in the top PDF programs currently in use. <\/p>\n<p><!--more--><\/p>\n<p>This has been reported by Hanno B\u00f6ck in his blog article <a href=\"https:\/\/web.archive.org\/web\/20210812163426\/https:\/\/blog.fuzzing-project.org\/59-Six-year-old-PDF-loop-bug-affects-most-major-implementations.html\" target=\"_blank\" rel=\"noopener\">Six year old PDF loop bug affects most major implementations<\/a>. B\u00f6ck had recently investigated the library qpdf contained in many PDF packages with afl and libfuzzer. Opening a special prepared PDF file causes a high CPU load and a memory error occurs after several minutes. The PDF parser seems to be in an endless loop. <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"https:\/\/ssl-vg03.met.vgwort.de\/na\/cf734af35a6541dcaf284ed3a7d3091a\" width=\"1\" height=\"1\">B\u00f6ck refers to a <a href=\"https:\/\/media.ccc.de\/v\/cccamp11-4426-certified_programming_with_dependent_types-en\" target=\"_blank\" rel=\"noopener\">presentation by CCCfrom 2011<\/a>, where such a bug has already been reported. The problem was fixed at the time, but it seems that vendors of PDF readers are not aware of this issue. The qpdf problem in the above analysis is the same as reported <a href=\"https:\/\/github.com\/qpdf\/qpdf\/issues\/149\" target=\"_blank\" rel=\"noopener\">here<\/a> (a test file can be found <a href=\"https:\/\/github.com\/andreas23\/pdfparser\/blob\/master\/tests\/loop_edited.pdf\" target=\"_blank\" rel=\"noopener\">here<\/a>). <\/p>\n<p>B\u00f6ck writes that the Github Javascript PDF viewer is also affected. The PDF viewer in Mozilla Firefox? <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1393476\" target=\"_blank\" rel=\"noopener\">Affected<\/a>, because they use pdf. js &#8211; like Github. Google Chrome \/ Chromium, which use the PDFium library, is also affected.&nbsp; Ghostscript is as affected as other <a href=\"https:\/\/bugs.ghostscript.com\/show_bug.cgi?id=69840\" target=\"_blank\" rel=\"noopener\">PDF parsers<\/a>. Only the Adobe Reader and Apple's internet OS X PDF Viewer are not affected. B\u00f6ck schreibt, dass der Github Javascript PDF-Viewer auch betroffen sei.&nbsp; (<a href=\"https:\/\/www.bleepingcomputer.com\/news\/software\/six-year-old-loop-bug-re-discovered-to-affect-almost-all-major-pdf-viewers\/\" target=\"_blank\" rel=\"noopener\">via<\/a>)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[German]In 2011 an obscure bug was found in a PDF parsing library. Six years later, this bug is still contained in the top PDF programs currently in use.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[580,22],"tags":[1021,69],"class_list":["post-3683","post","type-post","status-publish","format-standard","hentry","category-security","category-update","tag-pdf-reader","tag-security"],"_links":{"self":[{"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/posts\/3683","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/comments?post=3683"}],"version-history":[{"count":1,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/posts\/3683\/revisions"}],"predecessor-version":[{"id":36111,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/posts\/3683\/revisions\/36111"}],"wp:attachment":[{"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/media?parent=3683"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/categories?post=3683"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/borncity.com\/win\/wp-json\/wp\/v2\/tags?post=3683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}