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.
Implement SharedMemory::ShareReadOnlyToProcess().
This avoids potential security holes where the renderer could be exploited and then write into space shared by other renderers or even the browser. I've done this on Posix by opening both a read/write and read-only file descriptor to the same file. Then ShareReadOnlyToProcess dup()s the read-only descriptor instead of the read/write one. It's an error to try to ShareReadOnly from a SharedMemory that was created from a single SharedMemoryHandle. The test checks that operations strictly through the file handle can't get write access to the memory. On Linux there's still a hole through /dev/fd in the filesystem, but jln@ assures me that the sandbox prevents the filesystem-based attack. We should eventually write an explicit test for this. Android needs http://crbug.com/320865 figured out. BUG=302724,320865 Review URL: https://codereview.chromium.org/27265002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236347 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
jyasskin@chromium.org
committed
Nov 20, 2013
1 parent
0c9869d
commit 5f58ada
Showing
7 changed files
with
238 additions
and
42 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
Oops, something went wrong.