forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mojo-core] Don't accept HANDLEs from non-brokers
On Windows, non-broker processes should only accept HANDLEs in messages coming from the broker and/or inviter process. This is because a non-broker or invitee receiver has to assume the sender has already duplicated sent HANDLEs into the receiver's process, and making that assumption requires a level of trust that should not be granted to arbitrary peers. This constraint is already met today under normal circumstances, but a malicious or misbehaving process could easily violate it, tricking an unassuming receiver into attempting double-ownership of an existing handle or closure of an invalid handle value, both of which can result in a crash (though thankfully nothing worse, because of ScopedHandleVerifier). This adds an option to Channel which allows it to reject incoming platform handles and essentially treat them as malformed messages. The option is set on Windows for any non-broker process's receiving Channel endpoint which is not connected directly to a broker process or to the process which invited that client. The Channel fuzzer also sets this option to avoid a crash since it exercises only the non-broker receiving path today. A follow-up CL will extend fuzzer coverage to include broker receivers as well. Bug: 909713 Change-Id: Ie0fece347fcf23d6f8111be4e41398f22d617531 Reviewed-on: https://chromium-review.googlesource.com/c/1363649 Commit-Queue: Ken Rockot <rockot@google.com> Reviewed-by: Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/master@{#615555}
- Loading branch information
Showing
14 changed files
with
168 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.