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

Issue 1826223004: Correctly handle child processes of sandboxed target processes. (Closed)

Created:
4 years, 9 months ago by Will Harris
Modified:
4 years, 9 months ago
Reviewers:
jschuh
CC:
chromium-reviews, wfh+watch_chromium.org, rickyz+watch_chromium.org, penny
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Correctly handle child processes of sandboxed target processes. If the Job blocks child process creation then JOB_OBJECT_MSG_ACTIVE_PROCESS_LIMIT followed by a JOB_OBJECT_MSG_EXIT_PROCESS is sent to the job completion port of the calling process. This was causing a mismatch in the target_process count since it was not being incremented. This CL correctly increments target_counter when these phantom processes are blocked. Since it's not possible to know the process id of a a process that has been blocked by the Job process limit, this CL adds a second counter to track these untracked processes and verifies when receving a JOB_OBJECT_MSG_EXIT_PROCESS or JOB_OBJECT_MSG_ABNORMAL_EXIT_PROCESS that it is either a fully tracked process in broker->child_process_ids_ or that it is an untracked child process of a target. This also adds tests for the case when a child process and a child process of a target crash, which tests the JOB_OBJECT_MSG_ABNORMAL_EXIT_PROCESS path which was previously untested. BUG=584753 TEST=sbox_integration_tests Committed: https://crrev.com/5ce7612392ac2b13f0c1dda92467eb6b106538ac Cr-Commit-Position: refs/heads/master@{#383221}

Patch Set 1 #

Patch Set 2 : remove unused test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+89 lines, -5 lines) Patch
M sandbox/win/src/broker_services.cc View 4 chunks +20 lines, -1 line 0 comments Download
M sandbox/win/src/process_mitigations_test.cc View 1 4 chunks +59 lines, -4 lines 0 comments Download
M sandbox/win/src/process_policy_test.cc View 2 chunks +10 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (7 generated)
Will Harris
PTAL
4 years, 9 months ago (2016-03-24 22:29:13 UTC) #3
jschuh
Crazy. lgtm
4 years, 9 months ago (2016-03-24 22:46:49 UTC) #5
Will Harris
On 2016/03/24 22:46:49, jschuh (very slow) wrote: > Crazy. lgtm Thanks for quick review. verified ...
4 years, 9 months ago (2016-03-25 00:02:28 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1826223004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1826223004/20001
4 years, 9 months ago (2016-03-25 00:02:50 UTC) #9
jschuh
On 2016/03/25 00:02:28, Will Harris wrote: > On 2016/03/24 22:46:49, jschuh (very slow) wrote: > ...
4 years, 9 months ago (2016-03-25 00:03:26 UTC) #10
Will Harris
On 2016/03/25 00:03:26, jschuh (very slow) wrote: > On 2016/03/25 00:02:28, Will Harris wrote: > ...
4 years, 9 months ago (2016-03-25 00:05:09 UTC) #11
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 9 months ago (2016-03-25 01:49:05 UTC) #13
commit-bot: I haz the power
4 years, 9 months ago (2016-03-25 01:50:19 UTC) #15
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/5ce7612392ac2b13f0c1dda92467eb6b106538ac
Cr-Commit-Position: refs/heads/master@{#383221}

Powered by Google App Engine
This is Rietveld 408576698