I have been thinking about a scenario where one lets users (can be anyone, possibly with bad intentions) submit code which is run on a Linux PC (let's call it the benchmark node). The goal is to make a kind of automated benchmarking environment for single-threaded routines. Let's say that a website posts some code to a proxy. This proxy hands this code to the benchmark node, and the benchmark node only has an ethernet connection to the proxy, not internet itself.
If one lets whatever user post C/asm code to be run on the benchmark node, what security challenges will one face? The following assumptions are made:
- The program is run as an unprivileged user
- The proxy will have the opportunity to kill the process on the benchmark node (take the scenario of an infinite loop for instance)
- The proxy is able to restart the benchmark node (if it replies...)
So, is it in practice possible that this user space program can make the OS crash, or make the machine unavailable to the proxy? With assembly the programmer can do basically whatever he wants (manipulate stack pointer for instance), and I wonder how restrictive/robust Linux is in this respect. I also know about the possibility for processes to request shared memory regions with other processes (shm), which might also play a role here?
Any literature or articles about this subject are very welcome.
Sandbox solutions might also be interesting, but it's important that the CPU must perform 100% of what it is capable of during the benchmark (at least on the core the benchmark is run).