News for hackers. Stuff that matters.
Re:Xpdf by fiddlerwoaroof on Sunday February 07, 2021 @05:48PM (#26058953)
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?

Re:Xpdf by h_anna_h on Sunday February 07, 2021 @10:21PM (#26060412)
I think Qubes OS rendered the pdf into a raster image in a VM and then presented the image.
Re:Xpdf by fsflover on Monday February 08, 2021 @03:47AM (#26062125)
Re:Xpdf by JadeNB on Monday February 08, 2021 @08:47AM (#26064347)
> 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 ….

Re:Xpdf by Mediterraneo10 on Sunday February 07, 2021 @06:24PM (#26059189)
> or postscript

Ghostscript is written in C and doesn't have a great reputation for security.

Re:Xpdf by fiddlerwoaroof on Sunday February 07, 2021 @06:30PM (#26059230)
The point is to make the document safe: if you’re concerned about the security of Ghostscript, run it in a quarantined VM or similar.
Re:Xpdf by tedunangst on Sunday February 07, 2021 @07:05PM (#26059409)
Why would you trust a compromised Ghostscript to produce a safe pdf?
Re:Xpdf by fiddlerwoaroof on Sunday February 07, 2021 @07:23PM (#26059496)
Because 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"