Skip to content

Commit

Permalink
[CVE-2018-8465] Chakra - Invalid stack read leads to type confusion -…
Browse files Browse the repository at this point in the history
… Individual
  • Loading branch information
sigatrev authored and MikeHolman committed Sep 11, 2018
1 parent a404dec commit 7e235c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions lib/Backend/arm/LowerMD.cpp
Expand Up @@ -1108,6 +1108,11 @@ LowererMD::LowerEntryInstr(IR::EntryInstr * entryInstr)
unwindInfo->SetHasCalls(true);
}

if (Lowerer::IsArgSaveRequired(this->m_func))
{
unwindInfo->SetHasCalls(true);
}

bool hasCalls = unwindInfo->GetHasCalls();

// Home the params. This is done to enable on-the-fly creation of the arguments object,
Expand Down
3 changes: 2 additions & 1 deletion lib/Backend/arm64/LowerMD.cpp
Expand Up @@ -1129,7 +1129,8 @@ ARM64StackLayout::ARM64StackLayout(Func* func)
// the worst case assumption (homing all NUM_INT_ARG_REGS).
this->m_hasCalls = func->GetHasCalls() ||
func->HasAnyStackNestedFunc() ||
!LowererMD::IsSmallStack(this->TotalStackSize() + NUM_INT_ARG_REGS * MachRegInt);
!LowererMD::IsSmallStack(this->TotalStackSize() + NUM_INT_ARG_REGS * MachRegInt) ||
Lowerer::IsArgSaveRequired(func);

// Home the params. This is done to enable on-the-fly creation of the arguments object,
// Dyno bailout code, etc. For non-global functions, that means homing all the param registers
Expand Down

0 comments on commit 7e235c9

Please sign in to comment.