EbraM96's blog

By EbraM96, history, 6 years ago, In English

How does codeforces run codes safely?

I mean like:

  • Preventing system calls
  • Allocating resources and time
  • Preventing connections
  • Isolating the process from the server

And what is the best way to do this?

  • Vote: I like it
  • +8
  • Vote: I do not like it

| Write comment?
»
6 years ago, # |
Rev. 4   Vote: I like it 0 Vote: I do not like it

I think they use any sort of sandbox.

»
6 years ago, # |
  Vote: I like it +5 Vote: I do not like it

Yes they do. There was one issue with the sandbox permissions some months ago but as far as I know it is now fixed. If you find anything just send a message to Mike, he's so cooperative and will work with you on fixing whatever you find (it's his platform after all) ^^

  • »
    »
    6 years ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    Depending on the platform you will have to customize a lot of stuff if you intend to run untrusted code of that many languages. The most basic way on windows is using the system user permissions as a layer for isolating processes. It's easier/harder depending on the language and the compiler dependencies and it's always a possibility that you can break out if you're creative enough. So one thing ppl do is making sure that breaking out is still controllable and not going to induce severe damage to the systems.