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

Unified Diff: chrome/browser/win/chrome_elf_init.cc

Issue 1854323002: [Windows Sandbox] Turn on MITIGATION_EXTENSION_POINT_DISABLE for child processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove DISABLE_EXTENSION_POINT for browser process - until IME support can be fixed. Created 4 years, 4 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 | components/nacl/broker/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/win/chrome_elf_init.cc
diff --git a/chrome/browser/win/chrome_elf_init.cc b/chrome/browser/win/chrome_elf_init.cc
index 5c091296c46aa393c7ca68a47c3c5139a3b0b775..d954dbe45454e49c1eb427ed904e44cb31a0cbb9 100644
--- a/chrome/browser/win/chrome_elf_init.cc
+++ b/chrome/browser/win/chrome_elf_init.cc
@@ -18,6 +18,7 @@
#include "chrome_elf/dll_hash/dll_hash.h"
#include "components/variations/variations_associated_data.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/common/content_features.h"
const char kBrowserBlacklistTrialName[] = "BrowserBlacklist";
const char kBrowserBlacklistTrialDisabledGroupName[] = "NoBlacklist";
@@ -109,6 +110,22 @@ void InitializeChromeElf() {
FROM_HERE,
base::Bind(&ReportSuccessfulBlocks),
base::TimeDelta::FromSeconds(kBlacklistReportingDelaySec));
+
+ // Make sure the early finch emergency "off switch" for
+ // sandbox::MITIGATION_EXTENSION_POINT_DISABLE is set properly in reg.
+ // Note: the very existence of this key signals elf to not enable
+ // this mitigation on browser next start.
+ base::win::RegKey finch_security_registry_key(
+ HKEY_CURRENT_USER, elf_sec::kRegSecurityFinchPath, KEY_READ);
+
+ if (base::FeatureList::IsEnabled(features::kWinSboxDisableExtensionPoints)) {
+ if (finch_security_registry_key.Valid())
+ finch_security_registry_key.DeleteKey(L"");
+ } else {
+ if (!finch_security_registry_key.Valid())
+ finch_security_registry_key.Create(
+ HKEY_CURRENT_USER, elf_sec::kRegSecurityFinchPath, KEY_WRITE);
+ }
}
void BrowserBlacklistBeaconSetup() {
« no previous file with comments | « no previous file | components/nacl/broker/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698