Bug 1121479 - Part 1: Turn on DEP process-level mitigation for the GMP sandbox. r=tabraldes, a=sledru
authorBob Owen <bobowencode@gmail.com>
Wed, 21 Jan 2015 07:59:56 +0000
changeset 251071 06da1141e8176035b45bd0a09214e597108107ee
parent 251070 9aed7f7c9de8a189998e554b5febf2015f43b298
child 251072 cf64f625cd033006eb58427076a41726bcd22a78
push id698
push userjlund@mozilla.com
push dateMon, 23 Mar 2015 22:08:11 +0000
treeherdermozilla-release@b0c0ae7b02a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstabraldes, sledru
bugs1121479
milestone37.0a2
Bug 1121479 - Part 1: Turn on DEP process-level mitigation for the GMP sandbox. r=tabraldes, a=sledru
security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp
--- a/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp
+++ b/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp
@@ -166,16 +166,22 @@ SandboxBroker::SetSecurityLevelForGMPlug
 
   result = mPolicy->SetIntegrityLevel(sandbox::INTEGRITY_LEVEL_LOW);
   ret = ret && (sandbox::SBOX_ALL_OK == result);
 
   result =
     mPolicy->SetDelayedIntegrityLevel(sandbox::INTEGRITY_LEVEL_UNTRUSTED);
   ret = ret && (sandbox::SBOX_ALL_OK == result);
 
+  sandbox::MitigationFlags mitigations =
+    sandbox::MITIGATION_DEP;
+
+  result = mPolicy->SetProcessMitigations(mitigations);
+  ret = ret && (sandbox::SBOX_ALL_OK == result);
+
   // Add the policy for the client side of a pipe. It is just a file
   // in the \pipe\ namespace. We restrict it to pipes that start with
   // "chrome." so the sandboxed process cannot connect to system services.
   result = mPolicy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES,
                             sandbox::TargetPolicy::FILES_ALLOW_ANY,
                             L"\\??\\pipe\\chrome.*");
   ret = ret && (sandbox::SBOX_ALL_OK == result);