Skip to content

Commit

Permalink
[CVE-2017-11846] [ChakraCore]- Chakra Array.Shift Heap Overflow RCE -…
Browse files Browse the repository at this point in the history
… Qihoo 360

OOM in the Array.Shift method have left the array in the bad state and later it got overlapped and exploited. Fixed that by making the any exception as failfast in that region
  • Loading branch information
akroshg authored and leirocks committed Nov 14, 2017
1 parent 85d42e7 commit 3f8cc2d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Runtime/Library/JavascriptArray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5825,6 +5825,8 @@ namespace Js
{
isFloatArray = true;
}
// Code below has potential to throw due to OOM or SO. Just FailFast on those cases
AutoDisableInterrupt failFastOnError(scriptContext->GetThreadContext());

if (pArr->head->length != 0)
{
Expand Down Expand Up @@ -5884,6 +5886,8 @@ namespace Js
{
ShiftHelper<Var>(pArr, scriptContext);
}

failFastOnError.Completed();
}
else
{
Expand Down

0 comments on commit 3f8cc2d

Please sign in to comment.