diff options
author | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-12 16:58:52 +0000 |
---|---|---|
committer | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-12 16:58:52 +0000 |
commit | 4e7c72293596ed6a855a94fdedbb8bc6d91c583d (patch) | |
tree | b018fcd4f2e7db1410b80e4d2dd49d3b469b5923 /content/app | |
parent | c7e0995b1c61558a3a3d12848512e48fef3ade8a (diff) | |
download | chromium_src-4e7c72293596ed6a855a94fdedbb8bc6d91c583d.zip chromium_src-4e7c72293596ed6a855a94fdedbb8bc6d91c583d.tar.gz chromium_src-4e7c72293596ed6a855a94fdedbb8bc6d91c583d.tar.bz2 |
Add sandbox support for Windows process mitigations
BUG=147752
Review URL: https://chromiumcodereview.appspot.com/10690058
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156315 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/app')
-rw-r--r-- | content/app/startup_helper_win.cc | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/content/app/startup_helper_win.cc b/content/app/startup_helper_win.cc index 9ead36d..c6f5987 100644 --- a/content/app/startup_helper_win.cc +++ b/content/app/startup_helper_win.cc @@ -10,7 +10,7 @@ #include "base/base_switches.h" #include "base/command_line.h" #include "base/win/windows_version.h" -#include "sandbox/win/src/dep.h" +#include "sandbox/win/src/process_mitigations.h" #include "sandbox/win/src/sandbox_factory.h" namespace { @@ -37,12 +37,17 @@ namespace content { void InitializeSandboxInfo(sandbox::SandboxInterfaceInfo* info) { info->broker_services = sandbox::SandboxFactory::GetBrokerServices(); - if (!info->broker_services) + if (!info->broker_services) { info->target_services = sandbox::SandboxFactory::GetTargetServices(); - - if (base::win::GetVersion() < base::win::VERSION_VISTA) { - // Enforces strong DEP support. Vista uses the NXCOMPAT flag in the exe. - sandbox::SetCurrentProcessDEP(sandbox::DEP_ENABLED); + } else { + // Ensure the proper mitigations are enforced for the browser process. + sandbox::ApplyProcessMitigationsToCurrentProcess( + sandbox::MITIGATION_HEAP_TERMINATE | + sandbox::MITIGATION_DEP | + sandbox::MITIGATION_DEP_NO_ATL_THUNK | + sandbox::MITIGATION_RELOCATE_IMAGE | + sandbox::MITIGATION_RELOCATE_IMAGE_REQUIRED | + sandbox::MITIGATION_BOTTOM_UP_ASLR); } } |