gecko-dev/security/sandbox
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
..
chromium 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
chromium-shim Bug 1384819 (part 1) - Split MozStackWalk(). r=glandium. 2017-07-27 12:46:47 +10:00
common Bug 1386832 - Part 1 - Move non-sandbox-specific routines out of SandboxSettings. r=jimm 2017-08-09 16:09:55 -07:00
linux Bug 1363378 - Set close-on-exec in sandbox-related sockets held by parent process. r=gcp 2017-09-13 12:25:35 -06:00
mac Bug 1392988 - Firefox 55.02 on macOS High Sierra cannot play AES encrypted video. r=Alex_Gaynor 2017-08-28 19:06:07 -07:00
test Bug 1382260 - Patch 1 - Fix file access test bug. r=Alex_Gaynor 2017-08-22 10:11:01 -07:00
win 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
modifications-to-chromium-to-reapply-after-upstream-merge.txt Bug 1229829 - Part 1 - Apply chromium sandbox patches from upstream which improves alternate desktop support; r=bobowen 2017-08-16 09:54:31 -04:00
moz-chromium-commit-status.txt Bug 1337331 Part 1: Update security/sandbox/chromium/ to commit b169b9a1cc402573843e8c952af14c4e43487e91. r=jld, r=aklotz, r=jimm 2017-03-29 14:23:17 +01:00
moz.build Bug 1386876 - Replace all uses of DISABLE_STL_WRAPPING with a template, remove DISABLE_STL_WRAPPING. r=glandium 2017-09-11 11:33:26 -07:00