Hello,
I have one Linode 2Gb running Debian on which I run my personal website, and a couple of websites of other people. Now, I teach programming at a university and I need to set up some form of automated assessment for students programs (in different languages). The University has some basic setup for that, but it doesn't work very well.
I first thought I could just set up qemu machines on the Linode, with a shared /usr partition image mounted read-only, but then I checked this thread:
https://forum.linode.com/viewtopic.php?f=20&t=4749 -- it doesn't seem to be a good idea to run qemu on a Linode.
(It is very important to me that my Linode doesn't hang, and that all other websites keep running as usual)
So I thought I could then set up chrooted environments, to which students will have
no login access. They would submit code, which would be compiled or interpreted according to the language, and executed as non-root user by a daemon:
1. Student submits file to a web server. The file is put on that students' chroot.
2. Another program, chrooted in that same place, runs the program and puts the output in a file.
3. The output file is read by a program outside the chroot, and compared to an expected output.
4. The result is published on a webpage so the student has his feedback.
A single /usr directory would be used for all chroots, and mounted readonly, and each student would have his /home, /var and /tmp directories.
But I am not sure about the security implications of this. My questions then are:
* Is it possible for a non-root user to break out of the root on a modern Linux kernel?
* If I decide to go with the chroot solution, what should I do besides, of course, dropping root privileges as soon as possible?
Thanks a lot!