ghostscript hangs reading certain pdfs

Bug #1342312 reported by Mike O'Connell
276
This bug affects 4 people
Affects Status Importance Assigned to Milestone
GS-GPL
Unknown
Unknown
ghostscript (Ubuntu)
Fix Released
Low
Unassigned
Trusty
Fix Released
Medium
Unassigned
Utopic
Fix Released
Undecided
Unassigned

Bug Description

= SRU justification =

On a few pdfs, gs hangs and uses 100% cpu forever.

This could be used as a denial of service through imagemagick which uses ghostscript as a delegate, and commonly used in php etc... which is how I found the issue.

The packages from utopic (9.14~dfsg-0ubuntu3) processes these pdfs correctly.

= SRU test case (PDF attached to this ticket) =

gs WaddellAndReedJCL0814ThirdHProvSE.pdf

= SRU Regression potential =

tbd

= SRU Other info =

This has been fixed upstream in commit abd38464f9b which has already landed in utopic and later. The SRU is then to backprt this patch to trusty.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: ghostscript 9.10~dfsg-0ubuntu10.2
ProcVersionSignature: Ubuntu 3.13.0-30.55-generic 3.13.11.2
Uname: Linux 3.13.0-30-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
CupsErrorLog:

CurrentDesktop: Unity
Date: Tue Jul 15 14:34:26 2014
InstallationDate: Installed on 2014-04-20 (86 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
Lpstat:
 device for Bizhub7222: socket://10.0.0.201:9100
 device for HP-Photosmart-6520-series: dnssd://Photosmart%206520%20series%20%5B1B47AD%5D._ipp._tcp.local/
MachineType: ASUSTeK COMPUTER INC. UX32VD
Papersize: letter
PpdFiles:
 HP-Photosmart-6520-series: HP Photosmart 6520 Series, hpcups 3.14.3
 Bizhub7222: HP LaserJet 5L - CUPS+Gutenprint v5.2.10-pre2
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.13.0-30-generic root=UUID=2f256b0b-ee87-463a-af04-e892e0be9192 ro quiet splash pcie_aspm=force drm.vblankoffdelay=1 i915.semaphores=1
SourcePackage: ghostscript
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 11/16/2012
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: UX32VD.213
dmi.board.asset.tag: ATN12345678901234567
dmi.board.name: UX32VD
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: 1.0
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: ASUSTeK COMPUTER INC.
dmi.chassis.version: 1.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrUX32VD.213:bd11/16/2012:svnASUSTeKCOMPUTERINC.:pnUX32VD:pvr1.0:rvnASUSTeKCOMPUTERINC.:rnUX32VD:rvr1.0:cvnASUSTeKCOMPUTERINC.:ct10:cvr1.0:
dmi.product.name: UX32VD
dmi.product.version: 1.0
dmi.sys.vendor: ASUSTeK COMPUTER INC.

Revision history for this message
Mike O'Connell (wundbread) wrote :
Revision history for this message
Mike O'Connell (wundbread) wrote :
Revision history for this message
Mike O'Connell (wundbread) wrote :

Probably a duplicate of Bug #968785 since adding -dNOTRANSPARENCY allows the pdf to render, still this results in incorrect output so not necessarily a good work around

Changed in ghostscript (Ubuntu):
importance: Undecided → Low
information type: Private Security → Public Security
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Could you please file a bug upstream for this issue, and then link the upstream bug to this one?

You can file the bug here:
http://bugs.ghostscript.com/

Thanks.

Changed in ghostscript (Ubuntu):
status: New → Confirmed
Revision history for this message
Tom Kaltenbrunner (comexos) wrote :

I have the same problem on Ubuntu 14.04 LTS, take a look at this bug report: http://bugs.ghostscript.com/show_bug.cgi?id=694811
The infinite loop occurs on line 2256 in base/gdevp14.c, see the attached patch.
It's already fixed on 14.10.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "overprint-infinite-loop.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Changed in ghostscript (Ubuntu):
status: Confirmed → Fix Released
Changed in ghostscript (Ubuntu Trusty):
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Rolf Leggewie (r0lf) wrote :

Mike, not sure this is indeed a dupe of bug 968785 which is marked as fixed in saucy

Revision history for this message
Rolf Leggewie (r0lf) wrote :

Here is the backported fix for trusty. BIR tested.

Rolf Leggewie (r0lf)
description: updated
Changed in ghostscript (Ubuntu Trusty):
importance: Low → Medium
description: updated
Changed in ghostscript (Ubuntu Utopic):
status: New → Fix Released
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

ACK on the debdiff in comment #8. I've uploaded it for processing by the SRU team with a few minor modifications, such as adding DEP-3 tags.

Thanks!

Changed in ghostscript (Ubuntu Trusty):
status: Confirmed → In Progress
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Mike, or anyone else affected,

Accepted ghostscript into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/ghostscript/9.10~dfsg-0ubuntu10.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in ghostscript (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
meteor (604733992-qq) wrote :

@Chris J Arges (arges) This works for me. Thanks.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Thanks for testing. I marked it as "Verification Done" now so that it will make it into the official updates for Trusty in the next days.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ghostscript - 9.10~dfsg-0ubuntu10.3

---------------
ghostscript (9.10~dfsg-0ubuntu10.3) trusty; urgency=low

  * debian/patches/lp1342312-infinite-loop.patch: backport upstream patch
    to fix an infinite loop that can hang the gs program in certain
    conditions. (LP: #1342312)
 -- Rolf Leggewie <email address hidden> Wed, 18 Mar 2015 15:40:28 +0800

Changed in ghostscript (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for ghostscript has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.