Commit Graph

1085 Commits

Author SHA1 Message Date
Mark Banner
0304564ac7 Bug 1415483 - Apply the new options to reject-importGlobalProperties across the codebase, remove unnecessary importGlobalProperties. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D13754

--HG--
extra : moz-landing-system : lando
2018-12-11 21:39:40 +00:00
Michael Froman
d385314704 Bug 1513101 - re-add L section for HANDLES_DUP_BROKER to RDD Win sanbox to fix mochitest crashes. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D14109

--HG--
extra : moz-landing-system : lando
2018-12-11 18:50:21 +00:00
Csoregi Natalia
9e970681f2 Backed out 2 changesets (bug 1415483) for multiple failures e.g. on test_message_manager_ipc.html. CLOSED TREE
Backed out changeset d00748de66fc (bug 1415483)
Backed out changeset 8dea94258f54 (bug 1415483)
2018-12-11 19:30:57 +02:00
Mark Banner
1abdc8687f Bug 1415483 - Apply the new options to reject-importGlobalProperties across the codebase, remove unnecessary importGlobalProperties. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D13754

--HG--
extra : moz-landing-system : lando
2018-12-11 14:09:44 +00:00
Gian-Carlo Pascutto
d8bb24d28e Bug 1507830 - When using Wayland, don't allow connections to the X server. r=jld
Differential Revision: https://phabricator.services.mozilla.com/D13560

--HG--
extra : moz-landing-system : lando
2018-11-30 22:23:31 +00:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Michael Froman
b6e960b34c Bug 1498624 - pt2 - Implement Win sandbox for RDD process. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D13101

--HG--
extra : moz-landing-system : lando
2018-11-29 17:02:16 +00:00
Sylvestre Ledru
ef05004811 Bug 1503537 - Get rid of the pdfium & mortar code r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D10352

--HG--
extra : moz-landing-system : lando
2018-11-28 19:31:21 +00:00
Jed Davis
e9397cfcac Bug 1508898 - Prepare the Linux sandbox's socketcall/ipc-call dispatch table for reformatting. r=gcp
The tables in SandboxFilterUtil.cpp should remain vertically aligned,
but clang-format would disagree.  This patch excludes that region from
reformatting, and applies the other changes that clang-format would make
there.

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

--HG--
extra : moz-landing-system : lando
2018-11-21 11:05:31 +00:00
Haik Aftandilian
b890a6606e Bug 1506776 - 17.78% Base Content Resident Unique Memory regression r=Alex_Gaynor
Until more analysis is done, add back access to com.apple.CoreServices.coreservicesd to avoid extra allocations that are triggered when the service is blocked.

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

--HG--
extra : moz-landing-system : lando
2018-11-20 22:06:06 +00:00
Alex Gaynor
bef9ade569 Bug 1428361 - remove some 'on by default' permissions from the macOS plugin sandbox; r=haik
Differential Revision: https://phabricator.services.mozilla.com/D11892

--HG--
extra : moz-landing-system : lando
2018-11-14 16:46:05 +00:00
Sylvestre Ledru
2b4847d320 Bug 1506538 - Remove +x permissions on C++ source files r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D11609

--HG--
extra : moz-landing-system : lando
2018-11-13 15:32:08 +00:00
Haik Aftandilian
b1a4ba8dff Bug 1505445 - [Mac] With sandbox early startup, start the sandbox after the port exchange r=Alex_Gaynor
Don't start the sandbox until after the port exchange so the parent process does not have to wait longer in ContentParent::LaunchSubprocess() for the (expensive) sandbox_init_with_parameters call to complete in the child. Remove the policy rule allowing access to the parent port now that it is already open when the sandbox is initialized and therefore not needed.

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

--HG--
extra : moz-landing-system : lando
2018-11-08 21:04:19 +00:00
Tom Ritter
24a82c667b Bug 1504022 - Backout 1498693 to restore mingw exceptions for __try/__except r=bobowen
mingw-clang, when using SEH exceptions, compile these fine but don't unwind
them properly. When using sj/lj exceptions it can't compile them at all.

--HG--
extra : histedit_source : 4bda121d4d60ab6e7cf51a3d4287261c81904fe2
2018-11-02 13:06:24 -05:00
Haik Aftandilian
2ca07b2f4a Bug 1502228 - [Mac] With sandbox early startup enabled, some form elements are not rendered r=Alex_Gaynor
Add the /private/var directory to the list of file-read-metadata paths to avoid rendering issues on macOS 10.14 when sandbox early startup is enabled.

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

--HG--
extra : moz-landing-system : lando
2018-10-26 18:51:37 +00:00
Haik Aftandilian
49e56fe77b Bug 1431441 - Part 5 - Parameterize access to the windowserver in the Mac content sandbox policy r=Alex_Gaynor
Only allow access to "com.apple.windowserver.active" when the pref
"security.sandbox.content.mac.disconnect-windowserver" is set to true.

Depends on D6721

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

--HG--
extra : moz-landing-system : lando
2018-10-18 20:49:51 +00:00
Haik Aftandilian
cf8dfa28d7 Bug 1431441 - Part 4 - ASSERT the sandbox is already enabled r=Alex_Gaynor
When early initialization of the sandbox is enabled, assert that the sandbox has already been enabled in ContentProcess::Init().

Depends on D6720

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

--HG--
extra : moz-landing-system : lando
2018-10-18 20:47:43 +00:00
Haik Aftandilian
81b56d13a8 Bug 1431441 - Part 3 - Start the Mac content sandbox earlier r=Alex_Gaynor
Pass sandbox parameters to content processes on the command line allowing for early sandbox startup.

Pref'd off behind "security.sandbox.content.mac.earlyinit" until it's ready to be enabled by default.

Once early startup is enabled by default and considered stable, the original sandbox startup code can be removed.

Depends on D6719

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

--HG--
extra : moz-landing-system : lando
2018-10-19 18:23:16 +00:00
Haik Aftandilian
851ee0f677 Bug 1431441 - Part 2 - Remove rules for APP_BINARY_PATH and APP_DIR Mac sandbox parameters r=Alex_Gaynor
Simplify the content sandbox policy by removing APP_BINARY_PATH and APP_DIR Mac sandbox parameters and their associated rules in the policy. Keep APP_PATH which is a parent directory of APP_BINARY_PATH and APP_DIR. Change APP_PATH to be the path to the parent process .app directory and make GetAppPath return this path when called from the parent or a child process.

Depends on D6717

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

--HG--
extra : moz-landing-system : lando
2018-10-19 18:23:06 +00:00
Mark Banner
ceaeb93550 Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D8389

--HG--
extra : moz-landing-system : lando
2018-10-19 12:55:39 +00:00
Chris Martin
deeb744526 Bug 1496364 - Minor refactor to stop uninitialized variable warning r=handyman
The compiler warns that jobLevel is uninitialized if none of the if-else
conditions are true. Simply replacing the leading assert with a
"else crash" tells the compiler that case will never actually happen.

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

--HG--
extra : moz-landing-system : lando
2018-10-18 19:14:05 +00:00
David Parks
8ad763743e Bug 1426733: Use restricting SIDs in Windows NPAPI process sandbox (r=bobowen)
Allow NPAPI sandbox to use restricting SIDs.  This hardens the plugin sandbox.

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

--HG--
extra : moz-landing-system : lando
2018-10-18 16:27:56 +00:00
Tom Ritter
4c8004df52 Bug 1498695 Revert casting to void* (1462100) because mingwclang doesn't need to do that. r=bobowen 2018-10-16 11:33:32 +03:00
Tom Ritter
cc01d26509 Bug 1498694 Revert the patch that relaxes the MSVC requirement (1431807) since mingw-clang passes it now r=bobowen 2018-10-12 13:45:49 -05:00
Tom Ritter
8ae788d2db Bug 1498693 - Revert the other part of 1431803, since mingw-clang can handle it now r=bobowen 2018-10-12 13:44:37 -05:00
Tom Ritter
8626230808 Bug 1498672 Include string.h explicitly instead of relying on algorithm to bring it in r=bobowen
The mingw-clang build was broken because the dependency wasn't specified explicitly.
2018-10-12 12:55:16 -05:00
Narcis Beleuzu
a2990eb898 Backed out 7 changesets (bug 1431441) as per haik`s request.
Backed out changeset 1dfdc7ba998d (bug 1431441)
Backed out changeset fb1a4ddbf9bf (bug 1431441)
Backed out changeset b59b1651fc15 (bug 1431441)
Backed out changeset 1e2bb579b824 (bug 1431441)
Backed out changeset 2a635530dfa3 (bug 1431441)
Backed out changeset 262da0be2fed (bug 1431441)
Backed out changeset b9cfda58fed3 (bug 1431441)

--HG--
extra : rebase_source : 7baf60c49683b419c0603979b0dff3befb2fbaf0
2018-10-14 18:20:01 +03:00
David Parks
99e17d748f Bug 1488439: Part 1 - Replace Windows temp folder in sandboxed plugin process (r=bobowen,erahm)
The sandbox blocks GetTempFileName's prior response, causing the system to end up searching a number of (inaccessible) folders to use as a replacement for the temp folder.  This patch provides a path to a new folder on the command line for the plugin process.  This new temp folder, specific to this plugin process instance, is then communicated to the system via the TEMP/TMP environment variables.  This is similar to what is done for the content process but avoids nsDirectoryService, which doesn't exist in plugin processes.

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

--HG--
extra : moz-landing-system : lando
2018-10-12 22:36:22 +00:00
Coroiu Cristina
4224edc453 Backed out 2 changesets (bug 1488439) for build bustage at /build/src/dom/plugins/ipc/PluginProcessParent.cpp on a CLOSED TREE
Backed out changeset 74b2087ee696 (bug 1488439)
Backed out changeset 85575fc37555 (bug 1488439)
2018-10-12 21:00:41 +03:00
David Parks
1ad569c6b1 Bug 1488439: Part 1 - Replace Windows temp folder in sandboxed plugin process (r=bobowen,erahm)
The sandbox blocks GetTempFileName's prior response, causing the system to end up searching a number of (inaccessible) folders to use as a replacement for the temp folder.  This patch provides a path to a new folder on the command line for the plugin process.  This new temp folder, specific to this plugin process instance, is then communicated to the system via the TEMP/TMP environment variables.  This is similar to what is done for the content process but avoids nsDirectoryService, which doesn't exist in plugin processes.

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

--HG--
extra : moz-landing-system : lando
2018-10-12 17:40:10 +00:00
Haik Aftandilian
fd43db7f44 Bug 1431441 - Part 5 - Parameterize access to the windowserver in the Mac content sandbox policy r=Alex_Gaynor
Only allow access to "com.apple.windowserver.active" when the pref
"security.sandbox.content.mac.disconnect-windowserver" is set to true.

Depends on D6721

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

--HG--
extra : moz-landing-system : lando
2018-10-11 22:49:44 +00:00
Haik Aftandilian
e5a942f82a Bug 1431441 - Part 4 - ASSERT the sandbox is already enabled r=Alex_Gaynor
When early initialization of the sandbox is enabled, assert that the sandbox has already been enabled in ContentProcess::Init().

Depends on D6720

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

--HG--
extra : moz-landing-system : lando
2018-10-11 22:46:29 +00:00
Haik Aftandilian
b9bdcdedb1 Bug 1431441 - Part 3 - Start the Mac content sandbox earlier r=Alex_Gaynor
Pass sandbox parameters to content processes on the command
line allowing for early sandbox startup. Limited to Nightly
until confirmed to be stable and ready to ride the trains.

Enable early sandbox startup by default on Nightly and use
pref "security.sandbox.content.mac.earlyinit" to disable
early startup for debugging purposes.

Once early startup is stable, the original sandbox startup
code can be removed.

Depends on D6719

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

--HG--
extra : moz-landing-system : lando
2018-10-11 22:44:25 +00:00
Haik Aftandilian
a710b03285 Bug 1431441 - Part 2 - Remove rules for APP_BINARY_PATH and APP_DIR Mac sandbox parameters r=Alex_Gaynor
Simplify the content sandbox policy by removing APP_BINARY_PATH and APP_DIR Mac sandbox parameters and their associated rules in the policy. Keep APP_PATH which is a parent directory of APP_BINARY_PATH and APP_DIR.

Depends on D6717

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

--HG--
extra : moz-landing-system : lando
2018-10-11 22:42:24 +00:00
Jim Mathies
494b622f3f Bug 1497643 - Enable Chromium sandbox option MITIGATION_IMAGE_LOAD_PREFER_SYS32 for content processes. r=bowen 2018-10-11 09:23:03 -05:00
Tiberius Oros
3edd9afbe3 Backed out 5 changesets (bug 1431441) for failing devtools at client/debugger/new/test/mochitest/browser_dbg_rr_breakpoints-01.js on OSX opt a=backout
Backed out changeset 94a1d1d67191 (bug 1431441)
Backed out changeset be7ec7438701 (bug 1431441)
Backed out changeset db6b7ee04187 (bug 1431441)
Backed out changeset f61ec0f140c2 (bug 1431441)
Backed out changeset ac51f86f5cac (bug 1431441)
2018-10-03 09:39:01 +03:00
Haik Aftandilian
70da961450 Bug 1431441 - Part 5 - Parameterize access to the windowserver in the Mac content sandbox policy r=Alex_Gaynor
Only allow access to "com.apple.windowserver.active" when the pref
"security.sandbox.content.mac.disconnect-windowserver" is set to true.

Depends on D6721

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

--HG--
extra : moz-landing-system : lando
2018-10-02 19:43:06 +00:00
Haik Aftandilian
7977abcd65 Bug 1431441 - Part 4 - ASSERT the sandbox is already enabled r=Alex_Gaynor
When early initialization of the sandbox is enabled, assert that the sandbox has already been enabled in ContentProcess::Init().

Depends on D6720

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

--HG--
extra : moz-landing-system : lando
2018-10-02 19:41:30 +00:00
Haik Aftandilian
ef9150c083 Bug 1431441 - Part 3 - Start the Mac content sandbox earlier r=Alex_Gaynor
Pass sandbox parameters to content processes on the command
line allowing for early sandbox startup. Limited to Nightly
until confirmed to be stable and ready to ride the trains.

Enable early sandbox startup by default on Nightly and use
pref "security.sandbox.content.mac.earlyinit" to disable
early startup for debugging purposes.

Once early startup is stable, the original sandbox startup
code can be removed.

Depends on D6719

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

--HG--
extra : moz-landing-system : lando
2018-10-02 20:29:46 +00:00
Haik Aftandilian
a99a3fe58d Bug 1431441 - Part 2 - Remove rules for APP_BINARY_PATH and APP_DIR Mac sandbox parameters r=Alex_Gaynor
Simplify the content sandbox policy by removing APP_BINARY_PATH and APP_DIR Mac sandbox parameters and their associated rules in the policy. Keep APP_PATH which is a parent directory of APP_BINARY_PATH and APP_DIR.

Depends on D6717

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

--HG--
extra : moz-landing-system : lando
2018-10-02 19:40:46 +00:00
Kris Maglione
74481e8af4 Bug 1479035: Part 1 - Don't create event queues for stub nsThread wrappers. r=froydnj
Most of the times when we automatically create nsThread wrappers for threads
that don't already have them, we don't actually need the event targets, since
those threads don't run XPCOM event loops. Aside from wasting memory, actually
creating these event loops can lead to leaks if a thread tries to dispatch a
runnable to the queue which creates a reference cycle with the thread.

Not creating the event queues for threads that don't actually need them helps
avoid those foot guns, and also makes it easier to figure out which treads
actually run XPCOM event loops.

MozReview-Commit-ID: Arck4VQqdne

--HG--
extra : source : a03a61d6d724503c3b7c5e31fe32ced1f5d1c219
extra : intermediate-source : 5152af6ab3e399216ef6db8f060c257b2ffbd330
extra : histedit_source : ef06000344416e0919f536d5720fa979d2d29c66%2C4671676b613dc3e3ec762edf5d72a2ffbe6fca3f
2018-07-27 15:13:12 -07:00
Narcis Beleuzu
72f96acd7b Backed out 2 changesets (bug 1479035) for assertion failure: mEvents. CLOSED TREE
Backed out changeset 89a0c0874d40 (bug 1479035)
Backed out changeset 5152af6ab3e3 (bug 1479035)
2018-09-26 23:40:13 +03:00
Kris Maglione
81eb50cf31 Bug 1479035: Part 1 - Don't create event queues for stub nsThread wrappers. r=froydnj
Most of the times when we automatically create nsThread wrappers for threads
that don't already have them, we don't actually need the event targets, since
those threads don't run XPCOM event loops. Aside from wasting memory, actually
creating these event loops can lead to leaks if a thread tries to dispatch a
runnable to the queue which creates a reference cycle with the thread.

Not creating the event queues for threads that don't actually need them helps
avoid those foot guns, and also makes it easier to figure out which treads
actually run XPCOM event loops.

MozReview-Commit-ID: Arck4VQqdne

--HG--
extra : rebase_source : fcf8fa50e748c4b54c3bb1997575d9ffd4cbaae1
extra : source : a03a61d6d724503c3b7c5e31fe32ced1f5d1c219
2018-07-27 15:13:12 -07:00
Noemi Erli
36cc0e5fa7 Backed out 2 changesets (bug 1479035) for build bustages bustages netwerk/cache2/target on CLOSED TREE
Backed out changeset 5f8706213610 (bug 1479035)
Backed out changeset a03a61d6d724 (bug 1479035)
2018-09-26 08:54:03 +03:00
Kris Maglione
a6edc4f204 Bug 1479035: Part 1 - Don't create event queues for stub nsThread wrappers. r=froydnj
Most of the times when we automatically create nsThread wrappers for threads
that don't already have them, we don't actually need the event targets, since
those threads don't run XPCOM event loops. Aside from wasting memory, actually
creating these event loops can lead to leaks if a thread tries to dispatch a
runnable to the queue which creates a reference cycle with the thread.

Not creating the event queues for threads that don't actually need them helps
avoid those foot guns, and also makes it easier to figure out which treads
actually run XPCOM event loops.

MozReview-Commit-ID: Arck4VQqdne

--HG--
extra : rebase_source : 02c5572b92ee48c11697d90941336e10c03d49cf
2018-07-27 15:13:12 -07:00
Haik Aftandilian
f2fa2012f9 Bug 1491940 - [Mac] Allow Adobe DRM content to play with the Mac Flash sandbox r=Alex_Gaynor
Add an whitelisted write-access path regex to the Flash plugin sandbox.

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

--HG--
extra : moz-landing-system : lando
2018-09-24 17:22:49 +00:00
Jed Davis
2fcf5c7252 Bug 1489735 - Quietly deny sched_setaffinity in content process sandbox r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D5908

--HG--
extra : moz-landing-system : lando
2018-09-17 16:43:52 +00:00
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
Gian-Carlo Pascutto
ac0adb0b5e Bug 1480755 - Add support for new Mesa device probing. r=jld
MozReview-Commit-ID: CD9ATGHUOZ1

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

--HG--
extra : moz-landing-system : lando
2018-08-22 01:52:44 +00:00
Haik Aftandilian
25e42d1fc7 Bug 1484051 - Limit Mac Flash sandbox file-access mds rules r=Alex_Gaynor 2018-08-17 15:05:47 -07:00