broken ghostscript with 9.18~dfsg~0-0ubuntu2.3 to 9.18~dfsg~0-0ubuntu2.4 update

Bug #1687614 reported by Johannes Schmitz
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
GS-GPL
Unknown
Unknown
ghostscript (Ubuntu)
Fix Released
Critical
Steve Beattie

Bug Description

After the last ghostscript udpate I have problems with the textext inkscape plugin that uses pstoedit that uses ghostscript.

The command looks like this:

pstoedit -f plot-svg tmp.pdf tmp.svg -dt -ssp -psarg -r9600x9600 -pta

The error (short version):

Error: /invalidaccess in --run--
Current allocation mode is global
Last OS error: No such file or directory
Current file position is 87896
GPL Ghostscript 9.18: Unrecoverable error, exit code 1
PostScript/PDF Interpreter finished. Return status 256 executed command : /usr/bin/gs -q -dDELAYBIND -dWRITESYSTEMDICT -dNODISPLAY -dNOEPS -r9600x9600 "/tmp/psinsRrD8m"
The interpreter seems to have failed, cannot proceed !

See the attached log for the full text.

I tried to downgrade to circumvent the issue but unsuccessfully.

CVE References

Revision history for this message
Johannes Schmitz (johschmitz) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ghostscript (Ubuntu):
status: New → Confirmed
Revision history for this message
Eric Gourgoulhon (egourgoulhon) wrote :

The bug has also been reported in
https://askubuntu.com/questions/910341/inkscape-error-with-textext
Downgrading to ghostscript 9.18~dfsg~0-0ubuntu2 circumvented it for me (Ubuntu 16.04).

Revision history for this message
Johannes Schmitz (johschmitz) wrote : Re: [Bug 1687614] Re: broken ghostscript with 9.18~dfsg~0-0ubuntu2.3 to 9.18~dfsg~0-0ubuntu2.4 update

Can you please tell me how to downgrade?

Am 02.05.2017 21:55 schrieb "Eric Gourgoulhon" <email address hidden>:

> The bug has also been reported in
> https://askubuntu.com/questions/910341/inkscape-error-with-textext
> Downgrading to ghostscript 9.18~dfsg~0-0ubuntu2 circumvented it for me
> (Ubuntu 16.04).
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1687614
>
> Title:
> broken ghostscript with 9.18~dfsg~0-0ubuntu2.3 to
> 9.18~dfsg~0-0ubuntu2.4 update
>
> Status in ghostscript package in Ubuntu:
> Confirmed
>
> Bug description:
> After the last ghostscript udpate I have problems with the textext
> inkscape plugin that uses pstoedit that uses ghostscript.
>
> The command looks like this:
>
> pstoedit -f plot-svg tmp.pdf tmp.svg -dt -ssp -psarg -r9600x9600 -pta
>
> The error (short version):
>
> Error: /invalidaccess in --run--
> Current allocation mode is global
> Last OS error: No such file or directory
> Current file position is 87896
> GPL Ghostscript 9.18: Unrecoverable error, exit code 1
> PostScript/PDF Interpreter finished. Return status 256 executed command
> : /usr/bin/gs -q -dDELAYBIND -dWRITESYSTEMDICT -dNODISPLAY -dNOEPS
> -r9600x9600 "/tmp/psinsRrD8m"
> The interpreter seems to have failed, cannot proceed !
>
> See the attached log for the full text.
>
> I tried to downgrade to circumvent the issue but unsuccessfully.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/ghostscript/+
> bug/1687614/+subscriptions
>

Revision history for this message
Pere (pere-pala) wrote :

I have tried

sudo apt install ghostscript=9.18~dfsg~0-0ubuntu2

but I get the following error

The following packages have unmet dependencies:
 ghostscript : Depends: libgs9 (= 9.18~dfsg~0-0ubuntu2) but 9.18~dfsg~0-0ubuntu2.4 is to be installed
E: Unable to correct problems, you have held broken packages.

Any suggestion?

Revision history for this message
Eric Gourgoulhon (egourgoulhon) wrote :

You have to follow these steps:
1/ downgrade libgs9 to 9.18~dfsg~0-0ubuntu2
2/ downgrade ghostscript to 9.18~dfsg~0-0ubuntu2
3/ reinstall pstoedit

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

the upstream bug got fixed now, it is a very small and simple patch. So I recommend to the uploader of the security update to apply this patch and issue an updated security update.

Changed in ghostscript (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Johannes Schmitz (johschmitz) wrote :

How, long till the patch? This is effectively stopping people from work, why not to deploy the patch ASAP?

Steve Beattie (sbeattie)
Changed in ghostscript (Ubuntu):
importance: Undecided → Critical
assignee: nobody → Steve Beattie (sbeattie)
Revision history for this message
Steve Beattie (sbeattie) wrote :

Hi, sorry for the inconvenience. I've prepared fixed packages in the ubuntu-security-proposed ppa https://launchpad.net/~ubuntu-security-proposed/+archive/ubuntu/ppa/ for all supported releases, though I need to test them further before publishing. It would be great if people could confirm that these packages address the issue they're seeing.

Thanks!

Revision history for this message
Johannes Schmitz (johschmitz) wrote :

I installed the package and can confirm that it solves the issue.

From my side feel free to go ahead and publish it.

Thank you!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ghostscript - 9.19~dfsg+1-0ubuntu6.6

---------------
ghostscript (9.19~dfsg+1-0ubuntu6.6) yakkety-security; urgency=medium

  * REGRESSION UPDATE: Fix for CVE-2017-8291 broke pstoedit when using
    DELAYBIND feature (LP: #1687614).
    - debian/patches/CVE-2017-8291-regression.patch: return false rather
      than raise error when .eqproc is called with parameters that are
      not both procedures; correct stack underflow detection.

 -- Steve Beattie <email address hidden> Mon, 15 May 2017 14:41:00 -0700

Changed in ghostscript (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ghostscript - 9.19~dfsg+1-0ubuntu7.4

---------------
ghostscript (9.19~dfsg+1-0ubuntu7.4) zesty-security; urgency=medium

  * REGRESSION UPDATE: Fix for CVE-2017-8291 broke pstoedit when using
    DELAYBIND feature (LP: #1687614).
    - debian/patches/CVE-2017-8291-regression.patch: return false rather
      than raise error when .eqproc is called with parameters that are
      not both procedures; correct stack underflow detection.

 -- Steve Beattie <email address hidden> Mon, 15 May 2017 11:46:44 -0700

Changed in ghostscript (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
geez (geez) wrote :

Sorry to bump this old bug, but I'd like to point out this bug is *again* present in Ubuntu 18.04, both using InkScape's Extension -> Render -> LaTeX functionality as well as using textext:
https://github.com/textext/textext

I have also tried LaTeXText (https://github.com/seebk/LaTeXText) which uses pdf2svg instead of pstoedit, but I couldn't get that to work at all.

In 18.04 downgrading ghostscript is not an option, as the only available version is 9.22~dfsg+1-0ubuntu1.

I'm rather surprised this bug still shows up, because it was fixed upstream quite a while back:
https://bugs.ghostscript.com/show_bug.cgi?id=697846
http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=57f20719

As such, I'm seemingly left with no options.. Any ideas?

Revision history for this message
geez (geez) wrote :

 *** WARNING - the DELAYBIND command has been deprecated, and will be

               removed in the next version. For now you can restore

               the behaviour by using -dREALLYDEALYBIND but if you

               require continued use of this command you should contact

               the Ghostscript developers. Commercial customers of

               Artifex should email their support contact, free users

               are encouraged to talk to us on the #ghostscript IRC

               channel on irc.freenode.net.

Unrecoverable error: undefined in DELAYBIND

PostScript/PDF Interpreter finished. Return status 65280 executed command : /usr/bin/gs -q -dDELAYBIND -dWRITESYSTEMDICT -dNODISPLAY -dNOEPS "/tmp/psinvLYkTf"

The interpreter seems to have failed, cannot proceed !

Traceback (most recent call last):
  File "eqtexsvg.py", line 160, in <module>
    e.affect()
  File "/usr/share/inkscape/extensions/inkex.py", line 283, in affect
    self.effect()
  File "eqtexsvg.py", line 154, in effect
    svg_open(self, svg_file)
  File "eqtexsvg.py", line 81, in svg_open
    doc = inkex.etree.parse(filename)
  File "src/lxml/etree.pyx", line 3425, in lxml.etree.parse
  File "src/lxml/parser.pxi", line 1839, in lxml.etree._parseDocument
  File "src/lxml/parser.pxi", line 1865, in lxml.etree._parseDocumentFromURL
  File "src/lxml/parser.pxi", line 1769, in lxml.etree._parseDocFromFile
  File "src/lxml/parser.pxi", line 1162, in lxml.etree._BaseParser._parseDocFromFile
  File "src/lxml/parser.pxi", line 600, in lxml.etree._ParserContext._handleParseResultDoc
  File "src/lxml/parser.pxi", line 710, in lxml.etree._handleParseResult
  File "src/lxml/parser.pxi", line 639, in lxml.etree._raiseParseError
  File "/tmp/inkscape-CbFtt1/eq.svg", line 1
lxml.etree.XMLSyntaxError: Document is empty, line 1, column 1

Revision history for this message
Steve Beattie (sbeattie) wrote :

Hi geez,

Your issue is different, the commit to fix the regression was included in the upstream ghostscript 9.22 release. As the traceback shows, ghostscript has deprecated the DELAYBIND command, and inkscape needs to adjust to take that into account; the bug report for that is
https://bugs.launchpad.net/ubuntu/+source/inkscape/+bug/1759483

Thanks.

Revision history for this message
geez (geez) wrote :

Hi Steve, thanks for your reply. I don't quite the difference at the moment, as the output appears to be the same, and ghostscript was previously the culprit, but I believe you :) I'll leave this issue alone then.

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

Other bug subscribers

Bug attachments

Remote bug watches

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