Commit Graph

25 Commits

Author SHA1 Message Date
Landry Breuil
aa545e34c8 Bug 1457092 - Implement sandboxing on OpenBSD. r=gcp, r=jld
Add StartOpenBSDSandbox method calling pledge() syscall,
and use it where we're sandboxing processes.

The pledge subsets are coming from two new prefs:
- security.sandbox.pledge.content for the content process
- security.sandbox.pledge.main for the main process

--HG--
extra : rebase_source : 60da70e2d335755fda6126a6b7de7aad41eebb7e
2018-08-23 07:35:00 -04:00
Haik Aftandilian
946187d684 Bug 1475722 - Mac Flash sandbox causes empty file upload dialogs on OS X 10.9, 10.10 r=Alex_Gaynor
On 10.9 and 10.10, grant global read access to the Flash sandbox.

Change Flash sandbox levels by adding a new level 1 that includes
global read access which will be the default on 10.9/10.10.
Level 2 is the new default for 10.11 and above with file read
access enabled by file dialog activity.

MozReview-Commit-ID: LvXhd6Vf7mo

--HG--
extra : rebase_source : 946f89937e5bb4506fd6bc8b2c050c86a8b29cc8
2018-07-17 17:30:44 -07:00
Haik Aftandilian
331dda9367 Bug 1444291 - Part 3 - Add read access to the Mac Flash sandbox, support sandbox levels r=Alex_Gaynor
Replace the boolean pref "security.sandbox.mac.flash.enabled"
with "dom.ipc.plugins.sandbox-level.flash" to support sandbox
levels and be consistent with the Windows pref name.

Adds filesystem read access to the sandbox using sandbox extensions
granted by the file dialog machinery (level 1).

Add support for level 2 which blocks read access.

Allow the sandbox to be disabled with MOZ_DISABLE_NPAPI_SANDBOX.


MozReview-Commit-ID: 4rfobEoxQpF

--HG--
extra : rebase_source : 05dc54b46063967e959bc3fced21c61e5463de48
2018-03-15 20:23:19 -07:00
Coroiu Cristina
62bb56ad86 Backed out 3 changesets (bug 1444291) for bustage at build/src/dom/plugins/ipc/PluginProcessChild.cpp
Backed out changeset 48a9c2131347 (bug 1444291)
Backed out changeset dfc31b6c9f53 (bug 1444291)
Backed out changeset 8ee3e65465ed (bug 1444291)
2018-03-16 03:07:35 +02:00
Haik Aftandilian
3aaa8d9f78 Bug 1444291 - Part 3 - Add read access to the Mac Flash sandbox, support sandbox levels r=Alex_Gaynor
Replace the boolean pref "security.sandbox.mac.flash.enabled"
with "dom.ipc.plugins.sandbox-level.flash" to support sandbox
levels and be consistent with the Windows pref name.

Adds filesystem read access to the sandbox using sandbox extensions
granted by the file dialog machinery (level 1).

Add support for level 2 which blocks read access.

Allow the sandbox to be disabled with MOZ_DISABLE_NPAPI_SANDBOX.


MozReview-Commit-ID: 4rfobEoxQpF

--HG--
extra : rebase_source : 87f2f00867c4522ae3102abbc44fd05db63c7ec7
2018-03-13 15:38:11 -07:00
Jed Davis
6c8bcd4625 Bug 1440206 - Allow brokered access to a subset of connect() in the Linux content sandbox. r=gcp
This is to support WebGL with hybrid graphics drivers that connect to
a secondary X server for GL (Primus and VirtualGL), without allowing
access to arbitrary sockets.  In addition to local X11 connections,
Primus needs to connect to the Bumblebee daemon (otherwise it will exit
the calling process).

The broker support is limited to AF_UNIX, to non-datagram sockets (see
bug 1066750), and to pathname addresses.  Abstract addresses could
theoretically be handled but there isn't currently a compelling reason
to, and the broker very much assumes it's dealing with a C-style string
referring to a filesystem path and not an arbitrary byte sequence
(including NULs).

At a higher level: If the GPU X server is remote then it won't work,
but it won't work anyway because WebGL requires features that aren't
supported by indirect GLX.  If the GPU X server is local but the browser
is inside a chroot, it will fail to connect unless /tmp/.X11-unix is
bind-mounted into the chroot; hopefully this use case is not common.

MozReview-Commit-ID: IvI2jYDRZZ2
2018-03-09 19:31:23 -07:00
Jed Davis
6d88e1e82d Bug 1438391 - Detect VirtualGL and weaken the sandbox enough for it to work. r=gcp
MozReview-Commit-ID: BXmm8JSfkeI

--HG--
extra : rebase_source : 7e56f39df23fa4cc2ad0e38702f8ad6353d74e69
2018-02-22 19:14:41 -07:00
Jed Davis
a739b10fb9 Bug 1126437 - Add Linux content sandbox level 4 for blocking socket APIs. r=gcp
Level 4 is now the default unless audio remoting (media.cubeb.sandbox pref) is disabled.

MozReview-Commit-ID: 4jUgiZnJImt
2018-01-23 22:35:44 -07:00
Gian-Carlo Pascutto
61cf15cc85 Bug 1297740. r=jld 2018-01-08 10:07:16 +01:00
Coroiu Cristina
ebae541f60 Backed out 1 changesets (bug 1297740) for mingw32 build failure at src/ipc/chromium/src/base/process_util_win.cc r=backout on a CLOSED TREE
Backed out changeset e2501f2e295e (bug 1297740)
2018-01-06 00:59:25 +02:00
Gian-Carlo Pascutto
3178a4003d Bug 1297740. r=jld
--HG--
extra : rebase_source : 1d7bd987eed365bf442ed7eb856d8413af3205dc
2018-01-04 15:37:33 +01:00
Csoregi Natalia
c88d4f8c83 Backed out changeset 3bdd7743f057 (bug 1297740) for Build Bustage. r=backout on a CLOSED TREE 2017-12-21 16:21:48 +02:00
Gian-Carlo Pascutto
6821480454 Bug 1297740. r=jld
--HG--
extra : rebase_source : 5531d3902fc5916d9d205ed13d7d5c062bef8b27
2017-12-07 16:36:10 +01:00
Alex Gaynor
af821e1fe3 Bug 1365257 - Further consolidate the configuration of the content sandbox; r=gcp
This patch moves handling of the "MOZ_DISABLE_CONTENT_SANDBOX" environment
variable into GetEffectiveContentSandboxLevel. It also introduces
IsContentSandboxEnabled and ports many users of GetEffectiveContentSandboxLevel
to use it.

MozReview-Commit-ID: 4CsOf89vlRB

--HG--
extra : rebase_source : b9130f522e860e6a582933799a9bac07b771139b
2017-06-01 10:38:22 -04:00
shindli
897ae925f7 Backed out 1 changesets (bug 1365257) for failing gl in \build\build\src\obj-firefox\dist\include\mozilla/ServoStyleSet.h:97 r=backout on a CLOSED TREE
Backed out changeset 00edc1ac58f9 (bug 1365257)

--HG--
extra : rebase_source : d33f3bba71d1899e0f4a5051369c240e00ea42fe
2017-11-10 19:23:58 +02:00
Alex Gaynor
31e67fc86a Bug 1365257 - Further consolidate the configuration of the content sandbox; r=gcp
This patch moves handling of the "MOZ_DISABLE_CONTENT_SANDBOX" environment
variable into GetEffectiveContentSandboxLevel. It also introduces
IsContentSandboxEnabled and ports many users of GetEffectiveContentSandboxLevel
to use it.

MozReview-Commit-ID: 4CsOf89vlRB

--HG--
extra : rebase_source : 10234bd7d837eae8dc915e4a0c0a37040fd0a280
2017-06-01 10:38:22 -04:00
Haik Aftandilian
f73b286d2a Bug 1386832 - Part 1 - Move non-sandbox-specific routines out of SandboxSettings. r=jimm
Moves IsDevelopmentBuild(), GetRepoDir(), and GetObjectDir() out of
SandboxSettings because they also need to be used by ExtensionProtocolHandler
to do security checks on developer builds as a result of how developer builds
rely on symlinks to the repo dir from system extension directories.

Remove the Linux-implementation of GetRepoDir() and GetObjectDir()
because the Linux content sandbox implementation and the
ExtensionProtocolHandler checks don't need them.

MozReview-Commit-ID: KwBFUnh6Cml

--HG--
extra : rebase_source : 3529a18ea802699ff968b798a7c560613469809b
2017-08-09 16:09:55 -07:00
Haik Aftandilian
7f9d32b10e Bug 1384153 - Artifact and local builds crashing content tabs on latest autoland to m-c merge. r=spohl
MozReview-Commit-ID: 6xHFTCXVgr7

--HG--
extra : rebase_source : b74fd0f4cece68bbf3f251c533d7b239cbc7e7ee
2017-07-26 22:47:10 -07:00
Haik Aftandilian
ef16b0fcf8 Bug 1380690 - Part 2 - Whitelist repo and object dirs using paths from the Info.plist files. r=Alex_Gaynor,spohl
On Mac developer builds, read the repo path and object dir path from the
Info.plist files in the application bundle instead of the
MOZ_DEVELOPER_REPO_DIR and MOZ_DEVELOPER_OBJ_DIR environment variables.

MozReview-Commit-ID: 8UtjkNPGUM1

--HG--
extra : rebase_source : 3e4ce32f2e2c40f8d899bc9190e48298081458d9
2017-07-19 09:16:09 -07:00
Gian-Carlo Pascutto
84f7ba492b Bug 1377614 - Part 1 - Move IsDevelopmentBuild() to common code. r=Alex_Gaynor
MozReview-Commit-ID: AcO0XaMS4Gp

--HG--
extra : rebase_source : ec40a94545fa78ce0210a0614db82b7bcb7e8a97
2017-07-03 11:17:04 -07:00
Sebastian Hengst
8b1992d948 Backed out changeset 9137ed21a66f (bug 1377614) for bustage: not finding mozilla/SandboxSettings.h at netwerk/protocol/res/ExtensionProtocolHandler.cpp:46. r=backout 2017-07-05 22:51:58 +02:00
Gian-Carlo Pascutto
2032eb5262 Bug 1377614 - Part 1 - Move IsDevelopmentBuild() to common code. r=Alex_Gaynor
MozReview-Commit-ID: AcO0XaMS4Gp

--HG--
extra : rebase_source : 2fa012f693ad7855c2c6e7b8399edf3c0e734299
2017-07-03 11:17:04 -07:00
Alex Gaynor
d27dc0ba0b Bug 1358223 - Part 1 - On Windows and macOS hardcode the minimum content sandbox level at 1. r=bobowen,haik,jimm
If the "security.sandbox.content.level" preference is set to a value less than
1, all consumers will automatically treat it as if it were level 1. On Linux and
Nightly builds, setting the sandbox level to 0 is still allowed, for now.

MozReview-Commit-ID: 9QNTCkdbTfm

--HG--
extra : rebase_source : cd5a853c46a5cd334504b339bef8df30a3cabe51
2017-05-12 17:04:42 -04:00
Sebastian Hengst
fd03aa5bc8 Backed out changeset 4e283b54baa6 (bug 1358223) for build bustage on Android at dom/ipc/ContentChild.cpp:21. r=backout 2017-05-31 21:34:13 +02:00
Alex Gaynor
39f34ea898 Bug 1358223 - Part 1 - On Windows and macOS hardcode the minimum content sandbox level at 1. r=bobowen,haik,jimm
If the "security.sandbox.content.level" preference is set to a value less than
1, all consumers will automatically treat it as if it were level 1. On Linux and
Nightly builds, setting the sandbox level to 0 is still allowed, for now.

MozReview-Commit-ID: 9QNTCkdbTfm

--HG--
extra : rebase_source : 1a26ffc5b9f80e6df4c37c23f506e907ba44053a
2017-05-12 17:04:42 -04:00