The tbb_stub.so used by sandboxed-tor-browser currently overloads socket() and connect() to force Firefox into using an AF_LOCAL socket for the control and socks ports.
Once the stable release series has first class support for AF_LOCAL, the surrogate and stub should be changed to use those over the hack to reduce the amount of code in the stub.
Note: The stub has other duties and likely will be impossible to eliminate entirely, but the smaller the stub is the better.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items 0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items 0
Link issues together to show that they're related.
Learn more.
7.0 is stable in all forms now, so this should probably happen sooner rather than later, especially as it's trivial to do assuming the Tor Browser side works as advertised.
Set the TOR_SOCKS_IPC_PATH env var to point to the SOCKS AF_LOCAL socket.
Set the TOR_CONTROL_IPC_PATH env var to point to the control AF_LOCAL socket.
(It is somewhat annoying that the location of these two is split across torbutton/torlauncher, but at least I found them.)
Hm, I did those things in a branch, updated the control port surrogate's net/listeners/socks response, and cleaned up the stub, but I don't get a functioning browser.
As far as I can tell, torbutton claims that it will use the AF_LOCAL socket, but goes and opens an AF_INET socket instead for some inexplicable reason, resulting in a white window, where I expect content to be. Nothing helpful is logged either.
I might just punt on this, what's there is a bit messy, but it works, and there's no reason why it won't continue to work indefinitely.
Without looking into the Firefox source, what I assume is happening in my branch is that the creation of the AF_INET/AF_INET6 sockets fail (with ENOSYS) due to the seccomp-bpf rules, and Firefox decides not to actually open the connection that will work.
When Tor Browser is configured to use AF_LOCAL, the two prior calls shouldn't happen to begin with.
In the context of socket(), 2, is AF_INET. For debugging purposes, the stub is returning -1, with errno set to EAFNOSUPPORT, on the off chance that Firefox is freaking out about the ENOSYS response.
Opened #22794 (moved). This won't happen till that's fixed, because allowing non-AF_LOCAL socket creation in the seccomp-bpf policy is totally out of the question.