I am trying to build a web application (running on Linux servers) in which the user will upload an executable, the executable will be ran against a particular input available on the server (fed via STDIN), and the output (read from STDOUT) will be returned to the user.
Of course, I do not want the user to be able to do anything malicious on my server. I would like to run the executable in a sandbox, or otherwise prevent the executable from executing sensitive system calls.
I have no idea where to start from. I checked out User-Mode Linux, but it seems to have too much overhead (many executables will be running in parallel, and having a VM for each one is way too much overhead).
How should I proceed?
Edit: I understand this is something one normally avoids. I understand there are risks. Consider this as something you would do for the sake of learning how it can be done. I have seen it done before on places like CodePad and geordi, sometimes it is a very convenient thing to do.