Skip to content

Commit 8997c70

Browse files
pleathThomas Moore (CHAKRA)
authored andcommitted
[CVE-2018-8513] Type confusion after converting accessor property to data
1 parent cd84a0b commit 8997c70

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/Runtime/Types/PathTypeHandler.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1476,6 +1476,9 @@ namespace Js
14761476
if (!(attributes[descriptor->GetDataPropertyIndex<false>()] & ObjectSlotAttr_Accessor))
14771477
{
14781478
// Setter without a getter; this is a stale entry, so ignore it
1479+
// Just consume the slot so no descriptor refers to it.
1480+
Assert(i == newTypeHandler->nextPropertyIndex);
1481+
::Math::PostInc(newTypeHandler->nextPropertyIndex);
14791482
continue;
14801483
}
14811484
Assert(oldTypeHandler->GetSetterSlotIndex(descriptor->GetDataPropertyIndex<false>()) == newTypeHandler->nextPropertyIndex);

0 commit comments

Comments
 (0)