Chromium Code Reviews
DescriptionCorrectly 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 #
Messages
Total messages: 15 (7 generated)
|
|||||||||||||||||||||||||||||||||||||