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

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

Issue 1720643002: [Win10 sandbox mitigations] MITIGATION_NONSYSTEM_FONT_DISABLE adjustment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review fixes, part 2. 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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 | 703 sandbox::MITIGATION_NONSYSTEM_FONT_DISABLE |
704 sandbox::MITIGATION_IMAGE_LOAD_NO_REMOTE | 704 sandbox::MITIGATION_IMAGE_LOAD_NO_REMOTE |
705 sandbox::MITIGATION_IMAGE_LOAD_NO_LOW_LABEL; 705 sandbox::MITIGATION_IMAGE_LOAD_NO_LOW_LABEL;
706 #if !defined(NACL_WIN64)
707 // Don't block font loading with GDI.
708 if (!gfx::win::ShouldUseDirectWrite())
709 mitigations ^= sandbox::MITIGATION_NONSYSTEM_FONT_DISABLE;
710 #endif
706 711
707 if (policy->SetProcessMitigations(mitigations) != sandbox::SBOX_ALL_OK) 712 if (policy->SetProcessMitigations(mitigations) != sandbox::SBOX_ALL_OK)
708 return base::Process(); 713 return base::Process();
709 714
710 #if !defined(NACL_WIN64) 715 #if !defined(NACL_WIN64)
711 if (type_str == switches::kRendererProcess && 716 if (type_str == switches::kRendererProcess &&
712 IsWin32kRendererLockdownEnabled()) { 717 IsWin32kRendererLockdownEnabled()) {
713 if (!AddWin32kLockdownPolicy(policy)) 718 if (!AddWin32kLockdownPolicy(policy))
714 return base::Process(); 719 return base::Process();
715 } 720 }
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 } 865 }
861 866
862 return false; 867 return false;
863 } 868 }
864 869
865 bool BrokerAddTargetPeer(HANDLE peer_process) { 870 bool BrokerAddTargetPeer(HANDLE peer_process) {
866 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK; 871 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK;
867 } 872 }
868 873
869 } // namespace content 874 } // 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