gecko-dev/netwerk
Richard Pospesel 2ba1e92974 Bug 1441327 - Allow for seccomp filtering of socket(AF_INET/AF_INET_6) calls on Linux when using UNIX Domain Sockets for SOCKS Proxy. r=bagder
The initialization path for the SOCKS proxy in firefox involves creating
a generic AF_INET socket, and then replacing it if the actual
configuration requires something else (either AF_INET6 or AF_LOCAL).
With syscall filtering configured to return an error in the event of
AF_INET or AF_INET6 socket creation, this initialization path fails.  We
would like this capability so that we can prevent firefox from making
network requests outside of the Tor proxy.

This patch adds a check in the initial socket creation path to see if
the SOCKS proxy host begins with file:// with the assumption that such
URIs point to a UNIX Domain Socket (on Linux+macOS only).  In that case,
we create an AF_LOCAL socket rather than the requested type.  A similar
check for Windows already exists to determine if the proxy is actually a
named pipe.

In the subsequent replacing step no work occurs as the passed in socket
matches the type we need, so no changes need to be made there.

NOTE: With this change there is still a one-time request for an AF_INET6
socket that occurs.  This code path exists to determine whether the
system supports IPv6; if socket(AF_INET6...) fails then it is assumed
that the system does not.  However, this check only affects code that is
unreachable when using AF_LOCAL sockets so it seems safe leave as it is.
However, this does mean that firefox will still be incompatible with
seccomp policies which kill the calling thread in the event of a
socket(AF_INET6,...) call.
2018-03-07 12:58:00 -05:00
..
base Bug 1446117 - Make sure we also mark timeout epoch on a network socket when we are polling it for read/write, fix regression from bug 1444160. r=valentin 2018-03-19 07:48:00 -04:00
build Bug 1415205 - Add nsIURIMutator impls for all objects implementing nsIURI r=bagder 2017-11-20 17:11:30 +01:00
cache Bug 1443080 - Use the static call for static methods (not instance) r=Ehsan 2018-03-16 14:29:15 +01:00
cache2 Bug 1444490 Declare classses (and one method) in network/ final to reduce virtual function calls r=nwgh 2018-03-09 08:37:18 -06:00
cookie Bug 1444490 Declare classses (and one method) in network/ final to reduce virtual function calls r=nwgh 2018-03-09 08:37:18 -06:00
dns bug 1446749 - make resolver keep TRR status when cherry-picking adddresses r=mcmanus 2018-03-18 15:39:56 +01:00
ipc Bug 1440701 - Adding in telemetry for upgrading display content. r=ckerschb,valentin 2018-03-04 14:33:33 +00:00
locales
mime Bug 1412213 - Content-Type MIME-header - Skipping a parameter without an '='. r=mayhemer 2018-01-29 14:36:00 -05:00
protocol Bug 1430659 - Network requests in "blocked" state for long time (1+ minute) when ipv6 hosts are no longer available. r=valentin 2018-03-16 09:06:00 -04:00
sctp Bug 1086964 - Remove uses of no_pgo that are no longer needed. r=dmajor 2018-03-14 18:18:32 -04:00
socket Bug 1441327 - Allow for seccomp filtering of socket(AF_INET/AF_INET_6) calls on Linux when using UNIX Domain Sockets for SOCKS Proxy. r=bagder 2018-03-07 12:58:00 -05:00
srtp Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium 2017-12-07 22:09:15 +01:00
streamconv Bug 1433958 - Change code that sets nsIURI.password to use nsIURIMutator r=mayhemer 2018-02-26 20:43:46 +01:00
system Bug 1394734 - Replace CONFIG['CLANG*'] by CONFIG['CC_TYPE'] r=glandium 2017-12-07 22:09:38 +01:00
test Bug 1442465 - Part 4.2: Stop unnecessarily awaiting on BrowserTestUtils.removeTab (simple part). r=dao 2018-03-19 11:16:45 +09:00
wifi Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
moz.build
necko-config.h.in Bug 1391467 - Remove --enable-necko-protocols. r=gps,valentin 2017-08-17 17:30:57 -07:00