[tor-commits] [sandboxed-tor-browser/master] fixup! Bug 22853: Something in Ubuntu's libraries is totally brain damaged.

yawning at torproject.org yawning at torproject.org
Sat Jul 8 00:32:29 UTC 2017


commit 9daf66dfad4096d5600cc78849f0df022924cd89
Author: Yawning Angel <yawning at schwanenlied.me>
Date:   Sat Jul 8 00:31:01 2017 +0000

    fixup! Bug 22853: Something in Ubuntu's libraries is totally brain damaged.
    
    Only enable the workaround for the alpha series, and only if the version
    is 7.5a2 or older, on the assumption that since it's fixed upstream it
    will be reflected in the next Tor Browser alpha build.
---
 .../sandboxed-tor-browser/internal/sandbox/application.go    | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/cmd/sandboxed-tor-browser/internal/sandbox/application.go b/src/cmd/sandboxed-tor-browser/internal/sandbox/application.go
index 659c835..969c6af 100644
--- a/src/cmd/sandboxed-tor-browser/internal/sandbox/application.go
+++ b/src/cmd/sandboxed-tor-browser/internal/sandbox/application.go
@@ -71,9 +71,15 @@ func RunTorBrowser(cfg *config.Config, manif *config.Manifest, tor *tor.Tor) (pr
 	h.fakeDbus = true
 	h.mountProc = false
 
-	// Work around the SelfRando developers not knowing how the x86_64 Linux
-	// system call calling convention works.
-	h.file("/proc/self/environ", []byte{})
+	if manif.Channel == "alpha" && !manif.BundleVersionAtLeast("7.5a3") {
+		// SelfRando prior to c619441e1ceec3599bc81bf9bbaf4d17c68b54b7 has a
+		// bug in how it handles system call return values, leading to a
+		// infinite loop if `/proc/self/environ` doesn't exist.
+		//
+		// See: https://trac.torproject.org/projects/tor/ticket/22853
+		Debugf("sandbox: SelfRando /proc/self/environ workaround enabled")
+		h.file("/proc/self/environ", []byte{})
+	}
 
 	// Gtk+ and PulseAudio.
 	hasAdwaita := h.appendGtk2Theme()



More information about the tor-commits mailing list