Add "win-rt-app" command-line flag to disable MITIGATION_STRICT_HANDLE_CHECKS
and avoid sandboxed renderer process crash in WinRT apps (issue #2274)
This commit is contained in:
parent
934eaba67c
commit
700dc254a7
|
@ -345,4 +345,9 @@ patches = [
|
||||||
# https://bitbucket.org/chromiumembedded/cef/issues/2258
|
# https://bitbucket.org/chromiumembedded/cef/issues/2258
|
||||||
'name': 'DEPS',
|
'name': 'DEPS',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
# Don't enable sandbox::MITIGATION_STRICT_HANDLE_CHECKS in WinRT apps.
|
||||||
|
# https://bitbucket.org/chromiumembedded/cef/issues/2274
|
||||||
|
'name': 'win_rt_2274',
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
diff --git content/common/sandbox_win.cc content/common/sandbox_win.cc
|
||||||
|
index 54e31d365696..8a2374e48b51 100644
|
||||||
|
--- content/common/sandbox_win.cc
|
||||||
|
+++ content/common/sandbox_win.cc
|
||||||
|
@@ -793,8 +793,11 @@ sandbox::ResultCode StartSandboxedProcess(
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Post-startup mitigations.
|
||||||
|
- mitigations = sandbox::MITIGATION_STRICT_HANDLE_CHECKS |
|
||||||
|
- sandbox::MITIGATION_DLL_SEARCH_ORDER;
|
||||||
|
+ mitigations = sandbox::MITIGATION_DLL_SEARCH_ORDER;
|
||||||
|
+ if (!browser_command_line.HasSwitch("win-rt-app")) {
|
||||||
|
+ // Don't enable this mitigation in WinRT apps. See issue #2274.
|
||||||
|
+ mitigations |= sandbox::MITIGATION_STRICT_HANDLE_CHECKS;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
result = policy->SetDelayedProcessMitigations(mitigations);
|
||||||
|
if (result != sandbox::SBOX_ALL_OK)
|
Loading…
Reference in New Issue