Bug#940127: ghostscript makes c2esp autopkgtest timeout

2019-11-18 Thread Jonas Smedegaard
Control: severity -1 important

Quoting Jonas Smedegaard (2019-11-14 14:28:35)
> @Didier: Since you reassigned this to (only) ghostscript, would you 
> please consider re-reassigning to (only) c2esp instead?
> 
> Reason I ask is that ghostscript is now security-buggy in testing 
> since a month, seemingly blocked only by this issue.  If reassigning 
> does not seem sensible, then how about lowering severity (maybe only 
> temporarily)?

Lowering severity to prioritize general security over use with c2esp.

 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Bug#940127: ghostscript makes c2esp autopkgtest timeout

2019-11-14 Thread Jonas Smedegaard
Quoting Didier 'OdyX' Raboud (2019-09-22 15:30:53)
> Le dimanche, 22 septembre 2019, 13.25:19 h CEST Brian Potkin a écrit :
> > On Sat 21 Sep 2019 at 17:39:20 +0200, Didier 'OdyX' Raboud wrote:
> > > Le samedi, 21 septembre 2019, 16.24:30 h CEST Brian Potkin a écrit :
> > > > > There's clearly a regression in ghostscript 9.28 that started
> > > > > segfaulting
> > > > > in the c2esp filter chain. But I can't manage to reproduce it outside
> > > > > of
> > > > > the "cups + c2esp + cups-filters (gstoraster) + ghostscript"
> > > > > environment.
> > > > > 
> > > > > Brian; Till: any idea?
> > > > 
> > > > No ideas from me really. I too get gstoraster stopping when attempting
> > > > to print /usr/share/cups/data/form_russian.pdf; but the same is true for
> > > > form_english.pdf.
> > > 
> > > Ah, sorry; I formulated my inquiry weakly. Let me try again:
> > > 
> > > Do you have a hint on how to reproduce the failing ghostscript call (or
> > > the
> > > gstoraster call) directly, without using CUPS in the middle?
> > 
> > Would this do?
> > 
> > cat /usr/share/cups/data/form_russian.pdf | gs -dQUIET -dPARANOIDSAFER
> > -dNOPAUSE -dBATCH -dNOINTERPOLATE -dNOMEDIAATTRS -dShowAcroForm
> > -sstdout=%stderr -sOutputFile=%stdout -sDEVICE=cups -r600x600
> > -dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=842 -dcupsBitsPerColor=8
> > -dcupsColorOrder=0 -dcupsColorSpace=4 -scupsPageSizeName=A4
> > -I/usr/share/cups/fonts -c '< > 3.00] /Margins[00]>>setpagedevice' -f -_ > out.ras
> 
> The problem is… This doesn't segfault. :-(

This bugreport seems to only really describe broken behaviour of c2esp.

Yes, it smells quite strongly of being _caused_ by some bug in 
ghostscript, but when only proven breakable in an environment created 
inside of c2esp, it seems more sensible to me that this bugreport is 
tied to c2esp rather than ghostscript.

@Didier: Since you reassigned this to (only) ghostscript, would you 
please consider re-reassigning to (only) c2esp instead?

Reason I ask is that ghostscript is now security-buggy in testing since 
a month, seemingly blocked only by this issue.  If reassigning does not 
seem sensible, then how about lowering severity (maybe only 
temporarily)?


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Bug#940127: ghostscript makes c2esp autopkgtest timeout

2019-09-23 Thread Till Kamppeter

On 22/09/2019 13:25, Brian Potkin wrote:

Would this do?

cat /usr/share/cups/data/form_russian.pdf | gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH 
-dNOINTERPOLATE -dNOMEDIAATTRS -dShowAcroForm -sstdout=%stderr -sOutputFile=%stdout 
-sDEVICE=cups -r600x600 -dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=842 -dcupsBitsPerColor=8 
-dcupsColorOrder=0 -dcupsColorSpace=4 -scupsPageSizeName=A4 -I/usr/share/cups/fonts -c 
'<>setpagedevice' 
-f -_ > out.ras


I have tried this command line (with gs 9.27 as of Ubuntu Eoan) and it 
did neither crash nor error. I got a valid out.ras file without any 
problem. For the given color space (CMY, -dcupsColorSpace=4) I got 
broken output (I have checked with rasterview). All other important 
color spaces (0, 1, 17, 18, 19, 20) give correct output for me (could be 
another bug in Ghostscript).


   Till



Bug#940127: ghostscript makes c2esp autopkgtest timeout

2019-09-22 Thread Brian Potkin
On Sat 21 Sep 2019 at 17:39:20 +0200, Didier 'OdyX' Raboud wrote:

> Le samedi, 21 septembre 2019, 16.24:30 h CEST Brian Potkin a écrit :
> > > There's clearly a regression in ghostscript 9.28 that started segfaulting
> > > in the c2esp filter chain. But I can't manage to reproduce it outside of
> > > the "cups + c2esp + cups-filters (gstoraster) + ghostscript" environment.
> > > 
> > > Brian; Till: any idea?
> > 
> > No ideas from me really. I too get gstoraster stopping when attempting
> > to print /usr/share/cups/data/form_russian.pdf; but the same is true for
> > form_english.pdf.
> 
> Ah, sorry; I formulated my inquiry weakly. Let me try again:
> 
> Do you have a hint on how to reproduce the failing ghostscript call (or the 
> gstoraster call) directly, without using CUPS in the middle?



Bug#940127: ghostscript makes c2esp autopkgtest timeout

2019-09-22 Thread Brian Potkin
On Sat 21 Sep 2019 at 17:39:20 +0200, Didier 'OdyX' Raboud wrote:

> Le samedi, 21 septembre 2019, 16.24:30 h CEST Brian Potkin a écrit :
> > > There's clearly a regression in ghostscript 9.28 that started segfaulting
> > > in the c2esp filter chain. But I can't manage to reproduce it outside of
> > > the "cups + c2esp + cups-filters (gstoraster) + ghostscript" environment.
> > > 
> > > Brian; Till: any idea?
> > 
> > No ideas from me really. I too get gstoraster stopping when attempting
> > to print /usr/share/cups/data/form_russian.pdf; but the same is true for
> > form_english.pdf.
> 
> Ah, sorry; I formulated my inquiry weakly. Let me try again:
> 
> Do you have a hint on how to reproduce the failing ghostscript call (or the 
> gstoraster call) directly, without using CUPS in the middle?


Would this do?

cat /usr/share/cups/data/form_russian.pdf | gs -dQUIET -dPARANOIDSAFER 
-dNOPAUSE -dBATCH -dNOINTERPOLATE -dNOMEDIAATTRS -dShowAcroForm 
-sstdout=%stderr -sOutputFile=%stdout -sDEVICE=cups -r600x600 
-dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=842 -dcupsBitsPerColor=8 
-dcupsColorOrder=0 -dcupsColorSpace=4 -scupsPageSizeName=A4 
-I/usr/share/cups/fonts -c '<>setpagedevice' -f -_ > out.ras

Regards,

Brian.



Bug#940127: ghostscript makes c2esp autopkgtest timeout

2019-09-22 Thread Didier 'OdyX' Raboud
Le dimanche, 22 septembre 2019, 13.25:19 h CEST Brian Potkin a écrit :
> On Sat 21 Sep 2019 at 17:39:20 +0200, Didier 'OdyX' Raboud wrote:
> > Le samedi, 21 septembre 2019, 16.24:30 h CEST Brian Potkin a écrit :
> > > > There's clearly a regression in ghostscript 9.28 that started
> > > > segfaulting
> > > > in the c2esp filter chain. But I can't manage to reproduce it outside
> > > > of
> > > > the "cups + c2esp + cups-filters (gstoraster) + ghostscript"
> > > > environment.
> > > > 
> > > > Brian; Till: any idea?
> > > 
> > > No ideas from me really. I too get gstoraster stopping when attempting
> > > to print /usr/share/cups/data/form_russian.pdf; but the same is true for
> > > form_english.pdf.
> > 
> > Ah, sorry; I formulated my inquiry weakly. Let me try again:
> > 
> > Do you have a hint on how to reproduce the failing ghostscript call (or
> > the
> > gstoraster call) directly, without using CUPS in the middle?
> 
> Would this do?
> 
> cat /usr/share/cups/data/form_russian.pdf | gs -dQUIET -dPARANOIDSAFER
> -dNOPAUSE -dBATCH -dNOINTERPOLATE -dNOMEDIAATTRS -dShowAcroForm
> -sstdout=%stderr -sOutputFile=%stdout -sDEVICE=cups -r600x600
> -dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=842 -dcupsBitsPerColor=8
> -dcupsColorOrder=0 -dcupsColorSpace=4 -scupsPageSizeName=A4
> -I/usr/share/cups/fonts -c '< 3.00] /Margins[00]>>setpagedevice' -f -_ > out.ras

The problem is… This doesn't segfault. :-(

-- 
OdyX

signature.asc
Description: This is a digitally signed message part.


Bug#940127: ghostscript makes c2esp autopkgtest timeout

2019-09-21 Thread Paul Newall

All,

I was the author of c2esp. It's hard for me to test it now because I no 
longer have kodak printers.


I'm wondering if other backends also use the gstoraster filter (I'd 
expect there would be others?) and do they also cause this error? Or did 
I do something unusual in c2espC that's contributing to the problem?


Paul Newall

On 21/09/2019 15:24, Brian Potkin wrote:

On Sat 21 Sep 2019 at 10:22:22 +0200, Didier 'OdyX' Raboud wrote:

[...]


Using snapshot.debian.org:

* ghostscript 9.27~dfsg-3.1 works
* ghostscript 9.28~~rc1~dfsg-1 and all the later versions segfault

So…

There's clearly a regression in ghostscript 9.28 that started segfaulting in
the c2esp filter chain. But I can't manage to reproduce it outside of the
"cups + c2esp + cups-filters (gstoraster) + ghostscript" environment.

Brian; Till: any idea?

No ideas from me really. I too get gstoraster stopping when attempting
to print /usr/share/cups/data/form_russian.pdf; but the same is true for
form_english.pdf.

OTOH, /usr/share/doc/shared-mime-info/shared-mime-info-spec.pdf and text
files complete successfully.

Regards,

Brian.





Bug#940127: ghostscript makes c2esp autopkgtest timeout

2019-09-21 Thread Didier 'OdyX' Raboud
Le samedi, 21 septembre 2019, 16.24:30 h CEST Brian Potkin a écrit :
> > There's clearly a regression in ghostscript 9.28 that started segfaulting
> > in the c2esp filter chain. But I can't manage to reproduce it outside of
> > the "cups + c2esp + cups-filters (gstoraster) + ghostscript" environment.
> > 
> > Brian; Till: any idea?
> 
> No ideas from me really. I too get gstoraster stopping when attempting
> to print /usr/share/cups/data/form_russian.pdf; but the same is true for
> form_english.pdf.

Ah, sorry; I formulated my inquiry weakly. Let me try again:

Do you have a hint on how to reproduce the failing ghostscript call (or the 
gstoraster call) directly, without using CUPS in the middle?

signature.asc
Description: This is a digitally signed message part.


Bug#940127: ghostscript makes c2esp autopkgtest timeout

2019-09-21 Thread Brian Potkin
On Sat 21 Sep 2019 at 10:22:22 +0200, Didier 'OdyX' Raboud wrote:

[...]

> Using snapshot.debian.org:
> 
> * ghostscript 9.27~dfsg-3.1 works
> * ghostscript 9.28~~rc1~dfsg-1 and all the later versions segfault
> 
> So…
> 
> There's clearly a regression in ghostscript 9.28 that started segfaulting in
> the c2esp filter chain. But I can't manage to reproduce it outside of the
> "cups + c2esp + cups-filters (gstoraster) + ghostscript" environment.
> 
> Brian; Till: any idea?

No ideas from me really. I too get gstoraster stopping when attempting
to print /usr/share/cups/data/form_russian.pdf; but the same is true for
form_english.pdf.

OTOH, /usr/share/doc/shared-mime-info/shared-mime-info-spec.pdf and text
files complete successfully.

Regards,

Brian.



Bug#940127: ghostscript makes c2esp autopkgtest timeout

2019-09-21 Thread Didier 'OdyX' Raboud
Control: notfound -1 c2esp/27-4
Control: affects -1 c2esp
Control: found -1 ghostscript/9.28~~rc1~dfsg-1
Control: retitle -1 gs segfaults in c2esp filter chain

Hi Paul,

thanks for the detailed report.

Le jeudi, 12 septembre 2019, 19.27:46 h CEST Paul Gevers a écrit :
> Dear maintainers,
> 
> With a recent upload of ghostscript the autopkgtest of c2esp timeouts
> [1] in testing when that autopkgtest is run with the binary packages of
> ghostscript from unstable. It passes when run with only packages from
> testing. In tabular form:
>passfail
> ghostscriptfrom testing9.28~~rc2~dfsg-1
> c2esp  from testing27-4
> all others from testingfrom testing
> 
> The autopkgtest of c2esp also times out in unstable since the upload of
> ghostscript.
> 
> Due to the nature of this issue, I filed this bug report against both
> packages. Can you please investigate the situation and reassign the bug
> to the right package?

Sure. So…

It fails with the c2espC filter only, the c2esp filter seems fine. It asks for
the following filter chain to process a PDF file such as
 /usr/share/cups/data/form_russian.pdf:

/usr/lib/cups/filter/pdftopdf
/usr/lib/cups/filter/gstoraster
/usr/lib/cups/filter/c2espC

In this chain, from the CUPS logs:
/usr/lib/cups/filter/gstoraster stopped with status 1

And from my kernel log:
Sep 21 09:10:37 gyllingar kernel: [ 9755.656484] gs[10134]: segfault at 
7f93b77ea000 ip 7f93b91b0e2a sp 7ffe368515e0 error 4 in 
libgs.so.9.28[7f93b9135000+367000]
Sep 21 09:10:37 gyllingar kernel: [ 9755.656492] Code: 01 48 8d 5c 44 42 31 c0 
8b 94 24 10 01 00 00 45 31 f6 85 d2 0f 8e ce 01 00 00 66 0f 1f 44 00 00 48 8b 
44 24 18 44 89 74 24 38 <42> 0f b7 34 70 89 f0 8d 50 01 81 e2 fe 00 00 00 0f 85 
b0 00 00 00

… but I can't manage to reproduce this failure by manually running the
filters. :( But when I go through cups, the ghostscript segfault is
repeatable. So it really seems like a ghostscript bug.

The corresponding lines from cups' error log are the following:

D [21/Sep/2019:09:20:30 +0200] [Job 2201] Ghostscript using Any-Part-of-Pixel 
method to fill paths.
D [21/Sep/2019:09:20:30 +0200] [Job 2201] Ghostscript command line: gs -dQUIET 
-dPARANOIDSAFER -dNOPAUSE -dBATCH -dNOINTERPOLATE -dNOMEDIAATTRS -dShowAcroForm 
-sstdout=%stderr -sOutputFile=%stdout -sDEVICE=cups -r600x600 
-dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=842 -dcupsBitsPerColor=8 
-dcupsColorOrder=0 -dcupsColorSpace=4 -scupsPageSizeName=A4 
-I/usr/share/cups/fonts -c \'<>setpagedevice\' -f -_
D [21/Sep/2019:09:20:30 +0200] [Job 2201] 
envp[0]=\"CUPS_CACHEDIR=/var/cache/cups\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] 
envp[1]=\"CUPS_DATADIR=/usr/share/cups\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] 
envp[2]=\"CUPS_DOCROOT=/usr/share/cups/doc-root\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] 
envp[3]=\"CUPS_FONTPATH=/usr/share/cups/fonts\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] 
envp[4]=\"CUPS_REQUESTROOT=/var/spool/cups\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] 
envp[5]=\"CUPS_SERVERBIN=/usr/lib/cups\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] envp[6]=\"CUPS_SERVERROOT=/etc/cups\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] envp[7]=\"CUPS_STATEDIR=/run/cups\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] envp[8]=\"HOME=/var/spool/cups/tmp\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] 
envp[9]=\"PATH=/usr/lib/cups/filter:/usr/bin:/usr/sbin:/bin:/usr/bin\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] 
envp[10]=\"SERVER_ADMIN=root@gyllingar\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] envp[11]=\"SOFTWARE=CUPS/2.3.0\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] envp[12]=\"USER=root\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] envp[13]=\"CUPS_MAX_MESSAGE=2047\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] 
envp[14]=\"CUPS_SERVER=/var/run/cups/cups.sock\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] 
envp[15]=\"CUPS_ENCRYPTION=IfRequested\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] envp[16]=\"IPP_PORT=631\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] envp[17]=\"CHARSET=utf-8\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] envp[18]=\"LANG=fr_CH.UTF-8\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] 
envp[19]=\"PPD=/etc/cups/ppd/test-printer0.ppd\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] envp[20]=\"RIP_MAX_CACHE=128m\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] 
envp[21]=\"CONTENT_TYPE=application/pdf\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] 
envp[22]=\"DEVICE_URI=file:///dev/null\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] 
envp[23]=\"PRINTER_INFO=test-printer0\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] envp[24]=\"PRINTER_LOCATION=\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] envp[25]=\"PRINTER=test-printer0\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] 
envp[26]=\"PRINTER_STATE_REASONS=none\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] envp[27]=\"CUPS_FILETYPE=document\"
D [21/Sep/2019:09:20:30 +0200] [Job 2201] 

Bug#940127: ghostscript makes c2esp autopkgtest timeout

2019-09-12 Thread Paul Gevers
Source: ghostscript, c2esp
Control: found -1 ghostscript/9.28~~rc2~dfsg-1
Control: found -1 c2esp/27-4
Severity: serious
Tags: sid bullseye
X-Debbugs-CC: debian...@lists.debian.org
User: debian...@lists.debian.org
Usertags: breaks needs-update timeout

Dear maintainers,

With a recent upload of ghostscript the autopkgtest of c2esp timeouts
[1] in testing when that autopkgtest is run with the binary packages of
ghostscript from unstable. It passes when run with only packages from
testing. In tabular form:
   passfail
ghostscriptfrom testing9.28~~rc2~dfsg-1
c2esp  from testing27-4
all others from testingfrom testing

The autopkgtest of c2esp also times out in unstable since the upload of
ghostscript.

Due to the nature of this issue, I filed this bug report against both
packages. Can you please investigate the situation and reassign the bug
to the right package?

Paul

[1]
https://ci.debian.net/data/autopkgtest/testing/amd64/c/c2esp/2944626/log.gz



signature.asc
Description: OpenPGP digital signature