Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Issue 347783002: Alter the design of the bootstrap sandbox to only take over the bootstrap port of children when nec… (Closed)

Created:
6 years, 6 months ago by Robert Sesek
Modified:
6 years, 6 months ago
Reviewers:
Mark Mentovai, jam
CC:
chromium-reviews, darin-cc_chromium.org, erikwright+watch_chromium.org, jam
Project:
chromium
Visibility:
Public.

Description

Alter the design of the bootstrap sandbox to only take over the bootstrap port of children when necessary. Rather than replacing the bootstrap port outright in the browser process, this change merely registers the sandboxed bootstrap port with launchd. When a sandboxed child is being launched with base::LaunchProcess(), a new LaunchOptions can specify a bootstrap name to look up and use as a replacement bootstrap port. The bootstrap port in the new child is replaced after fork() but before exec(). The kernel clears the IPC space during both of these system calls, so no other references to the original bootstrap port will exist after replacing the port with the sandboxed one and exec()ing. This change also partially reverts r276026, which introduced a permissive policy for NPAPI plugins. Since those plugins are no longer affected by the bootstrap sandbox, it can be removed. BUG=367863, 383513, 383517, 383791, 386330 R=jam@chromium.org, mark@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=278530

Patch Set 1 #

Patch Set 2 : bootstrap_check_in #

Total comments: 4

Patch Set 3 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+104 lines, -98 lines) Patch
M base/process/launch.h View 2 chunks +14 lines, -0 lines 0 comments Download
M base/process/launch_mac.cc View 1 2 chunks +20 lines, -0 lines 0 comments Download
M base/process/launch_posix.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/bootstrap_sandbox_mac.cc View 2 chunks +0 lines, -10 lines 0 comments Download
M content/browser/child_process_launcher.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/plugin_process_host.cc View 1 chunk +0 lines, -7 lines 0 comments Download
M content/common/sandbox_mac.mm View 1 chunk +0 lines, -1 line 0 comments Download
M content/common/sandbox_mac_unittest_helper.mm View 1 chunk +0 lines, -4 lines 0 comments Download
M content/plugin/plugin_main_mac.mm View 2 chunks +0 lines, -24 lines 0 comments Download
M content/public/common/sandbox_type_mac.h View 1 chunk +0 lines, -4 lines 0 comments Download
M sandbox/mac/bootstrap_sandbox.h View 1 2 3 chunks +9 lines, -3 lines 0 comments Download
M sandbox/mac/bootstrap_sandbox.cc View 1 5 chunks +24 lines, -28 lines 0 comments Download
M sandbox/mac/bootstrap_sandbox_unittest.mm View 1 chunk +3 lines, -1 line 0 comments Download
M sandbox/mac/launchd_interception_server.h View 1 1 chunk +4 lines, -2 lines 0 comments Download
M sandbox/mac/launchd_interception_server.cc View 1 2 3 chunks +6 lines, -5 lines 0 comments Download
M sandbox/mac/mach_message_server.h View 1 1 chunk +8 lines, -1 line 0 comments Download
M sandbox/mac/mach_message_server.cc View 1 2 chunks +12 lines, -8 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Robert Sesek
6 years, 6 months ago (2014-06-19 15:58:56 UTC) #1
Mark Mentovai
LGTM. A couple of comments need work and we could get tighter on policy now. ...
6 years, 6 months ago (2014-06-19 18:40:12 UTC) #2
Robert Sesek
https://codereview.chromium.org/347783002/diff/40001/sandbox/mac/bootstrap_sandbox.h File sandbox/mac/bootstrap_sandbox.h (right): https://codereview.chromium.org/347783002/diff/40001/sandbox/mac/bootstrap_sandbox.h#newcode29 sandbox/mac/bootstrap_sandbox.h:29: // With this sandbox, the bootstrap port of the ...
6 years, 6 months ago (2014-06-19 18:50:16 UTC) #3
Robert Sesek
+jam for //content OWNERS
6 years, 6 months ago (2014-06-19 18:50:28 UTC) #4
jam
content lgtm
6 years, 6 months ago (2014-06-19 23:21:09 UTC) #5
Robert Sesek
6 years, 6 months ago (2014-06-19 23:46:23 UTC) #6
Message was sent while issue was closed.
Committed patchset #3 manually as r278530 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698