Skip to content

Commit 1b77d55

Browse files
akroshganeeshdk
authored andcommitted
[CVE-2018-8381] Edge - Child Case of type confusion with EntrySimpleObjectSlotGetter
Marshalling should not be re-entrant. But due to proxy in the prototype chain - we could have prototype trap invoked and things can get worse from there. We had put no-reentrancy macro in there but that protect us on RS3 and up. In order to fix this, we need to check if the current object is proxy or not - in that case break the chain.
1 parent cf3ef50 commit 1b77d55

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/Runtime/Base/CrossSite.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ namespace Js
9999
{
100100
MarshalDynamicObject(scriptContext, prototypeObject);
101101
}
102+
if (JavascriptProxy::Is(prototypeObject))
103+
{
104+
// Fetching prototype of proxy can invoke trap - which we don't want during the marshalling time.
105+
break;
106+
}
102107
prototype = prototypeObject->GetPrototype();
103108
}
104109
}

0 commit comments

Comments
 (0)