Skip to content

Commit 4196f80

Browse files
MikeHolmanAtul Katti
authored and
Atul Katti
committed
[CVE-2018-8276] Edge - Bypass CFG by Exploiting Design Flaw in Chakra - Individual
If attacker can force ServerAddDOMFastPathHelper to be called with bad arguments (e.g. using a separate OOB write vuln on the content process), then we will have an OOB read in JIT process, which leads us to lower a direct call to that OOB value.
1 parent fa89a70 commit 4196f80

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lib/Backend/JnHelperMethod.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ DECLSPEC_GUARDIGNORE _NOINLINE intptr_t GetNonTableMethodAddress(ThreadContextI
283283
///----------------------------------------------------------------------------
284284
intptr_t GetMethodOriginalAddress(ThreadContextInfo * context, JnHelperMethod helperMethod)
285285
{
286+
AssertOrFailFast(helperMethod >= 0 && helperMethod < IR::JnHelperMethodCount);
286287
intptr_t address = GetHelperMethods()[static_cast<WORD>(helperMethod)];
287288
if (address == 0)
288289
{

lib/JITServer/JITServer.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,11 @@ ServerAddDOMFastPathHelper(
329329
Assert(false);
330330
return RPC_S_INVALID_ARG;
331331
}
332+
if (helper < 0 || helper >= IR::JnHelperMethodCount)
333+
{
334+
Assert(UNREACHED);
335+
return E_ACCESSDENIED;
336+
}
332337

333338
return ServerCallWrapper(scriptContextInfo, [&]()->HRESULT
334339
{

0 commit comments

Comments
 (0)