Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.13.2, 5.14.0, 5.14, 5.15
-
-
2d566bb65def5b759bb4d93d767c4377bc6c5e0a
Description
ReturnedValue IntrinsicTypedArrayPrototype::method_set(const FunctionObject *b, const Value *thisObject, const Value *argv, int argc) { ... Scoped<TypedArray> srcTypedArray(scope, argv[0]); if (!srcTypedArray) { ... double len = ScopedValue(scope, o->get(scope.engine->id_length()))->toNumber(); uint l = (uint)len; ... if (offset + l > a->length()) RETURN_RESULT(scope.engine->throwRangeError(QStringLiteral("TypedArray.set: out of range"))); ... while (idx < l) { val = o->get(idx); ... val = val->convertedToNumber(); ... a->d()->type->write(b, val); ... ++idx; b += elementSize; } RETURN_UNDEFINED(); } ... }
offset + l > a->length() has an integer overflow, which will cause a heap overflow.
This vulnerability can lead to code execution.
Credit to de29f079ab47688a575c7a901402089d