Commit Graph

491 Commits

Author SHA1 Message Date
Phil Ringnalda
16acd6fa33 Merge m-c to autoland 2016-10-27 20:40:39 -07:00
Gian-Carlo Pascutto
8b0d2992cb Bug 1310116 - Allow waitpid but warn on creating processes in content. r=jld
MozReview-Commit-ID: JjNfA6wUe3T

--HG--
extra : rebase_source : ad565d238e7554a951d2f6b4e076918bdfd7a450
extra : histedit_source : 127ff408e498f7c687cf6e7f8f7b4e2fbb8c5ae8
2016-10-25 20:43:42 +02:00
Jed Davis
67a039045c Bug 1268733 - Move Linux sandboxing code back out to libmozsandbox.so. r=gcp r=glandium 2016-10-26 16:57:24 -06:00
Jed Davis
dce9969411 Bug 1268733 - Move sandbox interposition shims to their own static library. r=gcp r=glandium
This way they'll continue to be at the beginning of the symbol search
path after mozsandbox returns to being a shared library instead of
statically linked into plugin-container.

--HG--
rename : security/sandbox/linux/SandboxHooks.cpp => security/sandbox/linux/interpose/SandboxHooks.cpp
2016-10-26 16:57:18 -06:00
Jed Davis
13fea0b617 Bug 1268733 - Move sandbox telemetry / crash annotation code from mozsandbox to libxul. r=haik 2016-10-26 16:57:10 -06:00
Haik Aftandilian
0ebb0c2d3e Bug 1306508 - Whitelist /private/var/folders/ in DEBUG and reduce content process write access further; r=gcp
Removes global write access from the content process (instead of
just blocking write access to $HOME) for level 1 and 2 Mac content
sandboxes. Allows writes to /private/var/folders/[0-9][0-9]/ in
DEBUG mode so that leaktest can continue to work.

MozReview-Commit-ID: 635o7Nj9oW1

--HG--
extra : rebase_source : 7e23612f56a31de83307057c1e6d0eaadb937614
2016-10-12 11:53:38 -07:00
Haik Aftandilian
10dcc223b4 Bug 1312273 - Twitter videos can't play in recent nightlies on OS X 10.9; r=gcp
MozReview-Commit-ID: JidUYCkR8Lp

--HG--
extra : rebase_source : cda86dd86ed1359c979176513cd06a79fa2ab3c8
2016-10-24 10:37:54 -07:00
Andi-Bogdan Postelnicu
c7be178cd3 Bug 1309133 - null terminate pathBuf2 in SandboxBroker::ThreadMain. r=gcp
MozReview-Commit-ID: 8iA4Yzwj8nv

--HG--
extra : rebase_source : 81af49ea741957a3a79c91dd5503196a0a28a9ef
2016-10-11 15:42:39 +03:00
Haik Aftandilian
871aa1294d Bug 1307573 - Remove unused system.sb mach-lookups from OS X content sandbox; r=jimm
MozReview-Commit-ID: JDnLDbYs2IV

--HG--
extra : rebase_source : cba1eb50169fdb6d50ad8c900c98c8855cc71793
2016-10-03 17:11:01 -07:00
Gian-Carlo Pascutto
f0dece11a4 Bug 1308564 - Tie logging to MOZ_SANDBOX_VERBOSE instead of DEBUG. r=jld
MozReview-Commit-ID: JHIzIvbjA0Q

--HG--
extra : rebase_source : bb5652209a3fdb9e5cccb6c3cc4058fd74173fd1
2016-10-07 21:33:12 +02:00
Gian-Carlo Pascutto
f255eedb86 Bug 1308851 - Open up devices for NVIDIA proprietary driver in the sandbox. r=jld
MozReview-Commit-ID: 5OMRNSPBbe1

--HG--
extra : rebase_source : bb554a1f72a9e6bbde9250542989f5c34dfe7267
2016-10-10 20:51:21 +02:00
Haik Aftandilian
4f170e903e Bug 1307282 - Remove redundant read-metadata rights from the content sandbox; r=gcp
MozReview-Commit-ID: CILCWk4nINs

--HG--
extra : rebase_source : b3d738365a978505fdbc5ba0a94de62a8824e2f2
2016-09-30 11:59:48 -07:00
Haik Aftandilian
bef74339e5 Bug 1307282 - Remove unused sandbox ruleset macros; r=gcp
MozReview-Commit-ID: A7x55tDN4b9

--HG--
extra : rebase_source : 52ef8da1bf9df868c3f9cc0cbdfdee2147425454
2016-09-28 16:37:52 -07:00
Gian-Carlo Pascutto
5810afce39 Bug 1308568 - Add missing filesystem calls to Allow in case broker is disabled. r=haik
MozReview-Commit-ID: 6AdKbBH0NMh

--HG--
extra : rebase_source : aaf58affb124719b3d65dc819d98e7227abff8ec
2016-10-07 22:09:57 +02:00
Gian-Carlo Pascutto
bbcb394669 Bug 1289718 - Clean up stat/stat64 wrapper. Deal with non-default TMPDIR. r=jld
MozReview-Commit-ID: DW63be9qd3z

--HG--
extra : rebase_source : 0a1860c70a631b24bcafecb4946c044148536004
2016-10-06 13:25:13 +02:00
Gian-Carlo Pascutto
f3a1ed7502 Bug 1289718 - Extend sandbox file broker to handle paths, support more syscalls. r=jld,tedd
MozReview-Commit-ID: DW415ABoaeN
MozReview-Commit-ID: cXrlXNlEwh
MozReview-Commit-ID: CIX6d7td6Bc
MozReview-Commit-ID: DCQ9DGBBjm4
MozReview-Commit-ID: BOYSSof3t7
MozReview-Commit-ID: LmsTqv0GzC2
MozReview-Commit-ID: HOWR0HEHmMg
MozReview-Commit-ID: 6IzqdrUP7lD
MozReview-Commit-ID: 6r6sqOVekVu
MozReview-Commit-ID: 5FL2WkhIxFx
MozReview-Commit-ID: CcTyHn76p46
MozReview-Commit-ID: F8erB4Tvn2V
MozReview-Commit-ID: D9m10t0Rodc
MozReview-Commit-ID: I1llpEBgDP6

--HG--
extra : rebase_source : 1d50d5b7a9936c76decdf268a4e66e34ee7b200c
2016-09-27 17:25:06 +02:00
Bob Owen
61b439db23 Bug 1307375: Add the use of MOZ_LOG to windows sandbox logging. r=jimm 2016-10-05 08:10:46 +01:00
Tom Schuster
774a8bf34d Bug 1302163 - Change code to use SprintfLiteral instead of snprintf. r=ehsan 2016-10-04 17:57:51 +02:00
Bob Owen
7c28b45840 Bug 1102853: Remove PGO exception for sharedmem_ipc_client.cc. r=glandium
MozReview-Commit-ID: Qx44MNtns8
2016-10-04 09:18:27 +01:00
Haik Aftandilian
c7963e7731 Bug 1284588 - OS X: Disable content process write access to user files in the home directory; r=gcp
Changes the semantics of the security.sandbox.content.level pref on OS X with
respect to file access to the user's home directory. With the fix, Nightly
defaults to 2 while other releases will default to 1. The level values now
have the following meaning.

*) security.sandbox.content.level=0 disables content process sandboxing.
No change here.

*) security.sandbox.content.level=1 blocks write access to the majority of the
home directory.

*) security.sandbox.content.level=2 includes the write access blocking in
level 1, but also blocks both read and write access to ~/Library and $PROFILE
excluding the extensions and weave subdirectories.

Prior to this fix, Nightly defaulted to a value of 1 while all other releases
used 0. The value of 1 meant that read/write access to ~/Library and the
$PROFILE dir (excluding $PROFILE/{extensions,weave}) was prevented.

The strength of a level=1 sandbox is reduced by this with fix,
but level=1 becomes the first ride-the-trains content sandbox candidate,
Nightly changes to level=2, and higher levels still indicate a more
restrictive sandbox.

MozReview-Commit-ID: 7NJAe24T4pU

--HG--
extra : rebase_source : 8cb5ea82004ad631fe688bafffa9dc9979568679
2016-09-26 11:30:08 -07:00
David Parks
1748bfae57 Bug 1269114 - [x86_64] Last picked directory not saved when using Flash Player uploader. r=jimm
Adds a couple of registry paths to the broker's ALLOW policy.
2016-09-24 02:54:12 -07:00
Jed Davis
75b81d566f Bug 1303813 - Allow media plugins to call madvise with MADV_FREE. r=gcp
--HG--
extra : rebase_source : 42fa66774311cc1dcf2c18643c7118483acff89d
2016-09-26 16:10:00 -04:00
Jed Davis
cb2e7d319f Bug 1304220 - Allow media plugins to use the times(2) syscall. r=gcp
--HG--
extra : rebase_source : 595bf264b48968ec25d02c82866ef02ef87a59fa
2016-09-26 16:32:00 -04:00
Haik Aftandilian
497d8e9b73 Bug 1299329 - Remove printing-related privileges from content process sandbox; r=gcp
MozReview-Commit-ID: 9fnfkKvjpGx

--HG--
extra : rebase_source : bc1361b350171920ae8e19747c77287ea82f6f8f
2016-09-16 16:09:51 -07:00
Bob Owen
fe5ccaf977 Bug 1303325: Revert changes to policy_target.cc that cause issue with CoInitializeSecurity. r=aklotz
This also reverts the Bug 1287426 Part 8 patch that turned the USER_NON_ADMIN loken into a restricted token.

MozReview-Commit-ID: 9fNeyhAHw55

--HG--
extra : rebase_source : adbe59260d512b5d17b6e3ea6c1fe484c06eb555
2016-09-16 13:49:53 +01:00
Haik Aftandilian
9de1898bc2 Bug 1290619 - Content sandbox rules should use actual profile directory, not Profiles/*/ regex's; r=jimm
Passes the profile dir to the content process as a -profile CLI
option so that the correct profile dir can be used in the OS X content
sandbox rules.  Only enabled on OS X for now.

On Nightly, profile directories will now be read/write protected
from the content process (apart from a few profile subdirectories) even
when they don't reside in ~/Library.

xpcshell tests invoke the content process without providing a
profile directory. In that case, we don't need to add filesystem
profile dir. read/write exclusion rules to the sandbox.

This patch adds two new macros to the content sandbox rule set:
|profileDir| holds the path to the profile or the emptry string;
|hasProfileDir| is a boolean (1 or 0) that indicates whether or
not the profile directory rules should be added. If |hasProfileDir|
is 0, profile directory exclusion rules don't need to be added
and |profileDir| is not used.

MozReview-Commit-ID: rrTcQwTNdT

--HG--
extra : rebase_source : 3d5b612c8eb3a1d0da028eba277cd9d6f0c9ac00
2016-08-30 13:32:21 -07:00
Bob Owen
182a56ac2a Bug 1301034: Log when non-static file policy AddRule calls fail in Windows SandboxBroker. r=jimm
MozReview-Commit-ID: DA5NizLfFfA

--HG--
extra : rebase_source : 23ea76054c98ab071b0d03e5fc0d7e57d1668244
2016-09-12 11:11:22 +01:00
Bob Owen
83f2f5e72f Bug 1287426 Part 8: Change the USER_NON_ADMIN token to be a restricted token with the same access. r=aklotz
This is to work around an issue where the call to CoInitializeSecurity in MainThreadRuntime::InitializeSecurity causes the impersonation token, used to give the pre-lockdown permissions, to be replaced with one with no rights.
This only seems to happen when the lockdown token is USER_NON_ADMIN, which is not a restricted token.

MozReview-Commit-ID: 6HFuDFmWLTf
2016-09-06 08:57:22 +01:00
Gian-Carlo Pascutto
03bf07111a Bug 1287426 Part 7: Re-apply - Update chromium's list of linux-x86-32 syscalls. r=jld
Originally landed as changset:
https://hg.mozilla.org/mozilla-central/rev/adb1d2a92e0d

MozReview-Commit-ID: KpjitH5GQEq
2016-06-08 20:36:04 +02:00
Bob Owen
9f75777f5c Bug 1287426 Part 6: Re-apply - Change Chromium sandbox to allow rules for files on network drives to be added. r=aklotz
Originally landed as changset:
https://hg.mozilla.org/mozilla-central/rev/afa4f68de47c

MozReview-Commit-ID: A18C0KcEqvP
2016-02-01 08:59:00 +00:00
Bob Owen
a2ede75e08 Bug 1287426 Part 5: Re-apply - Logging changes to the Chromium interception code. r=tabraldes
Originally landed as changset:
https://hg.mozilla.org/mozilla-central/rev/0f763c186855

MozReview-Commit-ID: DtuHfDoB1Dx
2014-11-29 17:12:18 +00:00
Bob Owen
0a63c4cbc2 Bug 1287426 Part 4: Re-apply pre-vista stdout/err process inheritance change to Chromium code after merge. r=tabraldes
Originally landed as changset:
https://hg.mozilla.org/mozilla-central/rev/f94a07671389

MozReview-Commit-ID: 2dpjBXkzlze
2014-11-18 15:11:47 +00:00
Bob Owen
d453628509 Bug 1287426 Part 3: Update security/sandbox/chromium/ to commit 4ec79b7f2379a60cdc15599e93255c0fa417f1ed. r=aklotz, r=jld
MozReview-Commit-ID: 14eHMsYZznA
2016-09-06 08:57:21 +01:00
Wes Kocher
81db6ce036 Merge m-c to autoland, a=merge 2016-08-30 18:15:33 -07:00
Gian-Carlo Pascutto
dd0d72c51a Bug 1295190 - Add sys_flock to seccomp whitelist. r=jld
MozReview-Commit-ID: 2GxNWzwfh3u

--HG--
extra : rebase_source : e64bb3d7e499f97dd77721c230bb849e0654ca05
2016-08-22 15:51:05 +02:00
Gian-Carlo Pascutto
7cb06880d3 Bug 1296309 - Return umask (PulseAudio) and wait4 (threads) to the whitelist. r=tedd
MozReview-Commit-ID: 72RrNf57FQQ

--HG--
extra : rebase_source : 875e95ee560ff35e81fb38e8459dfe7256c24735
2016-08-30 16:59:39 +02:00
Wes Kocher
ecea29f6a3 Backed out changeset 0f53bc1a9aea (bug 1290619) a=merge 2016-08-29 17:40:59 -07:00
Haik Aftandilian
3c44a5f111 Bug 1290619 - Content sandbox rules should use actual profile directory, not Profiles/*/ regexes. r=jimm
Passes the profile dir to the content process as a -profile CLI option so
that the correct profile dir can be used in the OS X content sandbox rules.
Only enabled on OS X for now.

On Nightly, profile directories will now be read/write protected from the
content process (apart from a few profile subdirectories) even when they
don't reside in ~/Library.

MozReview-Commit-ID: rrTcQwTNdT

--HG--
extra : rebase_source : d91d8939cabb0eed36b640766756548a790a301c
2016-08-25 15:19:52 -07:00
Wes Kocher
3343f6c576 Backed out changeset b357fab2feb4 (bug 1290619) for osx e10s crashes a=backout CLOSED TREE 2016-08-24 10:59:04 -07:00
Haik Aftandilian
d1e8cf113e Bug 1290619 - Content sandbox rules should use actual profile directory, not Profiles/*/ regex's. r=jimm
Passes the profile dir to the content process as a -profile CLI option so
that the correct profile dir can be used in the OS X content sandbox rules.
Only enabled on OS X for now.

On Nightly, profile directories will now be read/write protected from the
content process (apart from a few profile subdirectories) even when they
don't reside in ~/Library.

--HG--
extra : rebase_source : 7bf426f14f31b35c8b541e6d21183226db9836c7
2016-08-22 11:58:18 -07:00
Kan-Ru Chen
b6d880aca1 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +08:00
Gian-Carlo Pascutto
e2d263a0f4 Bug 1296309 - Remove unused syscalls from the seccomp whitelist. r=tedd
MozReview-Commit-ID: BUDRwsuAu0W

--HG--
extra : rebase_source : 9fa3cf044d67ed09e9a6a4cd8c5d5b0023d8077d
2016-08-18 16:56:12 +02:00
Haik Aftandilian
f796c32cc7 Bug 1286480 - [10.12] Widevine CDM always crashes on Amazon since upgrade to macOS Sierra. r=gcp
Allow /System/Library/PrivateFrameworks/ to be read from the from the plugin sandbox.

--HG--
extra : rebase_source : 8b71b7daed4792d8ce67131819c90acb2f5891ea
2016-08-11 00:57:52 -07:00
Jed Davis
10843a73b7 Bug 1290896 - Allow readlink() in desktop Linux content processes. r=gps
Making readlink() always fail with EINVAL (the result of applying it
to a non-symlink) worked on B2G, but this is not the case on desktop.
(Note: originally the idea for the B2G file broker was that it would
ignore symlinks and map lstat to stat, so that behavior for readlink
would have been consistent, but as eventually implemented it does do
lstat as actual lstat.)

In particular, this seems to be causing something in the graphics
library stack to change what GL renderer it uses (?), and on some
systems the presence of the readlink->EINVAL rule causes it to load a
version of the llvmpipe software renderer with a crash bug, instead of
(we assume) some other driver that works.
2016-08-08 14:59:19 -07:00
Gian-Carlo Pascutto
c53a105dc7 Bug 1288410 - Basic implementation of AddDir and recursive Lookup. r=tedd
MozReview-Commit-ID: 36jAPfm29LO

--HG--
extra : rebase_source : 5eb2a9b02ad3c40375b9a4d9b3f38d75932e29b1
2016-08-10 15:09:58 +02:00
Carsten "Tomcat" Book
389a3e0817 merge mozilla-inbound to mozilla-central a=merge
--HG--
rename : mobile/android/base/java/org/mozilla/gecko/GeckoAppShell.java => mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java
rename : mobile/android/base/java/org/mozilla/gecko/gfx/GeckoLayerClient.java => mobile/android/geckoview/src/main/java/org/mozilla/gecko/gfx/GeckoLayerClient.java
rename : mobile/android/base/java/org/mozilla/gecko/gfx/LayerRenderer.java => mobile/android/geckoview/src/main/java/org/mozilla/gecko/gfx/LayerRenderer.java
rename : mobile/android/base/java/org/mozilla/gecko/gfx/PanningPerfAPI.java => mobile/android/geckoview/src/main/java/org/mozilla/gecko/gfx/PanningPerfAPI.java
2016-08-04 15:55:50 +02:00
Alexandre Lissy
0af5b943b6 Bug 1284674 - Remove NUWA r=cyu
MozReview-Commit-ID: GyMRNzOBKw6

--HG--
extra : rebase_source : 293af1cd55f2035ce6a99f4ebf144059c32a2b8f
2016-08-02 14:54:00 +02:00
Jed Davis
5fc855cf94 Bug 1290343 - Fix Linux GMP sandbox policy's geteuid rule for 32-bit. r=tedd 2016-08-01 13:10:00 +02:00
Jed Davis
6f2404e02a Bug 1290633 - Soft-fail unexpected open() in GMP processes to avoid recursive crash. r=gcp 2016-08-01 15:47:00 +02:00
Jed Davis
938691d027 Bug 1290618 - Allow PR_SET_PTRACER in Linux sandbox policies to avoid recursive crash. r=tedd 2016-08-01 15:44:00 +02:00