Sandboxing in Linux

后端 未结 12 1997
一整个雨季
一整个雨季 2020-12-01 05:56

I want to create a Web app which would allow the user to upload some C code, and see the results of its execution (the code would be compiled on the server). The users are u

12条回答
  •  离开以前
    2020-12-01 06:15

    Spawning a new VM under KVM or qemu to compile and run the code looks like the way to go. Running the code under jail/LXC can compromise the machine if it exploits the unsecured parts of the OS like networking code. Advantage of running under a VM are obvious. One can only hack the VM but not the machine itself. But the side effect is you need lots of resources (CPU and Memory) to spawn a VM for each request.

提交回复
热议问题