Граф коммитов

56 Коммитов

Автор SHA1 Сообщение Дата
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
Kris Maglione 25c94b46d8 Bug 1481021: Part 1 - Fix tests that rely on permissive COWs or SpecialPowers side-effects in frame script scopes. r=bz
Right now, a lot of test code relies on side-effects of SpecialPowers being
loaded into frame script globals. In particular:

- It forces permissive COWs from those scopes, which allows frame scripts to
  pass objects from those scopes to unprivileged content that they otherwise
  wouldn't.
- It imports a bunch of helper modules and WebIDL globals which would
  otherwise not be available.

Fortunately, this seems to only impact test code at this point. But there's a
real down-the-road risk of it impacting shipping code, which ends up working
in automation due to the side-effects of SpecialPowers, but failing in real
world use.

MozReview-Commit-ID: G27eSSOHymX

--HG--
extra : rebase_source : 1702e63fed719fc92def2bdbbb8a7c53572432db
extra : source : 41bedc526dd6ec6b7e8c7be1c832ac60c81d6263
2018-08-07 14:13:06 -07:00
Sylvestre Ledru a3ce8a59cd Bug 1464869 - Fix flake8/pep8 issue by hand in security/ r=fkiefer
MozReview-Commit-ID: ExDsMJ9KzJQ

--HG--
extra : rebase_source : e17c44e94c371d168f3c34ecbd640fb87cd2e863
2018-05-27 10:36:45 +02:00
Haik Aftandilian fcb3b190fe Bug 1432567 - [Mac] Add a test that renders fonts from non-standard directories r=jfkthame
Adds a test to validate that content sandboxing is allowing content
processes to access fonts from non-standard locations on the
filesystem. The test copies the Fira Sans font to the root of the
home directory and renders a page that should use Fira Sans when it
is installed and registered with the OS. The test checks for the use
of the ".LastResort" font which is an indication of the the content
process failing to load the font.

MozReview-Commit-ID: GPWqHdF3vhG

--HG--
extra : rebase_source : c0ea283d496517812202d068c610bdcc0ece640d
2018-05-22 12:31:03 -07:00
Jared Wein 9788800512 Bug 1436575 - Manually fix the errors from no-compare-against-boolean-literal that the autofix couldn't change. r=standard8
MozReview-Commit-ID: 6NtfU76sPKv

--HG--
extra : rebase_source : 143891b98995658a5683e01631eba9f6a2bb7b6f
2018-02-08 13:35:53 -05:00
Alex Gaynor 106fa9d993 Bug 1405088 - Part 1 - remove file-write permissions from macOS content temporary directory; r=haik
With this change, the macOS content sandbox has no ability to create files
anywhere on disk (in release builds). If the content process needs a file to
write to, it needs to obtain a file descriptor from the parent process.

MozReview-Commit-ID: 7LoG1PW0UDR

--HG--
extra : rebase_source : 4ac0a7f187d45c9b6c0f8a658edfdae0509054ac
2017-10-02 10:48:01 -04:00
Gian-Carlo Pascutto 6520179659 Bug 1386404 - Enable content-process specific tmpdir on Linux. r=jld
MozReview-Commit-ID: 6Hijq0to9MG

--HG--
extra : rebase_source : 8435b8e39d9723c52b0176a7686895185136aa6e
extra : histedit_source : 50c41172788fddead6357f1d566d0e48de8c90d6
2018-01-09 16:29:40 +01:00
Kris Maglione 918ed6c474 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Cosmin Sabou 9a65a40178 Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione 6476f95b13 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian af8879d1eb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione c276bb9375 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
Haik Aftandilian 1956e23936 Bug 1393259 - Enable sandbox read access extensions for font access. r=Alex_Gaynor
Enable sandbox read access extensions to allow content processes
to access fonts stored in non-standard locations without whitelisting
hardcoded directories. This is needed for configurations with third
party font managers that store fonts in their own directories or
user-specified directories.

Now that font access is not dependent on the filename extension
such as .otf and .ttf, remove the relevent tests.

MozReview-Commit-ID: 8hSMrocGwIm

--HG--
extra : rebase_source : b757480398e3f0d9720ab845e9f10fb70a794d77
2018-01-11 10:53:11 -08:00
Csoregi Natalia d07dee65a2 Backed out 6 changesets (bug 1386404) for failing /webdriver/test/ tests on Linux. r=backout on a CLOSED TREE
Backed out changeset be1441859e8b (bug 1386404)
Backed out changeset 8dca7ef74c4a (bug 1386404)
Backed out changeset b7ca6ae185f2 (bug 1386404)
Backed out changeset 2c007d385ce4 (bug 1386404)
Backed out changeset fbe717b9a664 (bug 1386404)
Backed out changeset 14f1fbe5263a (bug 1386404)
2018-01-10 14:08:51 +02:00
Gian-Carlo Pascutto 1a580a77b4 Bug 1386404 - Enable content-process specific tmpdir on Linux. r=haik,jld
MozReview-Commit-ID: 6Hijq0to9MG

--HG--
extra : rebase_source : 7ff43ffe52f32ebbc7c866428e0d1d64dd05cbcb
2018-01-09 16:29:40 +01:00
Mark Banner 770685e15e Bug 1425688 - Enable ESLint rule mozilla/use-services for security/. r=gcp,keeler
MozReview-Commit-ID: 4Kd9L8ExNGl

--HG--
extra : rebase_source : 02a5242629c7b597d7fd4e5e1373781fcbb82905
2017-12-16 13:10:40 -06:00
Cosmin Sabou 6c33dde6ca Backed out 2 changesets (bug 1425688) on request from jorgk for breaking the Certificate Manager r=backout a=backout
Backed out changeset f73324a4d033 (bug 1425688)
Backed out changeset bd2bf7b7fead (bug 1425688)
2017-12-28 15:26:09 +02:00
Mark Banner bed9b1d6c8 Bug 1425688 - Enable ESLint rule mozilla/use-services for security/. r=gcp,keeler
MozReview-Commit-ID: 4Kd9L8ExNGl

--HG--
extra : rebase_source : d8383ef464e9f0d19c7642a07967f3e2fa56d0dc
2017-12-16 13:10:40 -06:00
Haik Aftandilian 4e95d558ac Bug 1404298 - Crashes with read-access content sandboxing triggered by mounted volumes. r=Alex_Gaynor
Allow read-metadata access to top-level directory entries.

MozReview-Commit-ID: 1Q7QXN2gX36

--HG--
extra : rebase_source : 86e3cc1906bb805e158c70c703ec204f11452199
2017-12-18 12:58:30 -08:00
Sebastian Hengst 1133016f04 Backed out 6 changesets (bug 1386404) for XPCshell failures, at least on Linux. r=backout on a CLOSED TREE
Backed out changeset c80acdea24c1 (bug 1386404)
Backed out changeset 6224ffae752a (bug 1386404)
Backed out changeset 9eba087cf64a (bug 1386404)
Backed out changeset eac6eb517096 (bug 1386404)
Backed out changeset 802a00ea50e7 (bug 1386404)
Backed out changeset d7f697bac6ef (bug 1386404)
2017-11-03 20:28:00 +01:00
Gian-Carlo Pascutto fff36a228d Bug 1386404 - Enable content-process specific tmpdir on Linux. r=haik
MozReview-Commit-ID: 6Hijq0to9MG

--HG--
extra : rebase_source : 083bf3d52e228ce953d31ef997f969a0e4a562ec
2017-10-12 11:18:25 +02:00
Sebastian Hengst d67d120cc4 Backed out 4 changesets (bug 1386404) for mass failures, e.g. in browser-chrome's dom/tests/browser/browser_xhr_sandbox.js. r=backout on a CLOSED TREE
Backed out changeset 36556e1a5ac7 (bug 1386404)
Backed out changeset b136f90dc49f (bug 1386404)
Backed out changeset 4600c2d575f9 (bug 1386404)
Backed out changeset c2c40e4d9815 (bug 1386404)
2017-10-30 19:10:01 +01:00
Gian-Carlo Pascutto 802f1b9395 Bug 1386404 - Enable content-process specific tmpdir on Linux. r=haik
MozReview-Commit-ID: 6Hijq0to9MG

--HG--
extra : rebase_source : c7a3559e4cbdfd1885d13a489c4eeb311ca973fa
2017-10-12 11:18:25 +02:00
Haik Aftandilian 9d77bd9d20 Bug 1393805 - Part 5 - Test that the system extensions dev dir is readable from content. r=bobowen
MozReview-Commit-ID: 7YN7S7R39CU

--HG--
extra : rebase_source : 092f1046a3f6b44c807f7632275615a6bdd674dd
2017-09-27 16:01:57 -07:00
Sebastian Hengst e8b4c9dc97 Backed out changeset 4fe99f70e199 (bug 1393805) 2017-10-05 00:19:55 +02:00
Haik Aftandilian 9a88df4221 Bug 1393805 - Part 5 - Test that the system extensions dev dir is readable from content. r=bobowen
MozReview-Commit-ID: 7YN7S7R39CU

--HG--
extra : rebase_source : 01e3fe0acb051723219d9d5de5b1fd19d9751c34
2017-09-27 16:01:57 -07:00
Haik Aftandilian fa37753064 Bug 1403744 - Part 2 - Test that the per-user extensions dir is readable from content on Windows. r=bobowen
MozReview-Commit-ID: 7YN7S7R39CU

--HG--
extra : rebase_source : c86998b1738ee1f4d24562105acf63c20811b8a1
2017-09-29 12:44:22 -07:00
Haik Aftandilian 3fbdb1b349 Bug 1382260 - Patch 2 - [Mac] Allow reading of font files from the content sandbox. r=Alex_Gaynor
MozReview-Commit-ID: 9W5aqQweFmd

--HG--
extra : rebase_source : 9aa778bc08bee206e7f3340eac32ca2f46a4f81b
2017-08-18 16:12:07 -07:00
Haik Aftandilian c90d8c6594 Bug 1382260 - Patch 1 - Fix file access test bug. r=Alex_Gaynor
Fix the file access check by adding missing parentheses to isDirectory method call.

Don't run the cookies file check on Linux because the test profile is read accessible due to being in /tmp.

MozReview-Commit-ID: lps2hk8f5U

--HG--
extra : rebase_source : 5fba75d65081e56df5a0d171c41689c489a3aace
2017-08-22 10:11:01 -07:00
Masatoshi Kimura 8b713b2b0f Bug 1375125 - Stop using nsILocalFile in the tree. r=froydnj
This mechanically replaces nsILocalFile with nsIFile in
*.js, *.jsm, *.sjs, *.html, *.xul, *.xml, and *.py.

MozReview-Commit-ID: 4ecl3RZhOwC

--HG--
extra : rebase_source : 412880ea27766118c38498d021331a3df6bccc70
2017-08-04 17:49:22 +09:00
Gian-Carlo Pascutto 8bc55108f2 Bug 1308400 - Support file process, whitelist path prefs. r=jld
MozReview-Commit-ID: 3eX06AioPZL

--HG--
extra : rebase_source : 56bcfaad3360fe92ce605a0413bb3a9cacb4446d
2017-07-24 16:32:22 +02:00
Bob Owen b4239707cf Bug 1366694 Part 2: Don't run sandbox file system test in DEBUG on Windows. r=jimm
This is because in DEBUG mode we currently give full access to TEMP dir
for logging purposes and the temporary profile is created in the TEMP dir.
2017-07-20 07:50:48 +01:00
Alex Gaynor f76801e348 Bug 1379803 - on macOS, only allow the creation of regular files and directories in writable directories; r=haik
This specifically disallows the creation of ttys and symlinks. Writable
directories are needed for plugins, which lazily create the plugintmp directory.
If/when the plugin API surface is reduced we can restrict down to just regular
files.

MozReview-Commit-ID: Ec6qeaiHSsB

--HG--
extra : rebase_source : 252a3cbf7954b9c09092b896ef8af45310438a86
2017-07-11 09:51:04 -04:00
Alex Gaynor f514ff97b3 Bug 1379182 - Remove some unnecessary file-write permissions types from the content process on macOS; r=haik
On macOS, the file-write* permission type contains numerous sub-permissions (see
bug for full listing). Restrict the ones we allow to only the two we need:
file-write-create and file-write-data. This primarily reduces kernel attack
surface, I'm not aware of any bad things that could be done directly with the
removed permissions.

MozReview-Commit-ID: 3VvjFesy2qx

--HG--
extra : rebase_source : 934ec17c44c9ef3d7fab29919d66cf1a55d57697
2017-07-07 11:05:01 -04:00
Alex Gaynor d40ad40466 Bug 1376976 - Restrict sysctl access in the content process to a whitelist of sysctl names. r=jld, r=haik
MozReview-Commit-ID: 14yoiP1gskM
2017-06-29 13:55:15 -07:00
Florian Quèze 66f6d259bc Bug 1374282 - script generated patch to remove Task.jsm calls, r=Mossop. 2017-06-22 12:51:42 +02:00
Alex Gaynor 0403c42ccf Bug 1371701 - Fixed sandboxing tests to reflect that we're enabling file content process for all channels r=bobowen
MozReview-Commit-ID: ICXZjEU2n6L

--HG--
extra : rebase_source : f28d5d61f6a0cdfecb2804239c407c730c4fd2ba
2017-06-09 11:24:07 -04:00
Alex Gaynor e43d5d424f Bug 1370540 - Extend the level 3 content sandbox filesystem read blacklist to include /Network and /Users; r=haik
MozReview-Commit-ID: 6RfS5aYRghK

--HG--
extra : rebase_source : c8d084d42dc2b37e4a0642e1a72bdd514a68d465
2017-06-06 10:48:06 -04: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
Alex Gaynor 1532472698 Bug 1368771 - Added a test which verifies that on macOS /Volumes isn't readable at sandbox level 3 r=haik
r?haik

MozReview-Commit-ID: HPW4luz5n0M

--HG--
extra : rebase_source : c224b56de4b705758e2ab7820af02a4ef41d4040
2017-05-30 13:52:57 -04:00
Christoph Kerschbaumer e4f38c8d7c Bug 1362993 - Rewrite gBrowser.addTab() to use BrowserTestUtils.addTab(). r=florian 2017-05-15 21:49:50 +02:00
Alex Gaynor 9a4c947617 Bug 1363729 - Fixed a small formatting regression in tests. r=haik
MozReview-Commit-ID: 7I6tKS6yoM7

--HG--
extra : rebase_source : 03a652024d30a57ad270338bc6e222281d0e7c78
2017-05-10 10:05:25 -04:00
Hemant Singh Patwal fd32e8da4a Bug 1359614 - Move the security/manager/.eslintrc.js to security/.eslintrc.js and fix the ESLint issues raised. r=standard8
MozReview-Commit-ID: AlfInBsIPnF

--HG--
rename : security/manager/.eslintrc.js => security/.eslintrc.js
extra : rebase_source : 4dfdd45a4f1e4d3e45e2ef353dd0bb343a3d1adb
2017-05-09 19:48:02 +05:30
Haik Aftandilian 8c95154f41 Bug 1361304 - Remove /private/var read access from Mac level 3 content sandbox; r=Alex_Gaynor
Removes read access to /private/var and its subdirectories from
the content process under the level 3 Mac sandbox. Still permits
reading of file metadata within the majority of /private/var.

Adds tests to validate the level 3 Mac content sandbox prevents
reading from /private.

MozReview-Commit-ID: FO5dz0F7dl4

--HG--
extra : rebase_source : 226f8de6d4d88f188c272a3e119ed7b8bac292df
2017-05-05 10:48:52 -07:00
Haik Aftandilian cbffb758e8 Bug 1360356 - [Mac] Remove "/Library/Caches/TemporaryItems" rule from level 3 Content Sandbox; r=Alex_Gaynor
Remove reading of "~/Library/Caches/TemporaryItems" from level 3 and update
sandboxing filesystem test to check ~/Library/Caches/TemporaryItems readability.

MozReview-Commit-ID: 6EMzH7brSnp

--HG--
extra : rebase_source : f97b5625da2abda73decc969fc581c2bf858183f
2017-04-28 11:48:43 -07:00
Wes Kocher 5eabc03c18 Merge m-c to autoland a=merge 2017-04-10 16:55:21 -07:00
Haik Aftandilian 5c4955b4d4 Bug 1354674 - Introduce, but don't enable, a level 3 Mac content sandbox with home directory read access disabled r=Alex_Gaynor
MozReview-Commit-ID: 2LThF6XTsoo

--HG--
extra : rebase_source : 8731aa87bde647cfdbea05cde8376e42f49d9a08
2017-04-07 18:14:01 -07:00
Bob Owen 48b2af658f Bug 1329294 Part 2: Enable content temp file test on Windows. r=haik 2017-04-10 14:39:58 +01:00