Might --enable-compile-inits make things more secure?
Johannes Meixner <[email protected]> Wed, 12 Dec 2018 12:20:04 +0100 (CET)
| Newsgroups | gmane.comp.printing.ghostscript.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello, sorry in advance if this is a stupid idea (I really don't know enough about the internals) but out of curiosity I can't resist to ask nevertheless: I am wondering if "configure --enable-compile-inits" might help to make Ghostscript with -dSAFER more secure. https://ghostscript.com/doc/9.26/Make.htm#Precompiled_data reads that it "improves security" but there is no explanation which kind of improved security it results. My vague understanding is that with -dSAFER it is not easily possible to limit file access only to stdin, stdout, and stderr because Ghostscript needs to access its own Resource files during runtime (e.g. a font that needs to be loaded on a later page) so that -dSAFER cannot disable general file access on the system disk at startup time. If my vague understanding is right I am wondering if it helps to get Ghostscript's own Resource files separated from arbitrary other files on the system disk by using "configure --enable-compile-inits". Perhaps with "configure --enable-compile-inits" it is possible to let -dSAFER disable file access on the "outer" system disk at startup time and only keep access to Ghostscript's own built-in %rom% file system. If access on the "outer" system disk could be generally disabled with -dSAFER at startup time it should at least mitigate possible misuse of special Ghostscript internal operators. Kind Regards Johannes Meixner -- SUSE LINUX GmbH - GF: Felix Imendoerffer, Jane Smithard, Graham Norton - HRB 21284 (AG Nuernberg)