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

Unified Diff: content/common/sandbox_policy.cc

Issue 10913305: Enable more Windows mitigations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/sandbox_policy.cc
===================================================================
--- content/common/sandbox_policy.cc (revision 157450)
+++ content/common/sandbox_policy.cc (working copy)
@@ -727,28 +727,31 @@
return process;
}
- // TODO(jschuh): Add all Win8 mitigations. crbug.com/147752
- if (type != content::PROCESS_TYPE_NACL_LOADER) {
- if (policy->SetProcessMitigations(MITIGATION_DEP |
- MITIGATION_DEP_NO_ATL_THUNK |
- MITIGATION_SEHOP |
- MITIGATION_BOTTOM_UP_ASLR)
- != sandbox::SBOX_ALL_OK) {
- return 0;
- }
- } else {
- // TODO(jschuh): Make NaCl work with DEP and SEHOP. crbug.com/147752
- if (policy->SetDelayedProcessMitigations(MITIGATION_DEP |
- MITIGATION_DEP_NO_ATL_THUNK)
- != sandbox::SBOX_ALL_OK) {
- return 0;
- }
- if (policy->SetProcessMitigations(MITIGATION_BOTTOM_UP_ASLR)
- != sandbox::SBOX_ALL_OK) {
- return 0;
- }
- }
+ // TODO(jschuh): Make NaCl work with DEP and SEHOP. crbug.com/147752
+ sandbox::MitigationFlags mitigations = MITIGATION_RELOCATE_IMAGE |
+ MITIGATION_RELOCATE_IMAGE_REQUIRED |
+ MITIGATION_HEAP_TERMINATE |
+#if !defined(NACL_WIN64)
+ MITIGATION_DEP |
+ MITIGATION_DEP_NO_ATL_THUNK |
+ MITIGATION_SEHOP |
+#endif
+ MITIGATION_BOTTOM_UP_ASLR |
+ MITIGATION_HIGH_ENTROPY_ASLR;
+ if (policy->SetProcessMitigations(mitigations) != sandbox::SBOX_ALL_OK)
cpu_(ooo_6.6-7.5) 2012/09/21 19:30:27 can we move 739 and 740 so that the #ifdef block i
jschuh 2012/09/21 19:43:11 Done.
+ return 0;
+ mitigations = MITIGATION_STRICT_HANDLE_CHECKS |
+ MITIGATION_EXTENSION_DLL_DISABLE |
+#if defined(NACL_WIN64)
+ MITIGATION_DEP |
+ MITIGATION_DEP_NO_ATL_THUNK |
+#endif
+ MITIGATION_DLL_SEARCH_ORDER;
+
+ if (policy->SetDelayedProcessMitigations(mitigations) != sandbox::SBOX_ALL_OK)
+ return 0;
+
if (type == content::PROCESS_TYPE_PLUGIN) {
AddGenericDllEvictionPolicy(policy);
AddPluginDllEvictionPolicy(policy);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698