Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1302365

Summary: pdflatex crashes with SIGABRT when trying to process corrupted file
Product: Red Hat Enterprise Linux 6 Reporter: Marek Haicman <mhaicman>
Component: popplerAssignee: Marek Kašík <mkasik>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.8CC: tpelka
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: poppler-0.12.4-11.el6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-21 09:59:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1363705    
Attachments:
Description Flags
simple tex file used for reproduction of bug
none
corrupted pdf trigger none

Description Marek Haicman 2016-01-27 15:51:06 UTC
Description of problem:
When pdflatex is fed with corrupted input, it crashes and coredumps (SIGABRT, exitcode 134)


Version-Release number of selected component (if applicable):
texlive-2007-60.el6_7

How reproducible:
reliably

Steps to Reproduce:
1. put reproducer and pdf file in directory
2. pdflatex reproducer.tex
3. observe dump

Actual results:
coredump

Expected results:
graceful failure

Additional info:

Comment 1 Marek Haicman 2016-01-27 15:52:09 UTC
Created attachment 1118825 [details]
simple tex file used for reproduction of bug

Comment 2 Marek Haicman 2016-01-27 15:52:53 UTC
Created attachment 1118826 [details]
corrupted pdf trigger

Comment 3 Than Ngo 2016-07-21 14:38:10 UTC
it looks like a bug in poppler.

(gdb) bt
#0  0x000000349c2325e5 in raise () from /lib64/libc.so.6
#1  0x000000349c233dc5 in abort () from /lib64/libc.so.6
#2  0x000000000047bf98 in dictGetKey () at /usr/include/poppler/Object.h:307
#3  copyFontDict () at pdftoepdf.cc:320
#4  writeRefs () at pdftoepdf.cc:599
#5  write_epdf () at pdftoepdf.cc:958
#6  0x0000000000478026 in writeimage (img=0) at writeimg.c:350
#7  0x000000000044b8c6 in zpdfwriteimage (n=<value optimized out>) at pdftex2.c:303
#8  0x000000000044ec61 in zpdfshipout (p=463, shippingpage=1) at pdftex2.c:2775
#9  0x000000000046118e in maincontrol () at pdftex3.c:5368
#10 0x0000000000411e23 in mainbody () at pdftexini.c:5664
#11 0x0000000000464e0e in main (ac=<value optimized out>, av=<value optimized out>) at pdftexextra.c:349

following patch fixes the crash

diff -Nur poppler-0.12.4/poppler/Parser.cc.than poppler-0.12.4/poppler/Parser.cc
--- poppler-0.12.4/poppler/Parser.cc.than      2016-07-21 16:33:48.191383459 +0200
+++ poppler-0.12.4/poppler/Parser.cc   2016-07-21 16:33:56.982126084 +0200
@@ -180,7 +180,7 @@
   } else {
     error(getPos(), "Bad 'Length' attribute in stream");
     obj.free();
-    return NULL;
+    length = 0;
   }
 
   // check for length in damaged file


reassign to correct component

Comment 4 Marek Kašík 2016-08-04 12:02:21 UTC
Thank you for the patch. I'm setting devel_ack+ for this bug.

Comment 9 errata-xmlrpc 2017-03-21 09:59:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0637.html