Commit Graph

1187 Commits

Author SHA1 Message Date
Tom Ritter
01f7b56cf8 Bug 1552706 - Update MinGW version and remove MinGW sandbox hacks r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D36218

--HG--
extra : moz-landing-system : lando
2019-06-28 09:53:12 +00:00
Aaron Klotz
6d7a4fd701 Bug 1553249: Only set the Win32k disable policy for the RDD process when running on Win8+; r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D36239

--HG--
extra : moz-landing-system : lando
2019-06-28 09:44:03 +00:00
Jed Davis
d32b9ba525 Bug 1534780 - Add free interconversion between UniqueFileHandle and ipc::FileDescriptor and use it in a few places. r=froydnj
Now that UniqueFileHandle can be used more widely, and with
ipc::FileDescriptor being essentially a copyable UniqueFileHandle, it
makes sense to add a move constructor and a "forget"-like method to
convert between them when needed.

Depends on D26737

Differential Revision: https://phabricator.services.mozilla.com/D26738

--HG--
extra : moz-landing-system : lando
2019-06-20 22:40:15 +00:00
Ciure Andrei
72f3f971fb Backed out 15 changesets (bug 1479960, bug 1426526, bug 1534780, bug 1536697) for causing build bustages CLOSED TREE
Backed out changeset 5645e0cc3915 (bug 1479960)
Backed out changeset a7c09894c6a0 (bug 1536697)
Backed out changeset 510f03381af9 (bug 1426526)
Backed out changeset 7cf4735a088f (bug 1426526)
Backed out changeset 41080844e645 (bug 1479960)
Backed out changeset fdba3c5f8fd0 (bug 1479960)
Backed out changeset 26a8ebcb2db4 (bug 1479960)
Backed out changeset d0d383e5bae1 (bug 1479960)
Backed out changeset c418095bb7b7 (bug 1479960)
Backed out changeset 7b78b1945532 (bug 1479960)
Backed out changeset c47d47d4073d (bug 1479960)
Backed out changeset 71253b62a633 (bug 1479960)
Backed out changeset ae525f20bdbb (bug 1479960)
Backed out changeset 7fba719355d7 (bug 1534780)
Backed out changeset 771db331860a (bug 1534780)
2019-06-20 19:54:57 +03:00
Jed Davis
f32394bec8 Bug 1534780 - Add free interconversion between UniqueFileHandle and ipc::FileDescriptor and use it in a few places. r=froydnj
Now that UniqueFileHandle can be used more widely, and with
ipc::FileDescriptor being essentially a copyable UniqueFileHandle, it
makes sense to add a move constructor and a "forget"-like method to
convert between them when needed.

Depends on D26737

Differential Revision: https://phabricator.services.mozilla.com/D26738

--HG--
extra : moz-landing-system : lando
2019-06-17 02:19:37 +00:00
Haik Aftandilian
d302444d67 Bug 1498742 - Part 2 - Start the GMP sandbox earlier during process startup r=jya,cpearce
Change the Mac GMP process launch to include sandboxing params on the command line to allow the sandbox to be started earlier during GMP process launch. Content, extension, and RDD processes have already been changed to start the sandbox earlier.

Update GMPProcessParent to override GeckoChildProcessHost methods used to construct sandboxing parameters. Pass the plugin path as a sandbox parameter so that the sandbox rules can whitelist the plugin directory which is now read after the sandbox is enabled in the plugin process. On development builds, pass "testingReadPath" params so directories needed during automated tests can be whitelisted.

Update Mac sandboxing code to detect GMP sandbox params on the command line and enable the sandbox with additional arguments needed for early sandbox start.

Allow reverting to the old implementation by setting security.sandbox.gmp.mac.earlyinit to false.

Differential Revision: https://phabricator.services.mozilla.com/D34085

--HG--
extra : moz-landing-system : lando
2019-06-14 22:55:27 +00:00
Dorel Luca
fb616d00a6 Backed out 2 changesets (bug 1498742) for OSX build bustages. CLOSED TREE
Backed out changeset f6da94d90350 (bug 1498742)
Backed out changeset 4f3e83d8de59 (bug 1498742)
2019-06-15 00:13:05 +03:00
Haik Aftandilian
c0874f2dba Bug 1498742 - Part 2 - Start the GMP sandbox earlier during process startup r=jya,cpearce
Change the Mac GMP process launch to include sandboxing params on the command line to allow the sandbox to be started earlier during GMP process launch. Content, extension, and RDD processes have already been changed to start the sandbox earlier.

Update GMPProcessParent to override GeckoChildProcessHost methods used to construct sandboxing parameters. Pass the plugin path as a sandbox parameter so that the sandbox rules can whitelist the plugin directory which is now read after the sandbox is enabled in the plugin process. On development builds, pass "testingReadPath" params so directories needed during automated tests can be whitelisted.

Update Mac sandboxing code to detect GMP sandbox params on the command line and enable the sandbox with additional arguments needed for early sandbox start.

Allow reverting to the old implementation by setting security.sandbox.gmp.mac.earlyinit to false.

Differential Revision: https://phabricator.services.mozilla.com/D34085

--HG--
extra : moz-landing-system : lando
2019-06-14 20:12:01 +00:00
Bogdan Tara
d62176d3d7 Backed out 2 changesets (bug 1498742) for nsMacUtilsImpl.cpp related build bustage a=backout
Backed out changeset 6729dc168afd (bug 1498742)
Backed out changeset e5eed57a9111 (bug 1498742)
2019-06-14 12:50:04 +03:00
Haik Aftandilian
f87e72036e Bug 1498742 - Part 2 - Start the GMP sandbox earlier during process startup r=jya,cpearce
Change the Mac GMP process launch to include sandboxing params on the command line to allow the sandbox to be started earlier during GMP process launch. Content, extension, and RDD processes have already been changed to start the sandbox earlier.

Update GMPProcessParent to override GeckoChildProcessHost methods used to construct sandboxing parameters. Pass the plugin path as a sandbox parameter so that the sandbox rules can whitelist the plugin directory which is now read after the sandbox is enabled in the plugin process. On development builds, pass "testingReadPath" params so directories needed during automated tests can be whitelisted.

Update Mac sandboxing code to detect GMP sandbox params on the command line and enable the sandbox with additional arguments needed for early sandbox start.

Allow reverting to the old implementation by setting security.sandbox.gmp.mac.earlyinit to false.

Differential Revision: https://phabricator.services.mozilla.com/D34085

--HG--
extra : moz-landing-system : lando
2019-06-13 06:32:37 +00:00
Andreea Pavel
307e3f181b Backed out 2 changesets (bug 1498742) for build bustages at GMPProcessParent.cpp on a CLOSED TREE
Backed out changeset 5f9d32e26c71 (bug 1498742)
Backed out changeset ffc8d151cf3a (bug 1498742)
2019-06-13 04:38:56 +03:00
Haik Aftandilian
0f858863b6 Bug 1498742 - Part 2 - Start the GMP sandbox earlier during process startup r=jya,cpearce
Change the Mac GMP process launch to include sandboxing params on the command line to allow the sandbox to be started earlier during GMP process launch. Content, extension, and RDD processes have already been changed to start the sandbox earlier.

Update GMPProcessParent to override GeckoChildProcessHost methods used to construct sandboxing parameters. Pass the plugin path as a sandbox parameter so that the sandbox rules can whitelist the plugin directory which is now read after the sandbox is enabled in the plugin process. On development builds, pass "testingReadPath" params so directories needed during automated tests can be whitelisted.

Update Mac sandboxing code to detect GMP sandbox params on the command line and enable the sandbox with additional arguments needed for early sandbox start.

Allow reverting to the old implementation by setting security.sandbox.gmp.mac.earlyinit to false.

Differential Revision: https://phabricator.services.mozilla.com/D34085

--HG--
extra : moz-landing-system : lando
2019-06-12 23:41:53 +00:00
Haik Aftandilian
a195f66f52 Bug 1498742 - Part 1 - Move GetRepoDir(), GetObjDir(), IsDevelopmentBuild() from ContentChild to nsMacUtilsImpl r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D34084

--HG--
extra : moz-landing-system : lando
2019-06-12 23:41:39 +00:00
Bob Owen
0162cd1ed7 Bug 1552160 Part 2: Roll-up patch to apply remaining mozilla changes to chromium sandbox. r=tabraldes,aklotz,jimm,bobowen
Patches re-applied from security/sandbox/chromium-shim/patches/after_update/.
See patch files for additional commit comments.
2014-11-29 17:12:18 +00:00
Bob Owen
2cad8de361 Bug 1552160 Part 1: Roll-up of chromium sandbox update and mozilla patches to get a running browser. r=jld,aklotz,tjr,bobowen
This updates security/sandbox/chromium/ files to chromium commit 84108231f6e6e0772fb9a4643679ce76aa771e67.

Existing and new patches applied from security/sandbox/chromium-shim/patches/with_update/ to give a compiling and mostly working browser.
See patch files for additional commit comments.

--HG--
rename : security/sandbox/chromium-shim/base/debug/debugging_flags.h => security/sandbox/chromium-shim/base/debug/debugging_buildflags.h
rename : security/sandbox/chromium-shim/base/win/base_features.h => security/sandbox/chromium-shim/base/win/base_win_buildflags.h
2019-06-12 11:10:48 +01:00
Gian-Carlo Pascutto
84108d4e2b Bug 1555589 - Include sys/prctl.h not linux/prctl.h. r=jld
Differential Revision: https://phabricator.services.mozilla.com/D33517

--HG--
extra : moz-landing-system : lando
2019-06-03 21:35:44 +00:00
Sylvestre Ledru
d57d4905f1 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D30883

--HG--
extra : moz-landing-system : lando
2019-05-25 17:46:15 +00:00
arthur.iakab
af8e458c5f Backed out changeset a296439a25ff (bug 1519636) for frequent Windows cppunit failures CLOSED TREE 2019-05-24 14:26:01 +03:00
Sylvestre Ledru
c82ea97226 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D30883

--HG--
extra : moz-landing-system : lando
2019-05-24 09:59:17 +00:00
David Major
6efaa8b1cd Bug 1523526 - Don't allow CFG on old releases of Windows for arm64 r=bobowen,aklotz
There's a bug in ole32.dll on arm64 versions of Windows prior to 1809, that crashes our content processes if we enable CFG. We've reported the issue, but even if it gets fixed, we can't assume users will have the update.

This patch uses process mitigation policy flags to disable CFG on arm64 before 1809. Based on testing, we only need to do this in the sandbox for child processes, and it's not strictly necessary for the launcher stub to set the flag on the main process. But I've included that anyway as a guard against some yet-undiscovered scenario that might hit the issue and make the browser unusable.

The effects of this patch won't be visible until we actually enable CFG in a subsequent landing.

Differential Revision: https://phabricator.services.mozilla.com/D29474

--HG--
extra : moz-landing-system : lando
2019-05-20 17:25:30 +00:00
Coroiu Cristina
55a63d1520 Backed out 2 changesets (bug 1523526, bug 1526443) for Be bustage on Windows AArch on a CLOSED TREE
Backed out changeset 98013639d600 (bug 1526443)
Backed out changeset e8ac4b512f9d (bug 1523526)
2019-05-20 20:21:56 +03:00
David Major
250aff00e7 Bug 1523526 - Don't allow CFG on old releases of Windows for arm64 r=bobowen,aklotz
There's a bug in ole32.dll on arm64 versions of Windows prior to 1809, that crashes our content processes if we enable CFG. We've reported the issue, but even if it gets fixed, we can't assume users will have the update.

This patch uses process mitigation policy flags to disable CFG on arm64 before 1809. Based on testing, we only need to do this in the sandbox for child processes, and it's not strictly necessary for the launcher stub to set the flag on the main process. But I've included that anyway as a guard against some yet-undiscovered scenario that might hit the issue and make the browser unusable.

The effects of this patch won't be visible until we actually enable CFG in a subsequent landing.

Differential Revision: https://phabricator.services.mozilla.com/D29474

--HG--
extra : moz-landing-system : lando
2019-05-07 18:37:13 +00:00
Nathan Froyd
279e2583b7 Bug 1551698 - disable PGO on some low-level windows files; r=dmajor
PGO instrumentation interacts badly with this code, and it's not crucial
that this code be lightning fast.

Differential Revision: https://phabricator.services.mozilla.com/D31131

--HG--
extra : moz-landing-system : lando
2019-05-15 13:00:39 +00:00
Haik Aftandilian
45bb7b8823 Bug 1546544 - Enable TCSM r=asuth,spohl,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D29046

--HG--
extra : moz-landing-system : lando
2019-05-07 22:16:14 +00:00
arthur.iakab
62df572c1c Backed out 2 changesets (bug 1546544) for causing mochitest-chrome test failures on automation.py CLOSED TREE
Backed out changeset d4b67960c0f9 (bug 1546544)
Backed out changeset fda45db5f8e9 (bug 1546544)
2019-05-07 05:38:37 +03:00
Haik Aftandilian
cd1c25bb79 Bug 1546544 - Enable TCSM r=asuth,spohl,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D29046

--HG--
extra : moz-landing-system : lando
2019-05-06 06:09:10 +00:00
Haik Aftandilian
b59a99943d Bug 1548406 - Part 2 - Conditionally include WindowServer access in the GMP sandbox r=handyman
Conditionally include WindowServer access in the GMP sandbox so that it is only allowed for the Widevine CDM plugin, and not OpenH264.

Differential Revision: https://phabricator.services.mozilla.com/D29586

--HG--
extra : moz-landing-system : lando
2019-05-02 07:04:58 +00:00
Haik Aftandilian
58067ff840 Bug 1548406 - Part 1 - Simplify MacSandboxInfo and sandbox type enums r=handyman
Replace the MacSandboxType_Plugin sandbox type with MacSandboxType_Flash and MacSandboxType_GMP so that there is a 1:1 association between MacSandboxType values and sandbox policies.

Remove the MacSandboxPluginType enum. Instead of having different MacSandboxPluginTypes, we will just have MacSandboxType_GMP. We only use GMP for two plugin types, Widevine and OpenH264, and they only differ in that Widevine requires accss to the WindowServer.

Remove the MacSandboxPluginInfo struct and move the two needed fields pluginPath and pluginBinaryPath to MacSandboxInfo.

Differential Revision: https://phabricator.services.mozilla.com/D29585

--HG--
extra : moz-landing-system : lando
2019-05-02 07:04:44 +00:00
Sylvestre Ledru
e226046cb8 Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

Differential Revision: https://phabricator.services.mozilla.com/D28956

--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00:00
Aaron Klotz
e2d5d8d13f Bug 1535704: Part 3 - Add an observer to sandboxTarget that fires once the main thread's token has been lowered; r=bobowen
This allows us to loosen the coupling between the sandbox and code that needs
to run as soon as the token has been lowered.

We use std::list here because the observer service is not yet initialized.

Differential Revision: https://phabricator.services.mozilla.com/D28392

--HG--
extra : moz-landing-system : lando
2019-04-23 17:16:38 +00:00
Aaron Klotz
70900309f0 Bug 1535704: Part 2 - Add a hook to sandbox target initialization that catches mscom's attempts to resolve user32 when Win32k lockdown is enabled; r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D27833

--HG--
extra : moz-landing-system : lando
2019-04-22 21:38:36 +00:00
Haik Aftandilian
59576e83d0 Bug 1546836 - Video Playback and Form Rendering Issues on macOS Version 10.14.5 Beta r=jmathies
Allow access to Apple's Metal shader language compiler in our content process sandbox. Limit the sandbox policy change to 10.14 and newer OS versions to reduce risk given that problems have only been reported on 10.14.5.

Differential Revision: https://phabricator.services.mozilla.com/D28904

--HG--
extra : moz-landing-system : lando
2019-04-26 16:28:06 +00:00
Sylvestre Ledru
a1dce6440a Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D28329

--HG--
extra : moz-landing-system : lando
2019-04-22 16:35:03 +00:00
Jed Davis
64717a0c9f Bug 1543790 - Fix RDD sandboxing conditions so the parent and child processes agree. r=gcp
If the system doesn't support seccomp-bpf, the parent process won't
try to set up sandboxing, but the child process has a separate check that
didn't test for this, and ends up failing a release assertion (in
SandboxReporterClient, but we also release-assert that installing the
seccomp-bpf policy succeeds).

This patch just fixes the child-side conditional to match the intended
behavior, but in the long term we should consider redesigning SandboxInfo
to avoid this.

Differential Revision: https://phabricator.services.mozilla.com/D27624

--HG--
extra : moz-landing-system : lando
2019-04-16 13:53:20 +00:00
Jed Davis
69140d1e65 Bug 1543858 - Adjust Linux sandbox policies to tolerate glibc's qsort. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D27632

--HG--
extra : moz-landing-system : lando
2019-04-16 06:50:50 +00:00
Aaron Klotz
2484ee1608 Bug 1503538: Part 5 - Add static DLL dependency blocking to SandboxBroker; r=bobowen
Depends on D27146

Differential Revision: https://phabricator.services.mozilla.com/D27147

--HG--
extra : moz-landing-system : lando
2019-04-12 09:47:13 +00:00
Jonathan Kew
c48e7d41b9 Bug 1542773 - Make the mac font activation/sandbox test (browser_bug1393259.js) more robust. r=haik
When the test font is activated, the notification of the font configuration change
may be handled asynchronously by content processes, so that it's possible the content
process has not yet handled the update at the point when registerFont() detects the
change and returns to the test script.

(This issue becomes more acute with the upcoming shared-font-list system, where the
OS notification is not handled by the content process at all; it's only handled by
the parent process, which then notifies content processes *after* it has updated the
font list. So there's an inherent latency between the update being recognized by the
chrome process - and therefore "ready" as far as the test script is concerned - and
content processes receiving and handling the change.)

To handle this, we can explicitly wait for the width of the rendered content to change,
which will indicate that the font configuration change has been handled by the content
process.

Differential Revision: https://phabricator.services.mozilla.com/D26570

--HG--
extra : moz-landing-system : lando
2019-04-09 16:56:06 +00:00
Haik Aftandilian
2abd1f81a6 Bug 1541230 - Part 2 - Add /System/Library read access to the utility sandbox r=Alex_Gaynor
Allow read access to /System/Library for accessing system libraries.

Depends on D26397

Differential Revision: https://phabricator.services.mozilla.com/D26626

--HG--
extra : moz-landing-system : lando
2019-04-09 12:51:18 +00:00
Bob Owen
3761608ad2 Bug 1534196: Correct return values from failed brokering. r=jmathies 2019-04-08 08:54:27 +01:00
Sylvestre Ledru
03fc65347c Bug 1542146 - Apply the change with the option StatementMacros from clang-format-8 r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26280

--HG--
extra : moz-landing-system : lando
2019-04-05 21:42:17 +00:00
Sylvestre Ledru
03c8e8c2dd Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26098

--HG--
extra : moz-landing-system : lando
2019-04-05 21:41:42 +00:00
Csoregi Natalia
ba58e936bd Backed out changeset 4ad80127f89f (bug 1519636) for bustage on MarkupMap.h and nsAccessibilityService.cpp. CLOSED TREE 2019-04-05 09:48:19 +03:00
Sylvestre Ledru
d1c1878603 Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26098

--HG--
extra : moz-landing-system : lando
2019-04-04 21:36:16 +00:00
Narcis Beleuzu
24dbe577a5 Backed out changeset 389b6bbd76db (bug 1519636) for bustages on MarkupMap.h . CLOSED TREE 2019-04-05 00:27:56 +03:00
Sylvestre Ledru
399dbd28fe Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26098

--HG--
extra : moz-landing-system : lando
2019-04-04 20:12:23 +00:00
Haik Aftandilian
f357396a1e Bug 1541272 - Mac Utility sandbox profile missing crash reporter port allow rule r=Alex_Gaynor
Add the crash reporter port to the utility process sandbox so that crash reports can be saved for processes using the utility sandbox with early sandbox init.

At this time, the RDD process is the only process using the utility sandbox.

Differential Revision: https://phabricator.services.mozilla.com/D26228

--HG--
extra : moz-landing-system : lando
2019-04-04 19:59:25 +00:00
Haik Aftandilian
f7082591a7 Bug 1540892 - [Mac] Don't #include policy definition headers in mac/Sandbox.h r=Alex_Gaynor
Move sandbox policy includes to Sandbox.mm.

Differential Revision: https://phabricator.services.mozilla.com/D25691

--HG--
extra : moz-landing-system : lando
2019-04-02 12:59:46 +00:00
Gian-Carlo Pascutto
d0f1336b84 Bug 1535794 - Allow getrandom() in all sandbox policies. r=jld
Differential Revision: https://phabricator.services.mozilla.com/D25610

--HG--
extra : moz-landing-system : lando
2019-04-02 12:37:58 +00:00
Gian-Carlo Pascutto
4f54fd166f Bug 1536137 - Add getrusage to RDD policy. r=jld
Depends on D24190

Differential Revision: https://phabricator.services.mozilla.com/D25621

--HG--
extra : moz-landing-system : lando
2019-04-01 16:10:05 +00:00
Gian-Carlo Pascutto
9261673631 Bug 1536127 - Add F_SETFD/CLOEXEC logic to RDD process. r=jld
Differential Revision: https://phabricator.services.mozilla.com/D24190

--HG--
extra : moz-landing-system : lando
2019-04-01 16:10:07 +00:00