I'm building a webapp that takes latex code from users, which is then compiled serverside. Now latex creates a huge system vulnerability since it is turing complete and you can basically hack the entire system by using commands like \openin, \read, \readline or \write.
I've read the articles tagged with security, but I'm not sure yet what is necessary to make the system entirely safe. E.g. it says change the texmf.cnf file. But then in one of the comments it says:
Be aware that a malicious loop could spike the CPU indefinitely. (Dave Jarvis)
A solution for this is not presented. What can be done about this? But so my concrete question is:
Which measures are necessary to make my web page secure, when compiling user latex?
\def\x{\x}\xwill loop forever. You need to limit the time using external operating system features to limit the job. – David Carlisle Aug 22 '15 at 11:31texmf.cnf, which cover 'security', but you can't tell if a process will reach a loop or not. Could you clarify which aspect you are after more info on? – Joseph Wright Aug 22 '15 at 12:32