bblackham/moe-cms — pull request #1 by ronalchn (2013-11-20 09:37:48+00:00)
Title: Close metafile so isolated process cannot write to it

It is possible for an isolated process to open the file descriptor corresponding to the metafile and write arbitrary data to it.

If a judge uses the metafile key/values to help decide correctness, it could get bad data - see https://github.com/ronalchn/isolate-cheater for a demonstration.

This does not fix where the metafile is redirected to another file descriptor, because the other file descriptor is not closed. That would require an option to close specified file descriptors on entering box_inside, and for care to be taken to use such an option.