<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Corrupted linearization hint table causes massive memory usage and several minute delay"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=94941">94941</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Corrupted linearization hint table causes massive memory usage and several minute delay
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>poppler
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>general
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>poppler-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jmmorlan@sonic.net
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I recently encountered some PDF files that cause all poppler utilities
(pdfinfo, pdftotext, evince) to allocate a large amount of memory (usually 3GB)
and hang for several minutes. Acrobat Reader does not exhibit either problem.

The cause is corrupted linearization hint tables - the program that wrote the
.pdfs did not properly align the start of the shared objects hint table on a
byte boundary. So its header looks like:

firstSharedObjectNumber    00 00 00 00
firstSharedObjectOffset    00 00 00 00
nSharedGroupsFirst    00 00 00 01
nSharedGroups        10 00 00 01
nBitsNumObjects        10 00
groupLengthLeast    00 00 00 02
nBitsDiffGroupLength    80 01

Hints::readSharedObjectsTable allocates several giant arrays, and then spends
ages trying to populate them (without checking that it's reached the end of the
stream).

Since nBits* can't be more than 32, this hint table should just be rejected as
invalid immediately.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>