Skip to content

Commit 9b36ce8

Browse files
sigatrevThomas Moore (CHAKRA)
authored andcommitted
[CVE-2018-8510] Edge - missing BytecodeUses for IsIn optimization leads to type confusion
1 parent a278643 commit 9b36ce8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/Backend/GlobOptArrays.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,8 @@ void GlobOpt::ArraySrcOpt::CheckVirtualArrayBounds()
320320
{
321321
Assert(instr->m_opcode == Js::OpCode::InlineArrayPush ||
322322
instr->m_opcode == Js::OpCode::InlineArrayPop ||
323-
instr->m_opcode == Js::OpCode::LdLen_A);
323+
instr->m_opcode == Js::OpCode::LdLen_A ||
324+
instr->m_opcode == Js::OpCode::IsIn);
324325
}
325326

326327
eliminatedLowerBoundCheck = true;
@@ -1988,6 +1989,8 @@ void GlobOpt::ArraySrcOpt::Optimize()
19881989
{
19891990
TRACE_TESTTRACE_PHASE_INSTR(Js::Phase::BoundCheckEliminationPhase, instr, _u("Eliminating IsIn\n"));
19901991

1992+
globOpt->CaptureByteCodeSymUses(instr);
1993+
19911994
instr->m_opcode = Js::OpCode::Ld_A;
19921995

19931996
IR::AddrOpnd * addrOpnd = IR::AddrOpnd::New(func->GetScriptContextInfo()->GetTrueAddr(), IR::AddrOpndKindDynamicVar, func, true);

0 commit comments

Comments
 (0)