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

Unified Diff: content/common/sandbox_win.cc

Issue 2246543002: Enable ALPC lockdown on >= win10 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 2 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_win.cc
diff --git a/content/common/sandbox_win.cc b/content/common/sandbox_win.cc
index 633012ff60d455883dfef18d8b80aa9474a3d51b..f1a5997921e54fc0512bc2d252f9fbd8d34a4443 100644
--- a/content/common/sandbox_win.cc
+++ b/content/common/sandbox_win.cc
@@ -585,6 +585,14 @@ sandbox::ResultCode SetJobLevel(const base::CommandLine& cmd_line,
// TODO(jschuh): Need get these restrictions applied to NaCl and Pepper.
// Just have to figure out what needs to be warmed up first.
sandbox::ResultCode AddBaseHandleClosePolicy(sandbox::TargetPolicy* policy) {
+ if (base::win::GetVersion() >= base::win::VERSION_WIN10) {
+ // Close all ALPC ports.
+ sandbox::ResultCode ret =
+ policy->AddKernelObjectToClose(L"ALPC Port", NULL);
+ if (ret != sandbox::SBOX_ALL_OK) {
+ return ret;
+ }
+ }
// TODO(cpu): Add back the BaseNamedObjects policy.
base::string16 object_path = PrependWindowsSessionPath(
L"\\BaseNamedObjects\\windows_shell_global_counters");
« 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