]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Tor: Enable syscall sandbox
authorPeter Müller <peter.mueller@ipfire.org>
Sat, 25 Sep 2021 07:07:58 +0000 (09:07 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Fri, 22 Oct 2021 10:20:37 +0000 (10:20 +0000)
This makes post-exploitation activities harder, in case the local Tor
instance has been compromised. It is worth noticing that Tor won't
respond to a "GETINFO address" command on the control port if sandboxed,
but our CGI does not make use of it, and neither is any legitimate
service on IPFire doing so.

Tested on a small middle relay running on an IPFire machine.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
html/cgi-bin/tor.cgi

index 3349336aea003c2fd4d9603a11fe390d6c95a0fb..ce579aec1146cfc565dbe36fbebcde93ba3a6211 100644 (file)
@@ -730,6 +730,7 @@ sub BuildConfiguration() {
        open(FILE, ">$torrc");
 
        # Global settings.
+       print FILE "Sandbox 1\n";
        print FILE "ControlPort $TOR_CONTROL_PORT\n";
 
        if ($settings{'TOR_ENABLED'} eq 'on') {