Google Chrome WebRTC 安全漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1125146 漏洞类型 缓冲区错误
发布时间 2018-06-08 更新时间 2019-07-02
CVE编号 CVE-2018-6130 CNNVD-ID CNNVD-201805-1029
漏洞平台 Multiple CVSS评分 N/A
Google Chrome是美国谷歌(Google)公司的一款Web浏览器。 Google Chrome 67.0.3396.62之前版本中的WebRTC存在安全漏洞。远程攻击者可通过诱使用户访问特制的网站利用该漏洞绕过安全限制,获取系统的访问权限(内存越界访问)。
There is a missing check in VP9 frame processing that could lead to memory corruption.

In the file video_coding/, the function RtpFrameReferenceFinder::ManageFrameVp9 fetches the GofInfo based on a pic_idx parsed from the incoming packet header. If the incoming frame is of type kVideoFrameKey, find is called on an iterator and the result is used without checking whether the it succeeds.

 if (frame->frame_type() == kVideoFrameKey) {
    GofInfo info = gof_info_.find(codec_header.tl0_pic_idx)->second;
    FrameReceivedVp9(frame->id.picture_id, &info);
    return kHandOff;

This can cause a pointer to memory outside the gof_info_ map to be passed to FrameReceivedVp9. This function both reads and writes the info structure.

This issue does not crash reliably, so I recommend reproducing it using an asan build of Chrome. To reproduce the issue:

1) unzip the attached on a local webserver
2) fetch the webrtc source (, and replace src/modules/rtp_rtcp/source/ with the version attached to the code
3) build webrtc, including the examples
4) run the attached with python 3.6 or higher
5) start the peerconnection_client sample in the webrtc examples. Connect to the recommended server, and then select test2 as the peer to connect to
6) visit in chrome
7) Enter any username and hit "Log in"
8) Type anything into the chat window at the bottom and hit send

Chrome should crash in a few seconds.

Though the attached PoC requires user interaction, it is not necessary to exercise this issue in a browser.

This issue affects any browser that supports VP9, and can be reached by loading a single webpage (though some browsers will prompt for permissions). It also affects native clients (such as mobile applications) that use webrtc and support VP9, though the user has to place or answer a video call for their client to be in the state where this issue is reachable.

I recommend fixing this by changing the above code to:

    auto gof_info_it = gof_info_.find(codec_header.tl0_pic_idx);
    if (gof_info_it == gof_info_.end())
        return kDrop;
    GofInfo info = gof_info_it->second;
    FrameReceivedVp9(frame->id.picture_id, &info);

I have verified that this fix would prevent the crash.

Proof of Concept: