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

Side by Side Diff: content/common/sandbox_win.cc

Issue 1666753002: [Win10 sandbox mitigations] Enable the 3 new mitigations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/sandbox_win.h" 5 #include "content/common/sandbox_win.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 } 692 }
693 693
694 sandbox::TargetPolicy* policy = g_broker_services->CreatePolicy(); 694 sandbox::TargetPolicy* policy = g_broker_services->CreatePolicy();
695 695
696 // Pre-startup mitigations. 696 // Pre-startup mitigations.
697 sandbox::MitigationFlags mitigations = 697 sandbox::MitigationFlags mitigations =
698 sandbox::MITIGATION_HEAP_TERMINATE | 698 sandbox::MITIGATION_HEAP_TERMINATE |
699 sandbox::MITIGATION_BOTTOM_UP_ASLR | 699 sandbox::MITIGATION_BOTTOM_UP_ASLR |
700 sandbox::MITIGATION_DEP | 700 sandbox::MITIGATION_DEP |
701 sandbox::MITIGATION_DEP_NO_ATL_THUNK | 701 sandbox::MITIGATION_DEP_NO_ATL_THUNK |
702 sandbox::MITIGATION_SEHOP; 702 sandbox::MITIGATION_SEHOP |
703 sandbox::MITIGATION_NONSYSTEM_FONT_DISABLE |
704 sandbox::MITIGATION_IMAGE_LOAD_NO_REMOTE |
705 sandbox::MITIGATION_IMAGE_LOAD_NO_LOW_LABEL;
703 706
704 if (policy->SetProcessMitigations(mitigations) != sandbox::SBOX_ALL_OK) 707 if (policy->SetProcessMitigations(mitigations) != sandbox::SBOX_ALL_OK)
705 return base::Process(); 708 return base::Process();
706 709
707 #if !defined(NACL_WIN64) 710 #if !defined(NACL_WIN64)
708 if (type_str == switches::kRendererProcess && 711 if (type_str == switches::kRendererProcess &&
709 IsWin32kRendererLockdownEnabled()) { 712 IsWin32kRendererLockdownEnabled()) {
710 if (!AddWin32kLockdownPolicy(policy)) 713 if (!AddWin32kLockdownPolicy(policy))
711 return base::Process(); 714 return base::Process();
712 } 715 }
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 } 860 }
858 861
859 return false; 862 return false;
860 } 863 }
861 864
862 bool BrokerAddTargetPeer(HANDLE peer_process) { 865 bool BrokerAddTargetPeer(HANDLE peer_process) {
863 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK; 866 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK;
864 } 867 }
865 868
866 } // namespace content 869 } // namespace content
OLDNEW
« 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