[Bug 1806517] Re: Ghostscript segmentation fault onb PDF using -dFirstPage and -dLastPage

2018-12-04 Thread Bug Watch Updater
Launchpad has imported 7 comments from the remote bug at
http://bugs.ghostscript.com/show_bug.cgi?id=700315.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.


On 2018-12-03T16:49:41+00:00 Bheeshmar wrote:

We use ImageMagick to extract a the first page of a PDF as a thumbnail
and recently started getting exceptions with some PDFs. Traced it to the
call that ImageMagick was making:

gs  -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=5
-dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBits=4
-dGraphicsAlphaBits=4 '-r72x72' -dLastPage=1 -sOutputFile=1.png -f
Bloomfire-Security_and_Redundancy.pdf

When this is run with GS version 9.25, the thumbnail is extracted with no error.
When this is run with GS version 9.26, I see "Segmentation fault: 11"

I've attached a file that causes there error. Observed on both OSX and
Ubuntu Linux.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/ghostscript/+bug/1806517/comments/1


On 2018-12-03T16:50:51+00:00 Bheeshmar wrote:

Created attachment 16470
Output of run with -dDEBUG

Reply at:
https://bugs.launchpad.net/ubuntu/+source/ghostscript/+bug/1806517/comments/2


On 2018-12-03T16:51:24+00:00 Bheeshmar wrote:

Created attachment 16471
PDF example that causes the segfault

Reply at:
https://bugs.launchpad.net/ubuntu/+source/ghostscript/+bug/1806517/comments/3


On 2018-12-04T00:47:14+00:00 Ken Sharp wrote:


*** This bug has been marked as a duplicate of bug 699815 ***

Reply at:
https://bugs.launchpad.net/ubuntu/+source/ghostscript/+bug/1806517/comments/4


On 2018-12-04T21:05:41+00:00 Ken Sharp wrote:

*** Bug 700314 has been marked as a duplicate of this bug. ***

Reply at:
https://bugs.launchpad.net/ubuntu/+source/ghostscript/+bug/1806517/comments/13


On 2018-12-04T21:10:10+00:00 Ken Sharp wrote:

*** Bug 700313 has been marked as a duplicate of this bug. ***

Reply at:
https://bugs.launchpad.net/ubuntu/+source/ghostscript/+bug/1806517/comments/14


On 2018-12-04T21:32:36+00:00 Ken Sharp wrote:

Fixed in commit fae21f1668d2b44b18b84cf0923a1d5f3008a696

Reply at:
https://bugs.launchpad.net/ubuntu/+source/ghostscript/+bug/1806517/comments/15


** Changed in: gs-gpl
   Status: Unknown => Fix Released

** Changed in: gs-gpl
   Importance: Unknown => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1806517

Title:
  Ghostscript segmentation fault onb PDF using -dFirstPage and
  -dLastPage

To manage notifications about this bug go to:
https://bugs.launchpad.net/gs-gpl/+bug/1806517/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1806517] Re: Ghostscript segmentation fault onb PDF using -dFirstPage and -dLastPage

2018-12-04 Thread Laurent Dinclaux
I have changed the upstream related bug which has been resolved (patch
available)

** No longer affects: gs-gpl

** Bug watch added: Ghostscript (AFPL) Bugzilla #700315
   http://bugs.ghostscript.com/show_bug.cgi?id=700315

** Also affects: gs-gpl via
   http://bugs.ghostscript.com/show_bug.cgi?id=700315
   Importance: Unknown
   Status: Unknown

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1806517

Title:
  Ghostscript segmentation fault onb PDF using -dFirstPage and
  -dLastPage

To manage notifications about this bug go to:
https://bugs.launchpad.net/gs-gpl/+bug/1806517/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1806517] Re: Ghostscript segmentation fault onb PDF using -dFirstPage and -dLastPage

2018-12-04 Thread Bug Watch Updater
** Changed in: gs-gpl
   Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1806517

Title:
  Ghostscript segmentation fault onb PDF using -dFirstPage and
  -dLastPage

To manage notifications about this bug go to:
https://bugs.launchpad.net/gs-gpl/+bug/1806517/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1806517] Re: Ghostscript segmentation fault onb PDF using -dFirstPage and -dLastPage

2018-12-04 Thread Clemens Fuchslocher
I can confirm this problem on Ubuntu 16.04 and ghostscript
9.26~dfsg+0-0ubuntu0.16.04.1:

$ gs --version
9.26
$ convert "confidential.pdf[0]" confidential.png
convert: FailedToExecuteCommand `"gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE 
-dNOPROMPT -dMaxBitmap=5 -dAlignToPixels=0 -dGridFitTT=2 
"-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" 
-dFirstPage=1 -dLastPage=1 "-sOutputFile=/tmp/magick-12412a591aAW0c1rp%d" 
"-f/tmp/magick-12412pbD9WU9tgyvz" "-f/tmp/magick-12412_OoIhBmXubzJ"' (-1) @ 
error/delegate.c/ExternalDelegateCommand/461.
convert: no images defined `confidential.png' @ 
error/convert.c/ConvertImageCommand/3210.

The problem doesn't happen with ghostscript
9.25~dfsg+1-0ubuntu0.16.04.3:

$ dpkg --install libgs9_9.25~dfsg+1-0ubuntu0.16.04.3_amd64.deb 
libgs9-common_9.25~dfsg+1-0ubuntu0.16.04.3_all.deb 
ghostscript_9.25~dfsg+1-0ubuntu0.16.04.3_amd64.deb 
ghostscript-x_9.25~dfsg+1-0ubuntu0.16.04.3_amd64.deb
$ gs --version
9.25
$ convert "confidential.pdf[0]" confidential.png
$ identify confidential.png
confidential.png PNG 595x842 595x842+0+0 8-bit sRGB 22.5KB 0.000u 0:00.000

Not every PDF is affected by this problem.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1806517

Title:
  Ghostscript segmentation fault onb PDF using -dFirstPage and
  -dLastPage

To manage notifications about this bug go to:
https://bugs.launchpad.net/gs-gpl/+bug/1806517/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1806517] Re: Ghostscript segmentation fault onb PDF using -dFirstPage and -dLastPage

2018-12-04 Thread Launchpad Bug Tracker
Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: ghostscript (Ubuntu)
   Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1806517

Title:
  Ghostscript segmentation fault onb PDF using -dFirstPage and
  -dLastPage

To manage notifications about this bug go to:
https://bugs.launchpad.net/gs-gpl/+bug/1806517/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1806517] Re: Ghostscript segmentation fault onb PDF using -dFirstPage and -dLastPage

2018-12-04 Thread Till Kamppeter
Subscribing Ubuntu Security Team as this is a regression caused by the
recent security updates.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1806517

Title:
  Ghostscript segmentation fault onb PDF using -dFirstPage and
  -dLastPage

To manage notifications about this bug go to:
https://bugs.launchpad.net/gs-gpl/+bug/1806517/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1806517] Re: Ghostscript segmentation fault onb PDF using -dFirstPage and -dLastPage

2018-12-03 Thread Laurent Dinclaux
NOTE: This won't survive an apt upgrade and may raise security issues
(gs has been update to 9.26 because of security issues, see
http://changelogs.ubuntu.com/changelogs/pool/main/g/ghostscript/ghostscript_9.26~dfsg+0-0ubuntu0.18.04.1/changelog)

As a temporary workaround one can downgrade.

For xenial (ubuntu 16.04):

# apt install libgs9-common=9.18~dfsg~0-0ubuntu2
libgs9=9.18~dfsg~0-0ubuntu2 ghostscript=9.18~dfsg~0-0ubuntu2


For bionic (ubuntu 18.04):

# apt install libgs9-common=9.22~dfsg+1-0ubuntu1
libgs9=9.22~dfsg+1-0ubuntu1 ghostscript=9.22~dfsg+1-0ubuntu1


For cosmic (ubuntu 18.10):

# apt install libgs9-common=9.25~dfsg+1-0ubuntu1
libgs9=9.25~dfsg+1-0ubuntu1 ghostscript=9.25~dfsg+1-0ubuntu1

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1806517

Title:
  Ghostscript segmentation fault onb PDF using -dFirstPage and
  -dLastPage

To manage notifications about this bug go to:
https://bugs.launchpad.net/gs-gpl/+bug/1806517/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1806517] Re: Ghostscript segmentation fault onb PDF using -dFirstPage and -dLastPage

2018-12-03 Thread Bug Watch Updater
Launchpad has imported 1 comments from the remote bug at
http://bugs.ghostscript.com/show_bug.cgi?id=700314.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.


On 2018-12-03T16:48:43+00:00 Bheeshmar wrote:

Created attachment 16469
PDF which causes segfault in 9.26

We use ImageMagick to extract a the first page of a PDF as a thumbnail
and recently started getting exceptions with some PDFs. Traced it to the
call that ImageMagick was making:

gs  -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=5
-dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBits=4
-dGraphicsAlphaBits=4 '-r72x72' -dLastPage=1 -sOutputFile=1.png -f
Bloomfire-Security_and_Redundancy.pdf

When this is run with GS version 9.25, the thumbnail is extracted with no error.
When this is run with GS version 9.26, I see "Segmentation fault: 11"

I've attached a file that causes there error. Observed on both OSX and
Ubuntu Linux.

Here is the output from running the same command with -dDEBUG:

START 0 1455888 160729 1310728 29572 true 587 3 <0>
END PROCS 0 1504736 208805 1330928 35516 true 709 3 <0>
gs_std_e.ps 0 1524936 219150 1330928 38012 true 717 3 <0>
gs_il1_e.ps 0 1524936 225026 1330928 38012 true 718 3 <0>
END FONTDIR/ENCS 0 1524936 225302 1330928 38012 true 720 3 <0>
END DEVS 0 1601672 291074 1330928 38012 true 724 3 <0>
END STATD 0 1601672 305936 1330928 40908 true 729 3 <0>
END GS_FONTS 0 1662272 362977 1330928 40908 true 777 3 <0>
END BASIC COLOR 0 1662272 370569 1330928 40908 true 797 3 <0>
END IMAGE 0 1682472 383205 1330928 40908 true 802 3 <0>
gs_btokn.ps 0 1682472 390509 1330928 40908 true 806 3 <1>
gs_dps1.ps 0 1702672 397919 1330928 40908 true 808 3 <1>
gs_dps2.ps 0 1731320 419098 1330928 40908 true 809 3 <1>
gs_agl.ps 0 2465232 1119600 1330928 40908 true 811 3 <1>
gs_type1.ps 0 2465232 1126479 1330928 41186 true 819 3 <1>
gs_lev2.ps 0 2554480 1192135 1436088 146788 true 825 3 <1>
BEGIN RESOURCES 0 2554480 1194793 1436088 146788 true 825 4 <2>
END CATEGORY 0 2554480 1198912 1436088 147084 true 826 5 <2>
END GENERIC 0 2564516 1219750 1436088 147084 true 828 4 <2>
END FIXED 0 2584716 1237312 1436088 147084 true 828 4 <2>
END MISC 0 2604916 1252528 1436088 147084 true 828 4 <2>
END ENCODING 0 2734596 1382958 1436088 150722 true 828 4 <2>
gs_resmp.ps 10 2774996 1412399 1436088 152568 true 832 3 <2>
gs_res.ps 10 2774996 1410261 1436088 152568 true 832 3 <1>
gs_typ42.ps 10 2774996 1411595 1436088 152568 true 835 3 <1>
gs_cidfn.ps 10 2815396 1446804 1436088 152568 true 843 3 <1>
gs_cidcm.ps 10 2835596 1472845 1436088 152568 true 843 3 <1>
gs_fntem.ps 10 288 1520727 1436088 152568 true 845 3 <1>
gs_cidtt.ps 10 2904644 1540784 1436088 152568 true 845 3 <1>
gs_cidfm.ps 10 2924844 1554924 1436088 152568 true 845 3 <1>
gs_cmap.ps 10 2945044 1574218 1436088 152568 true 850 3 <1>
gs_setpd.ps 10 2965244 1599534 1436088 152568 true 850 3 <1>
gs_fapi.ps 10 3005644 1632658 1436088 152568 true 848 3 <1>
gs_typ32.ps 10 3005644 1635417 1436088 152568 true 846 3 <1>
gs_frsd.ps 10 3005644 1638227 1436088 152568 true 846 3 <1>
gs_ll3.ps 10 3167244 1792468 1436088 152816 true 847 3 <1>
gs_icc.ps 10 3167244 1798386 1436088 152816 true 848 3 <1>
gs_mex_e.ps 10 3187444 1804404 1436088 152816 true 848 3 <1>
gs_mro_e.ps 10 3187444 1805591 1436088 152816 true 848 3 <1>
gs_pdf_e.ps 10 3187444 1806824 1436088 152816 true 848 3 <1>
gs_wan_e.ps 10 3187444 1808074 1436088 152816 true 848 3 <1>
pdf_ops.ps 10 3268244 1891640 1436088 152816 true 848 3 <1>
gs_l2img.ps 10 3268244 1895932 1436088 152816 true 851 3 <1>
pdf_rbld.ps 10 3288444 1911241 1436088 152816 true 864 3 <1>
pdf_base.ps 10 3357492 1979620 1436088 152816 true 1072 4 <1>
pdf_draw.ps 10 3579692 2190507 1436088 152816 true 1072 4 <1>
pdf_font.ps 10 3706100 2304609 1436088 153584 true 1073 4 <1>
pdf_main.ps 20 3827300 2437197 1436088 153584 true 1041 4 <1>
pdf_sec.ps 20 3867700 2462379 1436088 153584 true 1041 4 <1>
gs_cff.ps 20 3867700 2470252 1436088 153584 true 1044 4 <1>
gs_mgl_e.ps 20 3867700 2472053 1436088 153584 true 1044 4 <1>
Extend MacRomanEncodingForTrueType for TrueType: insert /greaterequal @ 179
Extend MacRomanEncodingForTrueType for TrueType: insert /product @ 184
Extend MacRomanEncodingForTrueType for TrueType: insert /infinity @ 176
Extend MacRomanEncodingForTrueType for TrueType: insert /Omega @ 189
Extend MacRomanEncodingForTrueType for TrueType: insert /notequal @ 173
Extend MacRomanEncodingForTrueType for TrueType: insert /Delta @ 198
Extend MacRomanEncodingForTrueType for TrueType: insert /radical @ 195
Extend MacRomanEncodingForTrueType for TrueType: insert /lozenge @ 215
Extend MacRomanEncodingForTrueType for TrueType: cannot insert /Euro @ 219 used 
for /currency
Extend MacRomanEncodingForTrueType for