vendor:
by:
6.8
CVSS
MEDIUM
Type Confusion
843
CWE
Product Name:
Affected Version From:
Affected Version To:
Patch Exists: NO
Related CWE:
CPE:
Platforms Tested:
Type Confusion in GlobOpt::UpdateObjPtrValueType
The switch statement in the code only handles Js::TypeIds_Array but not Js::TypeIds_NativeIntArray and Js::TypeIds_NativeFloatArray. This can lead to type confusion when a native float array is considered as of type ObjectType::Object under certain circumstances where the condition "objValueType.IsLikelyArrayOrObjectWithArray()" is not fulfilled. Handling a native array as a definite object can lead to type confusion.
Mitigation:
Update the switch statement to handle Js::TypeIds_NativeIntArray and Js::TypeIds_NativeFloatArray as well, and add appropriate type conversion checks. Ensure that the condition "objValueType.IsLikelyArrayOrObjectWithArray()" is properly fulfilled before considering a native array as a definite object.