OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |