Bug#941074: ghostscript: ps2pdf SAFER and transparency interference

2019-11-27 Thread Jonas Smedegaard
Control: tags -1 wontfix

Quoting Markus Demleitner (2019-09-24 11:36:09)
> ps2pdf14 as delivered in buster will only produce PDF transparency 
> when run with -dNOSAFER.  This deviates from previous releases (I'm 
> quite sure about jessie), when transparency was produced without 
> further configuration.  Although I *might* see some relationship to 
> accepting pdfmarks, the connection between SAFER and transparent 
> colours frankly strikes me as just a little non-intuitive (but that 
> may be because I don't know what's going on when producing 
> transparency in PDFs).
> 
> Because of this, I'd suggest that if turning off PDF transparency 
> without -dNOSAFER is intentional, that should be documented in the 
> NEWS, even more so as I couldn't make out that fact in the upstream 
> Use.htm that the current 9.28~~rc1~dfsg-1 NEWS item refers to.  
> Perhaps that particular item could be amended with saying something 
> like "Note that that has some rather unexpected consequences (e.g., 
> PDF transparency is now lost without -dNOSAFER)."

At https://bugs.ghostscript.com/show_bug.cgi?id=701624#c1 upstream 
explains that the operators to apply transparency is non-standard when 
applied to Postscript code.

Upstream has since relaxed to permit these non-standard operators in 
SAFER mode, a change which is (not certain but) likely to appear in next 
upstream release: http://git.ghostscript.com/?p=ghostpdl.git;h=d1eac80

I prefer to not mess with this security-related code to try cherry-pick 
for older relases, and therefore flag this bug as wontfix.

Thanks for reporting,

 - 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


Processed: Re: Bug#941074: ghostscript: ps2pdf SAFER and transparency interference

2019-11-27 Thread Debian Bug Tracking System
Processing control commands:

> tags -1 wontfix
Bug #941074 [ghostscript] ghostscript: ps2pdf SAFER and transparency 
interference
Ignoring request to alter tags of bug #941074 to the same tags previously set

-- 
941074: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=941074
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Processed: Re: Bug#941074: ghostscript: ps2pdf SAFER and transparency interference

2019-09-24 Thread Debian Bug Tracking System
Processing control commands:

> forwarded -1 https://bugs.ghostscript.com/show_bug.cgi?id=701624
Bug #941074 [ghostscript] ghostscript: ps2pdf SAFER and transparency 
interference
Set Bug forwarded-to-address to 
'https://bugs.ghostscript.com/show_bug.cgi?id=701624'.

-- 
941074: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=941074
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#941074: ghostscript: ps2pdf SAFER and transparency interference

2019-09-24 Thread Jonas Smedegaard
Control: forwarded -1 https://bugs.ghostscript.com/show_bug.cgi?id=701624

[ replying via bugreport ]

Quoting Markus Demleitner (2019-09-24 13:16:33)
> Hi Jonas,
> 
> On Tue, Sep 24, 2019 at 12:21:15PM +0200, Jonas Smedegaard wrote:
> > Above minimal code is processed by LaTeX, not Ghostscript directly.
> > 
> > Please provide a (minimal, preferrably) example of date and commands 
> > directly involving Ghostscript.
> 
> The postscript code produced above is a bit unwieldy in comparison
> to the TeX source, but hand-crafting a minimal piece of postscript
> is... unattractive to me at this point.
> 
> So, I'm attaching the dvips-produced postscript and, in case that's
> not coming through, I'll keep
> http://www.tfiu.de/transparent-things.ps while this bug is open.
> 
> To reproduce the bug, run
> 
>   ps2pdf14 transparent-things.ps
> 
> (no transparency in transparent-things.pdf) and
> 
>   ps2pdf14 -dNOSAFER transparent-things.ps 
> 
> (transparency in transparent-things.pdf).

Thanks - that's qite useful: I have now passed this report upstream.


 - 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#941074: ghostscript: ps2pdf SAFER and transparency interference

2019-09-24 Thread Jonas Smedegaard
Hi Markus,

Quoting Markus Demleitner (2019-09-24 11:36:09)
> ps2pdf14 as delivered in buster will only produce PDF transparency 
> when run with -dNOSAFER.  This deviates from previous releases (I'm 
> quite sure about jessie), when transparency was produced without 
> further configuration.  Although I *might* see some relationship to 
> accepting pdfmarks, the connection between SAFER and transparent 
> colours frankly strikes me as just a little non-intuitive (but that 
> may be because I don't know what's going on when producing 
> transparency in PDFs).
> 
> Because of this, I'd suggest that if turning off PDF transparency 
> without -dNOSAFER is intentional, that should be documented in the 
> NEWS, even more so as I couldn't make out that fact in the upstream 
> Use.htm that the current 9.28~~rc1~dfsg-1 NEWS item refers to.  
> Perhaps that particular item could be amended with saying something 
> like "Note that that has some rather unexpected consequences (e.g., 
> PDF transparency is now lost without -dNOSAFER)."
>
> Here's my minimal working example:
> 
> With the LaTeX document
> 
> \documentclass{article}
> \usepackage{pstricks}
> \begin{document}
> 
> \psframebox*[linecolor=white,fillcolor=red,fillstyle=solid,
> opacity=0.85,framesep=4mm]{abc}
> \vskip -9mm
> \psframebox*[fillcolor=white, opacity=0.5,strokeopacity=0.5,
> fillstyle=solid,framesep=4mm,linewidth=3pt,linecolor=black]{abc}
> 
> \end{document}
> 
> in a.tex, run
> 
> latex a;dvips a;ps2pdf a.ps
> 
> and the second white box obscures most of the red box in the background
> (i.e., pstricks opacity is ignored).  Run
> 
> latex a;dvips a;ps2pdf -dNOSAFER a.ps
> 
> and the two boxes blend as expected.

Thanks for reporting this issue.

Above minimal code is processed by LaTeX, not Ghostscript directly.

Please provide a (minimal, preferrably) example of date and commands 
directly involving Ghostscript.


 - 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#941074: ghostscript: ps2pdf SAFER and transparency interference

2019-09-24 Thread Markus Demleitner
Package: ghostscript
Version: 9.27~dfsg-2+deb10u2
Severity: minor

ps2pdf14 as delivered in buster will only produce PDF transparency when
run with -dNOSAFER.  This deviates from previous releases (I'm quite
sure about jessie), when transparency was produced without further
configuration.  Although I *might* see some relationship to accepting
pdfmarks, the connection between SAFER and transparent colours frankly
strikes me as just a little non-intuitive (but that may be because I
don't know what's going on when producing transparency in PDFs).

Because of this, I'd suggest that if turning off PDF transparency
without -dNOSAFER is intentional, that should be documented in the NEWS,
even more so as I couldn't make out that fact in the upstream Use.htm
that the current 9.28~~rc1~dfsg-1 NEWS item refers to.  Perhaps that
particular item could be amended with saying something like "Note that
that has some rather unexpected consequences (e.g., PDF transparency is
now lost without -dNOSAFER)."

Here's my minimal working example:

With the LaTeX document

\documentclass{article}
\usepackage{pstricks}
\begin{document}

\psframebox*[linecolor=white,fillcolor=red,fillstyle=solid,
opacity=0.85,framesep=4mm]{abc}
\vskip -9mm
\psframebox*[fillcolor=white, opacity=0.5,strokeopacity=0.5,
fillstyle=solid,framesep=4mm,linewidth=3pt,linecolor=black]{abc}

\end{document}

in a.tex, run

latex a;dvips a;ps2pdf a.ps

and the second white box obscures most of the red box in the background
(i.e., pstricks opacity is ignored).  Run

latex a;dvips a;ps2pdf -dNOSAFER a.ps

and the two boxes blend as expected.


-- System Information:
Debian Release: 10.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (x86_64)

Kernel: Linux 5.1.9 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C.UTF-8 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: sysvinit (via /sbin/init)

Versions of packages ghostscript depends on:
ii  libc6   2.28-10
ii  libgs9  9.27~dfsg-2+deb10u2

Versions of packages ghostscript recommends:
ii  gsfonts  1:8.11+urwcyr1.0.7~pre44-4.4

Versions of packages ghostscript suggests:
ii  ghostscript-x  9.27~dfsg-2+deb10u2

-- no debconf information