Skip to content

Commit 7e235c9

Browse files
sigatrevMikeHolman
authored andcommitted
[CVE-2018-8465] Chakra - Invalid stack read leads to type confusion - Individual
1 parent a404dec commit 7e235c9

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

lib/Backend/arm/LowerMD.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,11 @@ LowererMD::LowerEntryInstr(IR::EntryInstr * entryInstr)
11081108
unwindInfo->SetHasCalls(true);
11091109
}
11101110

1111+
if (Lowerer::IsArgSaveRequired(this->m_func))
1112+
{
1113+
unwindInfo->SetHasCalls(true);
1114+
}
1115+
11111116
bool hasCalls = unwindInfo->GetHasCalls();
11121117

11131118
// Home the params. This is done to enable on-the-fly creation of the arguments object,

lib/Backend/arm64/LowerMD.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,8 @@ ARM64StackLayout::ARM64StackLayout(Func* func)
11291129
// the worst case assumption (homing all NUM_INT_ARG_REGS).
11301130
this->m_hasCalls = func->GetHasCalls() ||
11311131
func->HasAnyStackNestedFunc() ||
1132-
!LowererMD::IsSmallStack(this->TotalStackSize() + NUM_INT_ARG_REGS * MachRegInt);
1132+
!LowererMD::IsSmallStack(this->TotalStackSize() + NUM_INT_ARG_REGS * MachRegInt) ||
1133+
Lowerer::IsArgSaveRequired(func);
11331134

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

0 commit comments

Comments
 (0)