forked from mirrors/gecko-dev
Bug 1936749 - Disable ACG if we detect MpDetours.dll injection. a=dmeehan
Original Revision: https://phabricator.services.mozilla.com/D236890 Differential Revision: https://phabricator.services.mozilla.com/D238183
This commit is contained in:
parent
29dc8d2766
commit
a822487965
1 changed files with 13 additions and 0 deletions
|
|
@ -299,6 +299,19 @@ Result<Ok, mozilla::ipc::LaunchError> SandboxBroker::LaunchApp(
|
|||
"Setting the reduced set of flags should always succeed");
|
||||
}
|
||||
|
||||
// Bug 1936749: MpDetours.dll injection is incompatible with ACG.
|
||||
constexpr sandbox::MitigationFlags kDynamicCodeFlags =
|
||||
sandbox::MITIGATION_DYNAMIC_CODE_DISABLE |
|
||||
sandbox::MITIGATION_DYNAMIC_CODE_DISABLE_WITH_OPT_OUT;
|
||||
sandbox::MitigationFlags delayedMitigations =
|
||||
mPolicy->GetDelayedProcessMitigations();
|
||||
if ((delayedMitigations & kDynamicCodeFlags) &&
|
||||
::GetModuleHandleW(L"MpDetours.dll")) {
|
||||
delayedMitigations &= ~kDynamicCodeFlags;
|
||||
SANDBOX_SUCCEED_OR_CRASH(
|
||||
mPolicy->SetDelayedProcessMitigations(delayedMitigations));
|
||||
}
|
||||
|
||||
// If logging enabled, set up the policy.
|
||||
if (aEnableLogging) {
|
||||
ApplyLoggingPolicy();
|
||||
|
|
|
|||
Loading…
Reference in a new issue