Commit Graph

233 Commits

Author SHA1 Message Date
Julian Hector
d5bb492be4 Bug 1274873 - Part 2: Move signal handler set up to SandboxEarlyInit() r=jld 2016-05-26 16:20:44 +02:00
Julian Hector
1f2003d5b1 Bug 1274873 - Part 1: Change search order for free signal r=jld 2016-05-26 16:19:28 +02:00
Carsten "Tomcat" Book
efa443d4d3 Backed out changeset ae5286493f15 (bug 1274873) for frequent timeouts in browser_ManifestObtainer_obtain.js
--HG--
extra : rebase_source : 5aa2340db1e93f26feb5c3173b8af4aacdb60b31
2016-06-07 12:07:16 +02:00
Carsten "Tomcat" Book
1d324ed30a Backed out changeset 62646bfa1f95 (bug 1274873)
--HG--
extra : rebase_source : 644a5678b4f8e32e9809583cf7eb88fb0a518f31
2016-06-07 12:06:51 +02:00
Julian Hector
fd5c167bdc Bug 1276470 - Add sys_statfs to seccomp whitelist. r=jld 2016-05-28 20:33:49 +02:00
Julian Hector
1b857c2f98 Bug 1274873 - Part 2: Move signal handler set up to SandboxEarlyInit() r=jld 2016-05-26 16:20:44 +02:00
Julian Hector
1c0ad8ce67 Bug 1274873 - Part 1: Change search order for free signal r=jld 2016-05-26 16:19:28 +02:00
Julian Hector
d0f949dad4 Bug 1275786 - Add sys_listen to seccomp whitelist. r=jld
--HG--
extra : rebase_source : 7028482ca148f63e53e1fe915d0be507b5116c84
2016-05-27 16:00:50 +02:00
Julian Hector
cb6d29b0b7 Bug 1275785 - Add sys_bind to seccomp whitelist. r=jld
--HG--
extra : rebase_source : 90d403a3b21547ff7f280b2bff7746f4b8e32fe3
2016-05-27 15:58:51 +02:00
Julian Hector
5eb8b17162 Bug 1275781 - Add sys_accept to seccomp whitelist. r=jld
--HG--
extra : rebase_source : e4761ce8c466987f54ddd41603fa626923fe0865
2016-05-27 15:56:35 +02:00
Alexandre Lissy
c6be1d0d13 Bug 1274826 - Bypass building SandboxHooks on Gonk r=jld
MozReview-Commit-ID: 3TVdcY7aXvW

--HG--
extra : rebase_source : b734c54ad4e7b8fff384f399b84014410b4cf719
2016-05-26 01:02:25 +02:00
Gian-Carlo Pascutto
e8fd20fdcf Bug 1098428 - Add Linux sandboxing information to Telemetry. r=gfritzsche
MozReview-Commit-ID: 6Un4yNzxGgg

--HG--
extra : rebase_source : fc8762b9802fab071cb194513a5ad390ae7984f3
2016-05-18 18:37:44 +02:00
Carsten "Tomcat" Book
be11014a2b Backed out changeset 767f65379fdf (bug 1098428) for causing linux crashes on a CLOSED TREE 2016-05-24 13:03:00 +02:00
Gian-Carlo Pascutto
42b1907a65 Bug 1098428 - Add Linux sandboxing information to Telemetry. r=gfritzsche
MozReview-Commit-ID: GtIPsRqq5hr

--HG--
extra : rebase_source : 6b918e5119f15536c9437c27cfee413577268b78
2016-05-18 18:37:44 +02:00
Julian Hector
5894681e14 Bug 1274553 - Properly handle stat() requests in permissive mode. r=jld
MozReview-Commit-ID: IeFwQ2Gv21z

--HG--
extra : rebase_source : 0198c5df41f728f85bea149a10dfe0b7c0fae43f
2016-05-20 14:42:50 +02:00
Chris Peterson
353ee65255 Bug 1272513 - Part 1: Suppress -Wshadow warnings-as-errors in some directories. r=glandium 2016-05-11 00:00:01 -07:00
Gian-Carlo Pascutto
6491a25e6f Bug 1268579 - Add inotify_rm_watch to the seccomp-bpf whitelist. r=jld
MozReview-Commit-ID: DvaHjOa5GOv

--HG--
extra : rebase_source : 1105ebd32973f8608c4c8b21dc72ba9313661735
2016-04-28 20:04:06 +02:00
Nicholas Nethercote
2511b2c327 Bug 1267550 (part 2) - Rename MOZ_WARN_UNUSED_RESULT as MOZ_MUST_USE. r=froydnj.
It's an annotation that is used a lot, and should be used even more, so a
shorter name is better.

MozReview-Commit-ID: 1VS4Dney4WX

--HG--
extra : rebase_source : b26919c1b0fcb32e5339adeef5be5becae6032cf
2016-04-27 14:16:50 +10:00
Julian Hector
4c291ae709 Bug 1176099 - Fix missing NULL check r=luke
MozReview-Commit-ID: ICNQNqJZzA8
2016-04-28 20:41:14 +02:00
Julian Hector
3871240519 Bug 1176099 - Add hooks for sigprocmask/pthread_sigmask. r=jld r=glandium 2016-04-21 13:17:50 +00:00
Julian Hector
1942e09c83 Bug 1266298 - Add sys_fchmod to seccomp whitelist r=jld
MozReview-Commit-ID: 4kFgfxhCMFl

--HG--
extra : transplant_source : h%D1%90%ACfP%DC%5C%CB%CC%84%CE%B7%40%17%14%B1%10%FC%AA
2016-04-21 15:59:53 +02:00
Julian Hector
d9a01beca2 Bug 1259283 - Add sys_fchown to seccomp whitelist. r=jld 2016-04-13 12:41:19 +00:00
Thomas Zimmermann
e1b5ef463a Bug 1264226: Don't use '_COARSE' Posix clocks if not defined, r=jld
Not all systems (i.e., Gonk) support CLOCK_MONOTONIC_COARSE and
CLOCK_REALTIME_COARSE. With this patch, we don't refer to them if
they are not supported.
2016-04-14 10:12:39 +02:00
Chris Pearce
cb3b390405 Bug 1245789 - Whitelist functions needed by Widevine CDM in GMP child processes. r=jed
MozReview-Commit-ID: C6bpItv1qpi
2016-04-12 16:12:21 +12:00
Julian Hector
2d64db058c Bug 1259273 - Add sys_unlink to seccomp-bpf whitelist. r=jld 2016-04-06 19:48:23 +00:00
Boris Zbarsky
bc347a401b Bug 1257919 part 10. Make the caller and formattedStack getters on JSStackFrame take an explicit JSContext. r=khuey 2016-03-22 13:50:35 -04:00
Boris Zbarsky
42b3bbe27a Bug 1257919 part 8. Make the line/column number getters on JSStackFrame take an explicit JSContext. r=khuey 2016-03-22 13:50:31 -04:00
Boris Zbarsky
54987c5cc1 Bug 1257919 part 7. Make the name getter on JSStackFrame take an explicit JSContext. r=khuey 2016-03-22 13:50:31 -04:00
Boris Zbarsky
efa07c06d1 Bug 1257919 part 6. Make the filename getter on JSStackFrame take an explicit JSContext. r=khuey 2016-03-22 13:50:31 -04:00
Sebastian Hengst
0e9bf1445a Backed out changeset 6e95ee3cd4c6 (bug 1257919) 2016-03-22 21:10:21 +01:00
Sebastian Hengst
e6e4d30446 Backed out changeset c4faeb0be959 (bug 1257919) 2016-03-22 21:10:12 +01:00
Sebastian Hengst
336c2cc4ae Backed out changeset 08f1c7239cdf (bug 1257919) 2016-03-22 21:10:01 +01:00
Sebastian Hengst
8b2bf79a7a Backed out changeset ff81c52375ba (bug 1257919) 2016-03-22 21:09:32 +01:00
Boris Zbarsky
8062407932 Bug 1257919 part 10. Make the caller and formattedStack getters on JSStackFrame take an explicit JSContext. r=khuey 2016-03-22 13:50:35 -04:00
Boris Zbarsky
5df498fbd2 Bug 1257919 part 8. Make the line/column number getters on JSStackFrame take an explicit JSContext. r=khuey 2016-03-22 13:50:31 -04:00
Boris Zbarsky
cc563df19f Bug 1257919 part 7. Make the name getter on JSStackFrame take an explicit JSContext. r=khuey 2016-03-22 13:50:31 -04:00
Boris Zbarsky
38af226a36 Bug 1257919 part 6. Make the filename getter on JSStackFrame take an explicit JSContext. r=khuey 2016-03-22 13:50:31 -04:00
Daniel Holbert
bda0bd02db Bug 1253194: Suppress -Wimplicit-fallthrough clang warning for intentional fallthrough in icu_utf.cc (which is imported code). r=bobowen 2016-03-04 09:00:40 -08:00
Jed Davis
48de284e31 Bug 1222500 - Handle unexpected thread creation better on desktop Linux. r=gdestuynder 2015-11-30 18:21:00 +01:00
Julian Hector
4b2655c8d9 Bug 1215303 - Part 2 - automatically enable broker when in permissive mode r=jld 2015-11-13 12:29:47 +00:00
Julian Hector
46f56a1f0e Bug 1215303 - Part 1 - add permissive mode r=jld 2015-11-13 12:27:45 +00:00
Jed Davis
8be1ae39c7 Bug 1207790 - Fix sandbox build for older Linux distributions. r=gdestuynder 2015-10-30 15:13:00 +01:00
Birunthan Mohanathas
9985829ecc Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02:00
Jed Davis
e31f20875c Bug 1215734 - Expand GeckoMediaPlugin sandbox policy for Clang 3.7 ASan. r=kang 2015-10-22 11:19:37 -07:00
Jed Davis
1ae9d0519b Bug 930258 - Part 3: a file broker policy for the B2G emulator. r=kang 2015-10-07 22:13:08 -07:00
Jed Davis
562c4e7b57 Bug 930258 - Part 2: seccomp-bpf integration. r=kang 2015-10-07 22:13:08 -07:00
Jed Davis
bd859174ac Bug 930258 - Part 1: The file broker, and unit tests for it. r=kang f=froydnj 2015-10-07 22:13:08 -07:00
Jed Davis
0db519c66f Bug 1207401 - Send B2G sandbox logging to both stderr and logcat. r=kang 2015-10-05 09:21:39 -07:00
Jed Davis
52cee33b7e Bug 1199481 - Complain more when entering sandboxing code as root. r=kang 2015-08-28 13:37:00 +02:00
Jed Davis
7c8e037b3f Bug 1199413 - Fix MOZ_DISABLE_GMP_SANDBOX so it disables all the sandboxing. r=kang
Bonus fix: don't start the chroot helper unless we're going to use
it.  For this to matter, you'd need a system with unprivileged user
namespaces but no seccomp-bpf (or fake it with env vars) *and* to set
media.gmp.insecure.allow, so this is more to set a good example for
future changes to this code than for functional reasons.
2015-08-28 12:18:00 +02:00
Nicholas Nethercote
f44287005f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00
Jed Davis
b7a032eb04 Bug 1004011 - Support SECCOMP_FILTER_FLAG_TSYNC if available. r=kang
--HG--
extra : rebase_source : 32be610d889fedb518e062a4a416331be21378d3
2015-08-11 16:30:00 -04:00
Jed Davis
fc9b22c883 Bug 1181704 - Use chromium SafeSPrintf for sandbox logging. r=gdestuynder r=glandium
This gives us a logging macro that's safe to use in async signal context
(cf. bug 1046210, where we needed this and didn't have it).

This patch also changes one of the format strings to work with
SafeSPrintf's format string dialect; upstream would probably take a
patch to handle those letters, but this is easier.
2015-07-09 12:09:00 +02:00
Wes Kocher
c00da5ced5 Backed out 2 changesets (bug 1181704) for static build bustage CLOSED TREE
Backed out changeset fbf7aca43c3a (bug 1181704)
Backed out changeset 8864c0587ced (bug 1181704)
2015-07-13 16:51:17 -07:00
Jed Davis
60984b0ab1 Bug 1181704 - Use chromium SafeSPrintf for sandbox logging. r=kang r=glandium
This gives us a logging macro that's safe to use in async signal context
(cf. bug 1046210, where we needed this and didn't have it).

This patch also changes one of the format strings to work with
SafeSPrintf's format string dialect; upstream would probably take a
patch to handle those letters, but this is easier.
2015-07-13 16:17:58 -07:00
Jed Davis
1fb9a20a64 Bug 1176085 - Fix second/nanosecond confusion in Linux sandbox start error case. r=kang
--HG--
extra : amend_source : e546416d9c058305f4cb00d1c015daaec8ab1362
2015-06-19 14:26:44 -07:00
Benoit Girard
8d6a67f6d3 Bug 1172216 - Move nsStackwalk to mozglue. r=glandium
--HG--
rename : xpcom/base/nsStackWalk.cpp => mozglue/misc/StackWalk.cpp
rename : xpcom/base/nsStackWalk.h => mozglue/misc/StackWalk.h
extra : commitid : EMbWGfjKvdq
extra : rebase_source : b7308eb569cc1a019d3b7a92aaff0de7a49b5682
2015-06-10 16:32:45 -04:00
Jed Davis
8ac1db457e Bug 1168555 - Work around Nuwa not always being single-threaded when a normal content process is. r=kang 2015-06-10 13:38:00 -04:00
Jed Davis
9db695d73b Bug 1055310 - Step 3: Move syscall interceptions into SandboxFilter.cpp. r=kang
We can now keep the part of the policy implemented by upcalls to
userspace in the same place as the part of the policy that's handled
entirely in the kernel.  This will become more useful in the future
(e.g., bug 930258).
2015-06-05 15:17:40 -07:00
Jed Davis
5e4e0f9184 Bug 1055310 - Step 2: Move SIGSYS handling to Chromium TrapRegistry. r=kang
This is more complicated than I'd like it to be, because we don't have
a good way to combine a specific trap function's knowledge that we want
to get a crash dump with the SIGSYS handler's copy of the unprocessed
signal info (which breakpad wants).  The bpf_dsl interface requires a
specific trap function type (via the TrapRegistry superclass), so even
if we implement our own registry we can't change what's passed to it.
Normally we could use thread-local storage to get around that, but it's
not async signal safe.

As a result there is an imperfect compromise: the trap function returns
a failure with ENOSYS, Chromium's SIGSYS handler writes it into the
context, our SIGSYS handler reads it back out and uses a copy of
the original signal context for the crash dump.  Other error codes
(and returning ENOSYS via the seccomp-bpf policy itself) are handled
normally.
2015-06-05 15:17:35 -07:00
Jed Davis
3bd337c32c Bug 1055310 - Step 1: Convert seccomp-bpf policies to Chromium PolicyCompiler. r=kang
This completely rewrites SandboxFilter.cpp and removes SandboxAssembler.
System calls are now loosely grouped by what they do, now that order
doesn't matter, and most of the intersection the content and media
plugin whitelists is moved into a common superclass.  Hopefully this
improves the readability and comprehensibility of the syscall policies.

Also, the macros that take the syscall name are gone, because a plain
case label usually suffices now (the CASES_FOR_thing macros are a little
unsightly, but they're relatively simple), and at one point we saw
strange macro expansion issues with system header files that #define'd
some syscall names.

The signal handling is not migrated yet, so Trap() actions can't be used
yet; the next patch will take care of that, and to keep the intermediate
state working there's a minimal shim.

Bonus fix: non-const global variables use the "g" prefix; "s" is for
static class members and static variables in a function (where the
default is to allocate a separate copy per instance/activation).
2015-06-05 15:17:32 -07:00
Jed Davis
06998bb825 Bug 1162965 - Use /dev/shm instead of /tmp for sandbox chroot if possible. r=kang 2015-05-14 16:19:08 -07:00
Jed Davis
89c80effa2 Bug 1154184 - Don't use Linux sandbox gtest dir if not building tests. r=gps 2015-04-24 17:36:08 -07:00
Ehsan Akhgari
399276d5fc Bug 1153348 - Add an analysis to prohibit operator bools which aren't marked as either explicit or MOZ_IMPLICIT; r=jrmuizel
This is the counterpart to the existing analysis to catch
constructors which aren't marked as either explicit or
MOZ_IMPLICIT.
2015-04-21 21:40:49 -04:00
Jed Davis
ba1cc023b7 Bug 1151607 - Step 2: Apply net/ipc namespace separation and chroot to media plugins. r=kang
This needs more unit tests for the various pieces of what's going on
here (LinuxCapabilities, SandboxChroot, UnshareUserNamespace()) but
that's nontrivial due to needing a single-threaded process -- and
currently they can't be run on Mozilla's CI anyway due to needing user
namespaces, and local testing can just try using GMP and manually
inspecting the child process.  So that will be a followup.
2015-04-10 18:05:19 -07:00
Jed Davis
6bf3d102d8 Bug 1151607 - Step 1.5: Avoid unlikely false positives in Linux SandboxInfo feature detection. r=kang
Using the equivalent of release assertions in the patch after this one
is easier to justify if I can't come up with vaguely legitimate reasons
why they might fail; this detects the ones I thought of.
2015-04-10 18:05:19 -07:00
Jed Davis
32cb9ee32d Bug 1151607 - Step 1: Add Linux sandboxing hook for when child processes are still single-threaded. r=kang r=bent
This means that B2G plugin-container must (dynamically) link against
libmozsandbox in order to call into it before initializing Binder.
(Desktop Linux plugin-container already contains the sandbox code.)
2015-04-10 18:05:19 -07:00
Jed Davis
cf24e12150 Bug 1151607 - Step 0: sort includes to make the following patches cleaner. r=kang 2015-04-10 18:05:19 -07:00
Wes Kocher
8794504c9f Merge m-c to inbound a=merge CLOSED TREE 2015-03-23 16:51:22 -07:00
Edwin Flores
fb38caf19c Bug 1146192 - Whitelist sched_yield syscall in GMP sandbox on Linux DONTBUILD CLOSED TREE - r=jld 2015-03-24 10:56:49 +13:00
Edwin Flores
75fa281404 Bug 1146192 - Backed out changeset d2918bcf0d90 for missing bug number - r=me 2015-03-24 10:53:10 +13:00
Jed Davis
1d7005b2a5 Bug 1144514 - Whitelist pread64 in content seccomp-bpf policy. r=kang
--HG--
extra : histedit_source : b16050ba3308df92df608cc6fc09069d21df6deb
2015-03-19 11:57:00 -04:00
Ehsan Akhgari
883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Edwin Flores
3b412c43dd Bug 1XXXXXX - Whitelist sched_yield syscall in GMP sandbox on Linux - r=jld 2015-03-24 09:55:36 +13:00
Jed Davis
09d9f7bb4a Bug 1144580 - Whitelist pselect6 in content seccomp-bpf policy. r=kang 2015-03-18 15:30:00 +01:00
Jed Davis
f6d18ff6da Bug 1141906 - Adjust some assertions in Linux sandbox feature detection. r=kang
See bug, and comment at top of SandboxInfo.cpp, for rationale.

Bonus fix: reword comment about nested namespace limit; the exact limit
is 33 (not counting the root) but doesn't particularly matter.
2015-03-17 22:50:00 +01:00
Jed Davis
d56d610ecf Bug 1141885 - Make readlink() fail instead of allowing it, for B2G content processes. r=kang
--HG--
extra : rebase_source : c9ceababcd741979058361e96161d575a70bd39f
2015-03-13 13:47:56 -07:00
Jed Davis
99b4a73239 Bug 1142263 - Specify all syscall parameters when doing CLONE_NEWUSER detection; f=bwc r=kang 2015-03-13 13:01:28 +01:00
Jed Davis
2d14f8d244 Bug 906996 - Remove unlink from B2G content process syscall whitelist. r=kang 2015-03-11 12:39:00 +01:00
Jed Davis
19355a43d5 Bug 1137007 - Detect namespace and SECCOMP_FILTER_FLAG_TSYNC support in SandboxInfo. r=kang, r=Unfocused
Currently, only user namespace support is detected.  This is targeted at
desktop, where (1) user namespace creation is effectively a prerequisite
for unsharing any other namespace, and (2) any kernel with user
namespace support almost certainly has all the others.

Bonus fix: remove extra copy of sandbox flag key names in about:support;
if JS property iteration order ever ceases to follow creation order, the
table rows could be permuted, but this doesn't really matter.
2015-03-06 13:59:00 -05:00
Jed Davis
01e2b0e158 Bug 1140111 - Whitelist readlinkat along with readlink. r=kang 2015-03-07 10:44:23 -05:00
Jed Davis
c5b6b444f2 Bug 1134942 - Whitelist fstatat and unlinkat for B2G content processes. r=gdestuynder 2015-02-20 12:16:00 +01:00
Bob Owen
a887f0edbd Bug 1102195 Part 1: Update Chromium sandbox code to commit df7cc6c04725630dd4460f29d858a77507343b24. r=aklotz, r=jld 2015-02-11 08:22:02 +00:00
Bob Owen
d1e58e9137 Bug 1102215: Move security/sandbox/chromium/base/shim/ to new directory security/sandbox/chromium-shim/ r=ted
--HG--
rename : security/sandbox/chromium/base/shim/base/gtest_prod_util.h => security/sandbox/chromium-shim/base/gtest_prod_util.h
rename : security/sandbox/chromium/base/shim/base/logging.cpp => security/sandbox/chromium-shim/base/logging.cpp
rename : security/sandbox/chromium/base/shim/base/strings/string_piece.h => security/sandbox/chromium-shim/base/strings/string_piece.h
rename : security/sandbox/chromium/base/shim/base/third_party/nspr/prtime.h => security/sandbox/chromium-shim/base/third_party/nspr/prtime.h
rename : security/sandbox/chromium/base/shim/base/third_party/nspr/prtypes.h => security/sandbox/chromium-shim/base/third_party/nspr/prtypes.h
rename : security/sandbox/chromium/base/shim/base/threading/thread_local_storage.h => security/sandbox/chromium-shim/base/threading/thread_local_storage.h
rename : security/sandbox/chromium/base/shim/base/tracked_objects.h => security/sandbox/chromium-shim/base/tracked_objects.h
rename : security/sandbox/chromium/base/shim/base/win/registry.h => security/sandbox/chromium-shim/base/win/registry.h
rename : security/sandbox/chromium/base/shim/sdkdecls.h => security/sandbox/chromium-shim/base/win/sdkdecls.h
rename : security/sandbox/win/src/logging/loggingCallbacks.h => security/sandbox/chromium-shim/sandbox/win/loggingCallbacks.h
rename : security/sandbox/win/src/logging/loggingTypes.h => security/sandbox/chromium-shim/sandbox/win/loggingTypes.h
rename : security/sandbox/win/src/logging/sandboxLogging.cpp => security/sandbox/chromium-shim/sandbox/win/sandboxLogging.cpp
rename : security/sandbox/win/src/logging/sandboxLogging.h => security/sandbox/chromium-shim/sandbox/win/sandboxLogging.h
2015-01-22 08:37:30 +00:00
Bob Owen
a7e3f06626 Bug 1102211: Move security/sandbox/build/ into security/sandbox/chromium/ r=ted
--HG--
rename : security/sandbox/build/build_config.h => security/sandbox/chromium/build/build_config.h
rename : security/sandbox/chromium-commit-status.txt => security/sandbox/moz-chromium-commit-status.txt
2015-01-22 08:37:30 +00:00
Carsten "Tomcat" Book
0db90d7550 Backed out changeset 4ccaf5ae9ced (bug 1102211) for bustage on a CLOSED TREE
--HG--
rename : security/sandbox/chromium/build/build_config.h => security/sandbox/build/build_config.h
rename : security/sandbox/moz-chromium-commit-status.txt => security/sandbox/chromium-commit-status.txt
2015-01-22 10:25:39 +01:00
Carsten "Tomcat" Book
8347439402 Backed out changeset 43f1f9eef449 (bug 1102215)
--HG--
rename : security/sandbox/chromium-shim/base/gtest_prod_util.h => security/sandbox/chromium/base/shim/base/gtest_prod_util.h
rename : security/sandbox/chromium-shim/base/logging.cpp => security/sandbox/chromium/base/shim/base/logging.cpp
rename : security/sandbox/chromium-shim/base/strings/string_piece.h => security/sandbox/chromium/base/shim/base/strings/string_piece.h
rename : security/sandbox/chromium-shim/base/third_party/nspr/prtime.h => security/sandbox/chromium/base/shim/base/third_party/nspr/prtime.h
rename : security/sandbox/chromium-shim/base/third_party/nspr/prtypes.h => security/sandbox/chromium/base/shim/base/third_party/nspr/prtypes.h
rename : security/sandbox/chromium-shim/base/threading/thread_local_storage.h => security/sandbox/chromium/base/shim/base/threading/thread_local_storage.h
rename : security/sandbox/chromium-shim/base/tracked_objects.h => security/sandbox/chromium/base/shim/base/tracked_objects.h
rename : security/sandbox/chromium-shim/base/win/registry.h => security/sandbox/chromium/base/shim/base/win/registry.h
rename : security/sandbox/chromium-shim/base/win/sdkdecls.h => security/sandbox/chromium/base/shim/sdkdecls.h
rename : security/sandbox/chromium-shim/sandbox/win/loggingCallbacks.h => security/sandbox/win/src/logging/loggingCallbacks.h
rename : security/sandbox/chromium-shim/sandbox/win/loggingTypes.h => security/sandbox/win/src/logging/loggingTypes.h
rename : security/sandbox/chromium-shim/sandbox/win/sandboxLogging.cpp => security/sandbox/win/src/logging/sandboxLogging.cpp
rename : security/sandbox/chromium-shim/sandbox/win/sandboxLogging.h => security/sandbox/win/src/logging/sandboxLogging.h
2015-01-22 10:25:03 +01:00
Bob Owen
ec569fff70 Bug 1102215: Move security/sandbox/chromium/base/shim/ to new directory security/sandbox/chromium-shim/ r=ted
--HG--
rename : security/sandbox/chromium/base/shim/base/gtest_prod_util.h => security/sandbox/chromium-shim/base/gtest_prod_util.h
rename : security/sandbox/chromium/base/shim/base/logging.cpp => security/sandbox/chromium-shim/base/logging.cpp
rename : security/sandbox/chromium/base/shim/base/strings/string_piece.h => security/sandbox/chromium-shim/base/strings/string_piece.h
rename : security/sandbox/chromium/base/shim/base/third_party/nspr/prtime.h => security/sandbox/chromium-shim/base/third_party/nspr/prtime.h
rename : security/sandbox/chromium/base/shim/base/third_party/nspr/prtypes.h => security/sandbox/chromium-shim/base/third_party/nspr/prtypes.h
rename : security/sandbox/chromium/base/shim/base/threading/thread_local_storage.h => security/sandbox/chromium-shim/base/threading/thread_local_storage.h
rename : security/sandbox/chromium/base/shim/base/tracked_objects.h => security/sandbox/chromium-shim/base/tracked_objects.h
rename : security/sandbox/chromium/base/shim/base/win/registry.h => security/sandbox/chromium-shim/base/win/registry.h
rename : security/sandbox/chromium/base/shim/sdkdecls.h => security/sandbox/chromium-shim/base/win/sdkdecls.h
rename : security/sandbox/win/src/logging/loggingCallbacks.h => security/sandbox/chromium-shim/sandbox/win/loggingCallbacks.h
rename : security/sandbox/win/src/logging/loggingTypes.h => security/sandbox/chromium-shim/sandbox/win/loggingTypes.h
rename : security/sandbox/win/src/logging/sandboxLogging.cpp => security/sandbox/chromium-shim/sandbox/win/sandboxLogging.cpp
rename : security/sandbox/win/src/logging/sandboxLogging.h => security/sandbox/chromium-shim/sandbox/win/sandboxLogging.h
2015-01-22 08:37:30 +00:00
Bob Owen
2b11d85b9b Bug 1102211: Move security/sandbox/build/ into security/sandbox/chromium/ r=ted
--HG--
rename : security/sandbox/build/build_config.h => security/sandbox/chromium/build/build_config.h
rename : security/sandbox/chromium-commit-status.txt => security/sandbox/moz-chromium-commit-status.txt
2015-01-22 08:37:30 +00:00
Masatoshi Kimura
bf312ad056 Bug 1120062 - Part 1: Remove most Nullptr.h includes. r=waldo 2015-01-11 11:34:52 +09:00
Kai-Zhen Li
b2ba6d9ceb bug 1102277 - Update seccomp filter for newer bionic. r=jld 2014-11-21 01:07:15 +08:00
Jed Davis
344f6abf7b Bug 1093334 - Delete unnecessary copies of Chromium headers in security/sandbox/linux. r=kang 2014-12-10 17:26:12 -08:00
Jed Davis
c2384cf7c7 Bug 1093334 - Adjust includes of Linux sandboxing headers from Chromium. r=kang
Also re-sorts some of the includes into something closer to the style guide.
2014-12-10 17:26:12 -08:00
Jed Davis
30ba635db0 Bug 1102209 - Remove use of CodeGen::JoinInstructions in the Linux sandboxing code. r=kang
This reorganizes SandboxAssembler to stack up the policy rules and
traverse them in reverse order to build the filter DAG from tail to head
(i.e., starting with "deny all" and prepending allow and return-errno
rules).  Thus, this code will continue to work (perhaps with minor
changes, such as to the NodePtr typedef) with future versions of the
Chromium sandbox code that don't allow mutating the filter program with
the JoinInstructions method.
2014-12-10 17:26:12 -08:00
Jed Davis
114cf4fb41 Bug 1108759 - Fix B2G no-optimization builds. r=glandium 2014-12-10 16:17:47 -08:00
Jay Wang
56bf9455a1 Bug 1105452 - Need to use new Audio system APIs for audio offload playback. r=roc, r=jld, r=ggrisco
Resolve the build failure caused by API changes

There are some changes in Audio APIs in Android version
21. Modifying the code to use the new APIs.

Change-Id: I24fdeb20f8f957d05fb6c0c317de0a6f0769c347

Resolve seccomp violation caused by syscall 256

Modify the filter to allow syscall 256 (set_tid_address).

Change-Id: I49461770c4c5e70bf68462d34321381b0b7ead0a
2014-12-02 17:10:00 -05:00
Jed Davis
1b16fc180f Bug 1101170 - Move Linux sandbox code into plugin-container on desktop. r=kang r=glandium
Specifically:
* SandboxCrash() uses internal Gecko interfaces, so stays in libxul.
* SandboxInfo moves to libxul from libmozsandbox, which no longer exists.
* Where libxul calls Set*Sandbox(), it uses weak symbols.
* Everything remains as it was on mobile.
2014-11-24 15:22:13 -08:00
Jed Davis
2fdd7150c1 Bug 1101170 - Move sandbox status info into a separate module. r=kang r=glandium
This changes the interface so that the code which determines the flags
can live in one place, but checking the flags doesn't need to call into
another library.

Also removes the no-op wrappers for Set*Sandbox when disabled at build
time; nothing used them, one of them was unusable due to having the wrong
type, and all they really accomplish is allowing sloppiness with ifdefs
(which could hide actual mistakes).
2014-11-24 15:22:13 -08:00
Jed Davis
59573e5f85 Bug 1077057 - Expose Linux sandboxing information to JS via nsSystemInfo. r=kang r=froydnj
This adds "hasSeccompBPF" for seccomp-bpf support; other "has" keys
will be added in the future (e.g., user namespaces).

This also adds "canSandboxContent" and "canSandboxMedia", which are
absent if the corresponding type of sandboxing isn't enabled at build
type (or is disabled with environment variables), and otherwise present
as a boolean indicating whether that type of sandboxing is supported.
Currently this is always the same as hasSeccompBPF, but that could change
in the future.

Some changes have been made to the "mozilla/Sandbox.h" interface to
support this; the idea is that the MOZ_DISABLE_*_SANDBOX environment
variables should be equivalent to disabling MOZ_*_SANDBOX at build time.
2014-11-06 13:11:00 +01:00
Jed Davis
e6ede214a5 Bug 1093893 - Fix B2G sandbox for ICS Bionic pthread_kill(). r=kang 2014-11-06 11:04:14 -08:00