Commit Graph
786 Commits
Author SHA1 Message Date
Alex Gaynor 8bf23f6c58 Bug 1380674 - remove the ability to create directories in the content temp directory on macOS; r=haik
MozReview-Commit-ID: 8SDcDTqp2F5
2017-10-03 09:49:44 -04:00
Wes Kocher 69734038a4 Merge m-c to autoland, a=merge CLOSED TREE
MozReview-Commit-ID: HeJwJwwTzhQ
2017-10-02 16:26:42 -07:00
Wes Kocher faa6e08cb7 Merge inbound to central, a=merge
MozReview-Commit-ID: CvJ9hmTQBcR
2017-10-02 16:22:37 -07:00
Gian-Carlo Pascutto 95760a086d Bug 1384804 - Allow reading /proc/self/status for libnuma. r=jld
MozReview-Commit-ID: LLwmPVtj0PE
2017-09-28 16:19:02 +02:00
Alex Gaynor b01da78cab Bug 1403567 - Remove unused access to AppleGraphicsPolicyClient iokit from content process; r=haik
MozReview-Commit-ID: 9yTMgo2FNKm
2017-09-26 13:05:18 -04:00
Haik Aftandilian 16e069d5f3 Bug 1403669 - [Mac] Per-user and system extensions dir regexes only work for 1-character subdirectory names. r=Alex_Gaynor
MozReview-Commit-ID: L9vNruzMEez
2017-09-27 11:48:39 -07:00
Alex Gaynor 7a780caa29 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
2017-09-29 13:13:49 -04:00
Sebastian Hengst 2b5eefaa89 merge mozilla-central to autoland. r=merge a=merge 2017-09-29 11:49:46 +02:00
Haik Aftandilian c536b6877e Bug 1401756 - [Mac] Remove unneeded mach-lookups from plugin sandbox rules. r=Alex_Gaynor
MozReview-Commit-ID: JsgBzNJC4zF
2017-09-20 14:05:27 -07:00
David Parks f1ee58786f 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
Haik Aftandilian e822f6eae0 Bug 1403744 - Part 2 - Test that the per-user extensions dir is readable from content on Windows. r=bobowen
MozReview-Commit-ID: 7YN7S7R39CU
2017-09-29 12:44:22 -07:00
Haik Aftandilian d445f8bc34 Bug 1403744 - Part 1 - Whitelist the per-user extensions dir XRE_USER_SYS_EXTENSION_DIR on Windows. r=bobowen
MozReview-Commit-ID: 8K5c3mUlqna
2017-09-27 16:14:30 -07:00
Wes Kocher 6952cfe436 Merge m-c to autoland, a=merge
MozReview-Commit-ID: Kjjgw1Pdb3U
2017-09-26 17:15:46 -07:00
Bob Owen 4cd641c5e7 Bug 1403230: Block WRusr.dll in child processes when using Alternate Desktop. r=jimm 2017-09-26 19:23:39 +01:00
Alex Gaynor 7ad19ff866 Bug 1403210 - Remove unused access to AppleSNBFBUserClient iokit from content process; r=haik
MozReview-Commit-ID: K4Z48UFfq2w
2017-09-26 11:32:01 -04:00
Jed Davis 0b7a4983f6 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
2017-09-19 19:54:41 -06:00
Gian-Carlo Pascutto efd975ca23 Bug 1399392 - Don't hardcode .config, use XDG_* environment vars. r=jld
MozReview-Commit-ID: 30j9VbHUjFn
2017-09-13 15:55:07 +02:00
Jed Davis 4aae4d4c85 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
2017-09-13 12:25:35 -06:00
Sebastian Hengst b2d95c824e merge mozilla-central to autoland. r=merge a=merge 2017-09-14 00:11:28 +02:00
Gian-Carlo Pascutto 700b926033 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
2017-09-13 13:41:21 +02:00
Bob Owen c815718ef9 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 470facaa69 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 8db75177d4 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
2017-09-07 08:29:02 -06:00
Jed Davis f97f42ff84 Bug 1299581 - Fail waitpid et al. with ECHILD in sandboxed content processes. r=gcp
MozReview-Commit-ID: 7Qjcnrd7KqK
2017-09-07 08:27:32 -06:00
Sebastian Hengst 3da80f316b merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: CmMBcpJapLy
2017-09-12 11:35:15 +02:00
Bob Owen fb1888e37e 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 67a3d90503 Bug 1386876 - Replace all uses of DISABLE_STL_WRAPPING with a template, remove DISABLE_STL_WRAPPING. r=glandium
MozReview-Commit-ID: FMEtb5PY7iP
2017-09-11 11:33:26 -07:00
Eric Rahm 1e281805ca 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.
2017-08-31 15:52:30 -07:00
Alex Gaynor 3b14d0b5c4 Bug 1229829 - Part 2 - Use an alternate desktop on the local winstation for content processes; r=bobowen
MozReview-Commit-ID: ES52FwM5oFZ
2017-08-16 09:55:19 -04:00
Alex Gaynor fbc6e437e0 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
2017-08-16 09:54:31 -04:00
Jed Davis d3f2cb5ed7 Bug 1383888 - Restrict sandboxed readlinkat() the same as readlink(). r=gcp
MozReview-Commit-ID: 3VLXp7AJePQ
2017-07-27 17:22:23 -06:00
Bob Owen 85ea287490 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 1c35af7bba Bug 1391494 - Enforce use of our own copy of strlcpy. r=jld
MozReview-Commit-ID: GQgGJBj1Hjc
2017-08-24 19:12:14 +02:00
Haik Aftandilian 787cbf7b53 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
2017-08-28 19:06:07 -07:00
James Forshaw 5c45ac7030 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 40cab4912d 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 96c4d9c39d Bug 1382260 - Patch 2 - [Mac] Allow reading of font files from the content sandbox. r=Alex_Gaynor
MozReview-Commit-ID: 9W5aqQweFmd
2017-08-18 16:12:07 -07:00
Haik Aftandilian a606ea0697 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
2017-08-22 10:11:01 -07:00
Jed Davis e4ec4e6d70 Bug 1384986 - Adjust sandbox policy for dconf's mkdir -p behavior. r=gcp
MozReview-Commit-ID: HNvOXNJTc1W
2017-08-10 19:02:22 -06:00
Jed Davis 1db6668c32 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
2017-08-10 21:38:25 -06:00
Phil Ringnalda a272f15358 Merge m-c to autoland
MozReview-Commit-ID: GCxEZcmHL2w
2017-08-19 15:34:44 -07:00
Phil Ringnalda 8375c5b301 Merge inbound to m-c, a=merge
MozReview-Commit-ID: LCCoXUsCtmv
2017-08-19 15:29:10 -07:00
Sebastian Hengst 9ef800395b Backed out changeset 10660affe7a3 (bug 1387569) 2017-08-19 20:21:55 +02:00
Chris Peterson 6b2b011a43 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
2017-08-09 18:45:16 -07:00
Sylvestre Ledru fac4ef9004 Bug 1387569 - Also enable -Wno-implicit-fallthrough for gcc for a chromium file (exists from gcc 7) r=gcp
MozReview-Commit-ID: cuQuFcAnWL
2017-08-06 19:06:36 +02:00
Sylvestre Ledru 1cafacbf90 Bug 1387569 - Also enable -Wno-implicit-fallthrough for gcc for a chromium file (exists from gcc 7) r=gcp
MozReview-Commit-ID: cuQuFcAnWL
2017-08-06 19:06:36 +02:00
Phil Ringnalda fed51070bb 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 12905f77e2 Bug 1387569 - Also enable -Wno-implicit-fallthrough for gcc for a chromium file (exists from gcc 7) r=gcp
MozReview-Commit-ID: cuQuFcAnWL
2017-08-06 19:06:36 +02:00
Haik Aftandilian 8764425ea2 Bug 1388580 - [Mac] Remove miscellaneous iokit open permissions r=Alex_Gaynor
MozReview-Commit-ID: 3StDmeSwZUG
2017-08-08 15:57:21 -07:00
Gian-Carlo Pascutto 04ed2b22ae Bug 1387742 - Whitelist default dynamic linker paths, including /lib64. r=jld
MozReview-Commit-ID: B4HpKZQL8Y0
2017-08-17 17:53:11 +02:00