Блог пользователя EbraM96

Автор EbraM96, история, 6 лет назад, По-английски

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?

  • Проголосовать: нравится
  • +8
  • Проголосовать: не нравится

»
6 лет назад, # |
Rev. 4   Проголосовать: нравится 0 Проголосовать: не нравится

I think they use any sort of sandbox.

»
6 лет назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

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 лет назад, # ^ |
      Проголосовать: нравится +5 Проголосовать: не нравится

    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.