Someone made a port of Doom that runs in a PDF

I'm just...

https://github.com/ading2210/doompdf

Same person got Linux working inside a PDF document

An entire kernel and OS running in a PDF. What a time to be alive

https://github.com/ading2210/linuxpdf

@cypnk

Very cool.
Also terrifying.

Raises serious questions about using PDF as a document format.

I guess my big question is how many PDF viewers are defaulted to run this kind of code in a PDF?  

One would hope that most have this turned off by default?
🤨

@TerryHancock @cypnk In theory, interpreted on non-broken hardware (lol) it would be "safe" once isolated properly.

But yes, there's a reason why I much prefer djvu as a format.

@lispi314 @cypnk

Yeah, I guess the real question is about sandboxing -- does the code running in the PDF have access to the outside, like the filesystem? 🤔

@TerryHancock @cypnk I see no reason why it would have such access, but I'm sure some implementations screwed up anyway. It shouldn't be particularly hard to restrict such an implementation to only taking input/output through stdin/stdout or a socket and allowlist syscalls.

That ought to be enough for interaction commands and render output.

Problem is, that does all of nothing for mitigating hardware vulns.