From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d4db,8e637370be2cbe54,start X-Google-Attributes: gid10d4db,public From: Lutz.Pressler@Unix.AMS.Med.Uni-Goettingen.DE (Lutz Pressler) Subject: Re: Ghostscript problem Date: 1995/08/31 Message-ID: #1/1 X-Deja-AN: 109232937 followup-to: comp.os.linux.setup content-type: text/plain; charset=ISO-8859-1 organization: Univ. G"ottingen, Abt. Medizinische Statistik, Germany mime-version: 1.0 reply-to: Lutz Pressler newsgroups: comp.os.linux.announce -----BEGIN PGP SIGNED MESSAGE----- Hello, On Tue, 22 Aug 1995, Olaf Kirch wrote: > There's another problem with ghostscript that makes you vulnerable to > attacks via postscript code. Ghostscript has a file type that lets you > execute arbitrary commands through the shell. While the -dSAFER option > to gs protects you from ordinary file write/rename/removal attacks, it > does not check for this special file type. [...] > Please also make sure that all programs that use ghostscript set the -dSAFER > option. ghostview 1.5 does by default, but version 1.4 does not. I'd > suggest you also check your ps printer filter if you print postscript > files using gs, and xdvi if you use a version that uses ghostscript to > display postscript \special's. I checked only xdvi-20, and it's safe. xdvi-18 (and xdvik 18d?), which is quite commonly used, is not. As you cannot be sure who uses gs in which situations (calling it manually, using distributed scripts,...) I asked myself who needs the file access functionality etc anyway. Is there any "normal" postscript application which uses those? I don't know any. That's why I set "-dSAFER" once and for all on our systems here. This is quite easily possible whithout recompiling: In {$GS_LIB}/gs_init.ps comment out those two line which implement the "if SAFER" condition: SAFER not { (%END SAFER) .skipeof } if and %END SAFER (put "% " (without ", of course) in front of them), or simply delete them. That should prohibit such kind of attacks. Regards, Lutz -----BEGIN PGP SIGNATURE----- Version: 2.6.2i iQCVAwUBMDtyEk8rRJEuvpUdAQHZZwQAsmxcjaYIMRu2JpmV6kXDAWn/FKXdu0yv ghqAkaPBo5IebMGjOoOBqnBZtGq6PbDJes1W+Q8lV79FgqIPj6QQV7GcpIpaaW43 PB2IFO3gULTpAp1aWIvTVX4f+vg1NpmPxM5KebxYPkcgAAjQDEsni3sckjepgkQ+ Bf6+fXEAMB8= =7ZFL -----END PGP SIGNATURE----- -- Lutz Pre"sler Systemverwaltung -- Abt. Medizinische Statistik, Universit"at G"ottingen Humboldtallee 32, D-37073 G"ottingen, Tel.: +49(0551) 39-9774 FAX: -4995 [PGP-key:WWW&Keyserver] IRC:lp -- Send comp.os.linux.announce submissions to: linux-announce@news.ornl.gov PLEASE remember a short description of the software.