Commit Graph

782 Commits

Author SHA1 Message Date
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
d54db04ac2 Bug 1403744 - Part 1 - Whitelist the per-user extensions dir XRE_USER_SYS_EXTENSION_DIR on Windows. r=bobowen
MozReview-Commit-ID: 8K5c3mUlqna

--HG--
extra : rebase_source : 00f91b3e1112766731119c1cbe14a08387202f60
2017-09-27 16:14:30 -07:00
Alex Gaynor
d755224ded Bug 1403567 - Remove unused access to AppleGraphicsPolicyClient iokit from content process; r=haik
MozReview-Commit-ID: 9yTMgo2FNKm

--HG--
extra : rebase_source : 72cc3a295d8823460aae21ebe149ece2df69d087
2017-09-26 13:05:18 -04:00
Haik Aftandilian
414270b14a Bug 1403669 - [Mac] Per-user and system extensions dir regexes only work for 1-character subdirectory names. r=Alex_Gaynor
MozReview-Commit-ID: L9vNruzMEez

--HG--
extra : rebase_source : 8530cbf1baef919a5a379564d190fb08674aa28d
2017-09-27 11:48:39 -07:00
Alex Gaynor
d1aef777b6 Bug 1404426 - Simplify the macOS content sandbox policy; r=haik
This does two things:

1) Move the level 3 rules to always be applicable, and simplifies level 2 accordingly
2) Consistently uses the raw string literal syntax for regexes

MozReview-Commit-ID: 6iwjOvRVMM7

--HG--
extra : rebase_source : 3ac59219ad0793a98bdb203fb3d247561216a560
2017-09-29 13:13:49 -04:00
Sebastian Hengst
5a95ac34b4 merge mozilla-central to autoland. r=merge a=merge 2017-09-29 11:49:46 +02:00
Haik Aftandilian
f39cc5cc25 Bug 1401756 - [Mac] Remove unneeded mach-lookups from plugin sandbox rules. r=Alex_Gaynor
MozReview-Commit-ID: JsgBzNJC4zF

--HG--
extra : rebase_source : deffeff5e6d39318c55bf3d487071139abaf3c92
2017-09-20 14:05:27 -07:00
David Parks
29d5db60ba Bug 1403707 - Change content sandbox job level to JOB_LOCKDOWN. r=bobowen
Changing definition of Windows content sandbox level 4 (the current Nightly default) to increase the job level from JOB_RESTRICTED to JOB_LOCKDOWN.
2017-09-27 13:36:06 -07:00
Wes Kocher
9d9610f6a3 Merge m-c to autoland, a=merge
MozReview-Commit-ID: Kjjgw1Pdb3U
2017-09-26 17:15:46 -07:00
Bob Owen
8cf423ff54 Bug 1403230: Block WRusr.dll in child processes when using Alternate Desktop. r=jimm 2017-09-26 19:23:39 +01:00
Alex Gaynor
79cf374320 Bug 1403210 - Remove unused access to AppleSNBFBUserClient iokit from content process; r=haik
MozReview-Commit-ID: K4Z48UFfq2w

--HG--
extra : rebase_source : 8664f3e04503ecc48813d45d26b5433afcc65251
2017-09-26 11:32:01 -04:00
Jed Davis
d64e9b800d Bug 1396542 - Let sandboxed content processes read /var/lib/dbus/machine-id. r=gcp
PulseAudio is the only thing that's known to need this.  Note that the
same file often exists as /etc/machine-id, and we currently allow reading
all of /etc (which includes other fingerprinting hazards as well).

MozReview-Commit-ID: FoyKQzhAV6M

--HG--
extra : rebase_source : 593ee0b94cf507681a034d22cd06a9050d56b86a
2017-09-19 19:54:41 -06:00
Gian-Carlo Pascutto
38ecd4cad0 Bug 1399392 - Don't hardcode .config, use XDG_* environment vars. r=jld
MozReview-Commit-ID: 30j9VbHUjFn

--HG--
extra : rebase_source : f36d5ff8d54215899862621908d48b57ffa78af3
2017-09-13 15:55:07 +02:00
Jed Davis
bb7bbfa321 Bug 1363378 - Set close-on-exec in sandbox-related sockets held by parent process. r=gcp
If these aren't close-on-exec, they can be inherited by the crash
reporter process after the parent process has crashed and exited,
causing child processes to continue running when the IPC I/O thread blocks
in the file broker trying to open a GeckoChildCrash temp file.
(Empirically, the main thread then blocks waiting for the I/O thread.)

Operations that run on dedicated threads, like playing media, may
continue even though the main and IPC threads are locked up, resulting in
videos that keep playing sound even though the browser seems to no longer
exist.

If the broker socket is closed as expected when the parent process
exits, the child will return failure from the brokered file operation
and then go on to get an IPC error due to the parent process's
nonexistence, and will exit as normal.

This patch makes the same change to rejected syscall reporting, even
though that's a one-way asynchronous message with no response to wait
for, just in case something goes wrong enough to fill the entire socket
buffer but not so badly broken that it would wind up in an infinite loop
anyway.

SOCK_CLOEXEC has been present since Linux 2.6.26, and it would be used
only if seccomp-bpf is available, so it should be safe to use
unconditionally.

MozReview-Commit-ID: 7tDPBJILzlj

--HG--
extra : rebase_source : b797655dff2eea88c406d83dcee4a859f2a038b7
2017-09-13 12:25:35 -06:00
Sebastian Hengst
45bab258b7 merge mozilla-central to autoland. r=merge a=merge 2017-09-14 00:11:28 +02:00
Gian-Carlo Pascutto
bda88cac9f Bug 1396733 - Add flatpak font dirs to the sandbox whitelist. r=jld
Also clean up the order of paths a bit.

MozReview-Commit-ID: GM62r4N9wL7

--HG--
extra : rebase_source : 7cf620e020808d01a38f38be1fcf2a841df26367
2017-09-13 13:41:21 +02:00
Bob Owen
2e66e542ea Bug 1314801 Part 2: Enable MITIGATION_IMAGE_LOAD_NO_LOW_LABEL and MITIGATION_IMAGE_LOAD_NO_REMOTE on Windows content sandbox. r=jimm 2017-09-13 11:19:41 +01:00
Bob Owen
5e9dff873e Bug 1314801 Part 1: Compile chromium sandbox features that require at least UCRT SDK version 10.0.10586.0. r=jimm 2017-09-13 11:19:41 +01:00
Jed Davis
e6cee20f4d Bug 1397753 - Disallow kill() in sandboxed content processes. r=gcp
As a special case to deal with PulseAudio, testing for a process's
existence with kill(pid, 0) quietly fails with EPERM instead.

(I also added some commentary on umask, since I was touching that part of
the code anyway.)

MozReview-Commit-ID: CM0Aqii13j4

--HG--
extra : rebase_source : 44ef05e9a39a9eea4a649399c63b865f5523d43b
2017-09-07 08:29:02 -06:00
Jed Davis
db2eef4339 Bug 1299581 - Fail waitpid et al. with ECHILD in sandboxed content processes. r=gcp
MozReview-Commit-ID: 7Qjcnrd7KqK

--HG--
extra : rebase_source : 98e9bcb247edad657d8e45e30901861a9193f249
2017-09-07 08:27:32 -06:00
Sebastian Hengst
ecf716b8bb merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: CmMBcpJapLy
2017-09-12 11:35:15 +02:00
Bob Owen
6b4635da55 Bug 1395952: Enhance telemetry for failed launch of Windows sandboxed process by process type/error code key. r=jimm, data-r=rweiss
Only one telemetry accumlation will occur for each key per session.
2017-09-12 07:53:52 +01:00
Chris Manchester
c0a229d4c3 Bug 1386876 - Replace all uses of DISABLE_STL_WRAPPING with a template, remove DISABLE_STL_WRAPPING. r=glandium
MozReview-Commit-ID: FMEtb5PY7iP

--HG--
extra : rebase_source : 3cdee7528846462c758e623d6bcd2e6e17dbabff
2017-09-11 11:33:26 -07:00
Eric Rahm
0617c21c24 Bug 1393230 - Part 2: Fix more improper string usages. r=njn
This fixes improper usages of Find where an offset was actually being use for
the boolean ignore case flag. It also fixes a few instances of passing in a
literal wchar_t to our functions where a NS_LITERAL_STRING or char16_t should
be used instead.

--HG--
extra : rebase_source : 5de1e9335895d65e6db06c510e8887d27be3390f
extra : source : f762f605dd83fc6331161a33e1ef5d54cafbd08d
2017-08-31 15:52:30 -07:00
Alex Gaynor
f7ab109d5e Bug 1229829 - Part 2 - Use an alternate desktop on the local winstation for content processes; r=bobowen
MozReview-Commit-ID: ES52FwM5oFZ

--HG--
extra : rebase_source : 3893d3022f203eb0962f3bcc3490b35514285781
2017-08-16 09:55:19 -04:00
Alex Gaynor
dc31e19e84 Bug 1229829 - Part 1 - Apply chromium sandbox patches from upstream which improves alternate desktop support; r=bobowen
This is 0cb5dadc2b1f84fbbd9c6f75056e38d05a5b07d3 and
db4c64b63d6098294ed255e962700fd2d465575e in the chromium repository.

This allows a single process to create sandboxed children with alternate
desktops on both an alternate winstation and the local winstation.

MozReview-Commit-ID: 8sS7LjoveOk

--HG--
extra : rebase_source : 6915af73743f87ed74ddefe04210dbdd95bb56ed
2017-08-16 09:54:31 -04:00
Jed Davis
d7992cb0de Bug 1383888 - Restrict sandboxed readlinkat() the same as readlink(). r=gcp
MozReview-Commit-ID: 3VLXp7AJePQ

--HG--
extra : rebase_source : f0116599e133d3f7cc079ecdbf0dfaee7168be2d
2017-07-27 17:22:23 -06:00
Bob Owen
60cdfbd0a2 Bug 1392570: On Windows 7 don't attempt to use a job object for the sandbox when it will fail. r=jimm, data-r=rweiss
This patch also adds telemetry for when this occurs, breaking it down for local and remote sessions.
2017-09-01 14:05:49 +01:00
Gian-Carlo Pascutto
180dfb1325 Bug 1391494 - Enforce use of our own copy of strlcpy. r=jld
MozReview-Commit-ID: GQgGJBj1Hjc

--HG--
extra : rebase_source : ac110f76f199e8739b6eebaf123c7e6b58f77135
2017-08-24 19:12:14 +02:00
Haik Aftandilian
2cce1be1b0 Bug 1392988 - Firefox 55.02 on macOS High Sierra cannot play AES encrypted video. r=Alex_Gaynor
Adds access to video encoding/decoding services when running on macOS 10.13 High Sierra.

MozReview-Commit-ID: 6h4dZ6gkFtp

--HG--
extra : rebase_source : 8c5078b336631e3254fcaaf6727dff281c840159
2017-08-28 19:06:07 -07:00
James Forshaw
0b3b189961 Bug 1385928: Take new implementation of GetProcessBaseAddress from chromium commit f398005bc4ca0cc2dab2198faa99d4ee8f4da60d. r=jimm
This should fix issues we have seen with running Firefox from short name paths or moved binaries.
2017-08-15 09:29:46 +00:00
Jed Davis
11d8d1c88e Backed out 3 changesets (bug 1380701, bug 1384804)
Backed out changeset afdd35ed8902 (bug 1384804)
Backed out changeset 9fb892c41a9e (bug 1380701)
Backed out changeset 0d56979a6efa (bug 1380701)
2017-08-24 15:02:48 -06: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
Jed Davis
a2bdc51dd8 Bug 1384986 - Adjust sandbox policy for dconf's mkdir -p behavior. r=gcp
MozReview-Commit-ID: HNvOXNJTc1W

--HG--
extra : rebase_source : 76edd1008731838fc89a5581fee818328d5847e1
2017-08-10 19:02:22 -06:00
Jed Davis
3460ce99ac Bug 1384986 - Prevent sandbox file broker rules from removing rights granted by more general rules. r=gcp
Generally, the intent for the Add* methods is that they always grant
rights in addition to what's already in the policy, not remove them;
this makes subtree rules that overlap single-file rules follow that
principle.

This requires a global analysis because the conflicting rules can be
added in any order.  It does not currently attempt to handle prefix
rules that aren't at a path component boundary, because that's not a
problem we currently have.

MozReview-Commit-ID: 4kv6QoGCBTV

--HG--
extra : rebase_source : 9e41263bbb1c07b8cde40ec2e72d746f17278fcb
2017-08-10 21:38:25 -06:00
Phil Ringnalda
366675feaa Merge m-c to autoland
MozReview-Commit-ID: GCxEZcmHL2w
2017-08-19 15:34:44 -07:00
Phil Ringnalda
9359f5bf39 Merge inbound to m-c, a=merge
MozReview-Commit-ID: LCCoXUsCtmv
2017-08-19 15:29:10 -07:00
Sebastian Hengst
4a4349b10c Backed out changeset 10660affe7a3 (bug 1387569) 2017-08-19 20:21:55 +02:00
Chris Peterson
9ce1ea9579 Bug 1389851 - sandbox: Suppress -Wunreachable-code-return warning in third-party Chromium sandbox code. r=jld
security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc:277:12: warning: 'return' will never be executed [-Wunreachable-code-return]

This return statement is unreachable because SANDBOX_DIE() is a noreturn function:

https://searchfox.org/mozilla-central/rev/a887f0edbd9f6b176b64111455ba62bb0cf356a6/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc#270-274

MozReview-Commit-ID: HDxBJe2ZtPN

--HG--
extra : rebase_source : 07f6cbcf901a54901cc5ea85b84030ea27a668ba
extra : source : f39f78b1a9851d97c6fd7dcbbd1d7ba93e933e08
2017-08-09 18:45:16 -07:00
Sylvestre Ledru
7b612087c3 Bug 1387569 - Also enable -Wno-implicit-fallthrough for gcc for a chromium file (exists from gcc 7) r=gcp
MozReview-Commit-ID: cuQuFcAnWL

--HG--
extra : rebase_source : d67074f94feabc1b32f64e6e988fa2222db626d7
2017-08-06 19:06:36 +02:00
Sylvestre Ledru
e15bcf0f43 Bug 1387569 - Also enable -Wno-implicit-fallthrough for gcc for a chromium file (exists from gcc 7) r=gcp
MozReview-Commit-ID: cuQuFcAnWL

--HG--
extra : rebase_source : 37dec684e14b1d02dab04729c718b5da1fcb25a4
2017-08-06 19:06:36 +02:00
Phil Ringnalda
1ca83fd296 Backed out 5 changesets (bug 1387569) for Windows static build bustage
Backed out changeset eeda521ba0ad (bug 1387569)
Backed out changeset 8d23caf2ccc7 (bug 1387569)
Backed out changeset b5f969313f81 (bug 1387569)
Backed out changeset f642bc883aa5 (bug 1387569)
Backed out changeset 20151eabffea (bug 1387569)

MozReview-Commit-ID: IH0XXePvhiL
2017-08-19 12:20:26 -07:00
Sylvestre Ledru
deeb6caa20 Bug 1387569 - Also enable -Wno-implicit-fallthrough for gcc for a chromium file (exists from gcc 7) r=gcp
MozReview-Commit-ID: cuQuFcAnWL

--HG--
extra : rebase_source : 28b30810aa4cf45d1d393bd94815b39ca81f43da
2017-08-06 19:06:36 +02:00
Haik Aftandilian
74e07cd141 Bug 1388580 - [Mac] Remove miscellaneous iokit open permissions r=Alex_Gaynor
MozReview-Commit-ID: 3StDmeSwZUG

--HG--
extra : rebase_source : 66d73d82f54a9bdd0ebbc35abf0badc2657e5750
2017-08-08 15:57:21 -07:00
Gian-Carlo Pascutto
2254f82025 Bug 1387742 - Whitelist default dynamic linker paths, including /lib64. r=jld
MozReview-Commit-ID: B4HpKZQL8Y0

--HG--
extra : rebase_source : 8303bcc547d5802280c1a1b18fd98c632cc4d387
2017-08-17 17:53:11 +02:00
Gian-Carlo Pascutto
137d2bb87a Bug 1384804 - Allow libnuma to read /proc/self/status, block get_mempolicy. r=jld
MozReview-Commit-ID: EHPVoFQ6jVZ

--HG--
extra : rebase_source : 7945f44a8b95a9e0d9d4dfaabc934aab6e6fd5be
extra : source : 76935696a618b2b6243988595bdd913b5209c200
2017-08-17 16:59:41 +02:00
Jed Davis
898bd21752 Bug 1380701 - Remove the file broker protocol support for two-path operations. r=gcp
Now that all of the operations that took two paths are removed, we can
have less string manipulation running on untrusted inputs in a trusted
context.

Note that the path isn't null-terminated in transit, because we know
the message length and there's no longer any need to delimit anything.
(This is how the protocol worked before the two-path operations were
added.)

MozReview-Commit-ID: 5VHkMoPlWmU

--HG--
extra : rebase_source : 2108a4f7c7bf5098f2ef63786c3675367bd56e19
2017-08-16 15:09:56 -06:00
Jed Davis
a7d1fe2b5f Bug 1380701 - Remove brokering for link, unlink, and rename. r=gcp
In testing (local and CI) these seem to no longer be used.

MozReview-Commit-ID: 2D3C8eWoIsB

--HG--
extra : rebase_source : dde2015af1d036c32631d185703f1149285b253e
2017-07-20 13:43:59 -06:00
Wes Kocher
9a955fd0b3 Backed out 2 changesets (bug 1380701) for bustage in SandboxBroker a=backout
Backed out changeset 6cef83dd4d11 (bug 1380701)
Backed out changeset 4456ebfe5657 (bug 1380701)

MozReview-Commit-ID: Cnfj7TZvCbv
2017-08-16 09:46:48 -07:00