Skip to content

Commit f9b1cde

Browse files
rajatdAtul Katti
authored and
Atul Katti
committed
[CVE-2018-8288] Edge - Chakra JIT ImplicitCallFlags check bypass with Intl - Google, Inc.
1 parent 0ac4253 commit f9b1cde

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

lib/Runtime/Library/IntlEngineInterfaceExtensionObject.cpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -742,18 +742,11 @@ namespace Js
742742
Js::Var args[] = { scriptContext->GetLibrary()->GetUndefined(), scriptContext->GetLibrary()->GetEngineInterfaceObject(), initType };
743743
Js::CallInfo callInfo(Js::CallFlags_Value, _countof(args));
744744

745-
// Clear disable implicit call bit as initialization code doesn't have any side effect
746-
Js::ImplicitCallFlags saveImplicitCallFlags = scriptContext->GetThreadContext()->GetImplicitCallFlags();
747-
scriptContext->GetThreadContext()->ClearDisableImplicitFlags();
748-
749745
Js::Arguments arguments(callInfo, args);
750-
BEGIN_SAFE_REENTRANT_CALL(scriptContext->GetThreadContext())
746+
scriptContext->GetThreadContext()->ExecuteImplicitCall(function, Js::ImplicitCall_Accessor, [=]()->Js::Var
751747
{
752-
JavascriptFunction::CallRootFunctionInScript(function, arguments);
753-
}
754-
END_SAFE_REENTRANT_CALL
755-
756-
scriptContext->GetThreadContext()->SetImplicitCallFlags((Js::ImplicitCallFlags)(saveImplicitCallFlags));
748+
return JavascriptFunction::CallRootFunctionInScript(function, arguments);
749+
});
757750

758751
// Delete prototypes on functions if initialized Intl object
759752
if (intlInitializationType == IntlInitializationType::Intl)

0 commit comments

Comments
 (0)