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

Unified Diff: components/nacl/loader/sandbox_linux/nacl_sandbox_linux.cc

Issue 915823002: Namespace sandbox: add important security checks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/common/sandbox_linux/sandbox_debug_handling_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/loader/sandbox_linux/nacl_sandbox_linux.cc
diff --git a/components/nacl/loader/sandbox_linux/nacl_sandbox_linux.cc b/components/nacl/loader/sandbox_linux/nacl_sandbox_linux.cc
index 8d4a2259e1e2e641f334c5c152c869273efcb685..44cb4f57b8d2153ab4157bbe7a4f861527588a8a 100644
--- a/components/nacl/loader/sandbox_linux/nacl_sandbox_linux.cc
+++ b/components/nacl/loader/sandbox_linux/nacl_sandbox_linux.cc
@@ -115,7 +115,10 @@ void NaClSandbox::InitializeLayerOneSandbox() {
layer_one_enabled_ = true;
} else if (sandbox::NamespaceSandbox::InNewUserNamespace()) {
CHECK(sandbox::Credentials::MoveToNewUserNS());
+ // This relies on SealLayerOneSandbox() to be called later.
+ CHECK(!HasOpenDirectory());
CHECK(sandbox::Credentials::DropFileSystemAccess());
+ CHECK(IsSingleThreaded());
CHECK(sandbox::Credentials::DropAllCapabilities());
CHECK(IsSandboxed());
layer_one_enabled_ = true;
« no previous file with comments | « no previous file | content/common/sandbox_linux/sandbox_debug_handling_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698