3 ms·
For something like PDF, I wonder how practical it would be to write a program that just strips out “dangerous” features. Maybe this wouldn’t help with buffer ov
by fiddlerwoaroof 6y ago
For something like PDF, I wonder how practical it would be to write a program that just strips out “dangerous” features. Maybe this wouldn’t help with buffer overflows and similar, but it might be useful.
Maybe just roundtripping your pdf through djvu or postscript would be sufficient?
- Mediterraneo10 6y ago> or postscript Ghostscript is written in C and doesn't have a great reputation for security.
- fiddlerwoaroof 6y agoThe point is to make the document safe: if you’re concerned about the security of Ghostscript, run it in a quarantined VM or similar.
- tedunangst 6y agoWhy would you trust a compromised Ghostscript to produce a safe pdf?
- fiddlerwoaroof 6y agoBecause the likelihood that I get a PDF designed to exploit a bug in XPDF (or other image viewer) after being converted to PS and back by Ghostscript is relatively low (e.g. this would seem to indicate that I'm being targetted personally, or I have a common setup)? But, in general, I'm not saying "use ghostscript", I'm saying "perhaps roundtripping incoming PDFs through some other file format will produce a PDF that is safer to view than viewing untrusted PDFs directly"
- h_anna_h 6y agoI think Qubes OS rendered the pdf into a raster image in a VM and then presented the image.
- fsflover 6y agoMore details: https://blog.invisiblethings.org/2013/02/21/converting-untrusted-pdfs-into-trusted.html https://blog.invisiblethings.org/2013/02/21/converting-untru...
- JadeNB 6y ago> Maybe just roundtripping your pdf through djvu or postscript would be sufficient? But PDF is a subset of Postscript, so the roundtrip seems to be the identity transformation ….