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

Unified Diff: content/common/sandbox_win.cc

Issue 1626623003: [Win10 sandbox mitigations] Four new Win10 mitigations added. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review changes, part 5. "Fix the nit." Created 4 years, 11 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 | « base/win/windows_version.cc ('k') | sandbox/win/src/broker_services.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/sandbox_win.cc
diff --git a/content/common/sandbox_win.cc b/content/common/sandbox_win.cc
index 523073863b7c667862146a9fe0d102bcafc3585d..3459ad2c46eba6e1d3512c555163c32744ab93e2 100644
--- a/content/common/sandbox_win.cc
+++ b/content/common/sandbox_win.cc
@@ -698,11 +698,13 @@ base::Process StartSandboxedProcess(
sandbox::TargetPolicy* policy = g_broker_services->CreatePolicy();
- sandbox::MitigationFlags mitigations = sandbox::MITIGATION_HEAP_TERMINATE |
- sandbox::MITIGATION_BOTTOM_UP_ASLR |
- sandbox::MITIGATION_DEP |
- sandbox::MITIGATION_DEP_NO_ATL_THUNK |
- sandbox::MITIGATION_SEHOP;
+ // Pre-startup mitigations.
+ sandbox::MitigationFlags mitigations =
+ sandbox::MITIGATION_HEAP_TERMINATE |
+ sandbox::MITIGATION_BOTTOM_UP_ASLR |
+ sandbox::MITIGATION_DEP |
+ sandbox::MITIGATION_DEP_NO_ATL_THUNK |
+ sandbox::MITIGATION_SEHOP;
if (policy->SetProcessMitigations(mitigations) != sandbox::SBOX_ALL_OK)
return base::Process();
@@ -715,6 +717,7 @@ base::Process StartSandboxedProcess(
}
#endif
+ // Post-startup mitigations.
mitigations = sandbox::MITIGATION_STRICT_HANDLE_CHECKS |
sandbox::MITIGATION_DLL_SEARCH_ORDER;
« no previous file with comments | « base/win/windows_version.cc ('k') | sandbox/win/src/broker_services.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698