Closed DennisMitchell closed 5 years ago
This is already fixed, but I'll leave the issue open for better visibility.
If applicable, please run git pull
in /srv
to update your TIO install to the latest version, then systemctl daemon-reload
to load the new unit files.
There was a serious bug in older versions of the trim-cache script that could delete arbitrary files by accident. To trigger it, you had to install TIO at least partially. If you just cloned the repo, you're safe.
Note that triggering the bug requiring executing commands on a machine you control. It's not possible to trigger it from the sandbox.
Realistically, I think it could only be triggered in two scenarios. Do NOT perform these steps.
In a manual install, the following would trigger the bug.
/srv
(that exact path).trim-cache
configuration file in/srv/etc
./srv/cache
directory.trim-cache
script in a directory where you have write access to sub-directories, either manually or via the systemd unit files in the tryitonline repo.With tiosetup, the following would trigger the bug.
/srv/cache
directory.In this case, the
trim-cache
script would be run as root in/
, deleting most system files.As of commit https://github.com/TryItOnline/tryitonline/commit/b1967d12767cf0607efbb65ea2c615691cbb187b, aside from fixing the faulty script, the systemd unit file now runs it with write access to
/srv/cache
and nothing else.If you know anyone who might be running a TIO server, please point them to this issue.