It was discovered that the ghostscript .tempfile function did not properly handle file permissions. A specially crafted PostScript document could possibly exploit this to bypass the -dSAFER protection and delete files or disclose their content.
External References: http://seclists.org/oss-sec/2018/q3/142
Mitigation: Please see https://bugzilla.redhat.com/show_bug.cgi?id=1619748#c3
Patch: http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=0d3901189f
Acknowledgments: Name: Tavis Ormandy (Google Project Zero)
This issue has been addressed in the following products: Red Hat Enterprise Linux 7 Via RHSA-2018:3650 https://access.redhat.com/errata/RHSA-2018:3650
Created ghostscript tracking bugs for this issue: Affects: fedora-all [bug 1654367]