New issue
Advanced search Search tips

Issue 838672 link

Starred by 2 users

WebRTC: Out-of-bounds memory access in WebRTC VP9 Missing Frame Processing

Project Member Reported by, May 1

Issue description

There is a missing check in VP9 frame processing that could lead to memory corruption.

In the file video_coding/, the function RtpFrameReferenceFinder::MissingRequiredFrameVp9 contains the following code:

  size_t temporal_idx = info.gof->temporal_idx[gof_idx];
  for (size_t l = 0; l < temporal_idx; ++l) {
      auto missing_frame_it = missing_frames_for_layer_[l].lower_bound(ref_pid);

missing_frames_for_layer_ is a std::array of length kMaxTemporalLayers which equals 5.

Meanwhile, values in the temporal_idx array are read in in the following code:

    RETURN_FALSE_ON_ERROR(parser->ReadBits(&t, 3));
    vp9->gof.temporal_idx[i] = t;

Reading three bits makes the maximum size of temporal_idx 7, which can go out of bounds of the missing_frames_for_layer_ array.

This issue causes a crash in 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

The attached file 'missingframe' contains the VP9 frame that causes this crash.

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.

Please note it is not sufficient to fix this issue in Chrome, it needs to be upstreamed to webrtc, so all users of the library can get the fix. 

This bug is subject to a 90 day disclosure deadline. After 90 days elapse
or a patch has been made broadly available, the bug report will become
visible to the public.
396 KB Download
6.6 KB View Download
3.7 KB View Download
32.8 KB View Download
Labels: Security_Severity-High M-67 Security_Impact-Stable Pri-1
Status: Assigned (was: Unconfirmed)
Labels: OS-Android OS-Chrome OS-Fuchsia OS-iOS OS-Linux OS-Mac OS-Windows
Thank you for the detailed bug report!

I could not get your reproduction steps to work, but I have uploaded a CL ( that I hope you could test.

You can run "git cl patch 73701" to apply the patch locally.
Status: Fixed (was: Assigned)
This fixes it, thank you!
Project Member

Comment 5 by, May 3

The following revision refers to this bug:

commit a157e080931581b5f6f3f9bc580a137e6062e45b
Author: philipel <>
Date: Thu May 03 12:00:41 2018

VP9 temporal index bounds check.

Bug:  chromium:838672 
Change-Id: Ia531327858b6e40cb7fa03ca1b98c120ba4e1389
Reviewed-by: Stefan Holmer <>
Commit-Queue: Philip Eliasson <>
Cr-Commit-Position: refs/heads/master@{#23099}

Project Member

Comment 6 by, May 3

Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify
Project Member

Comment 7 by, May 3

The following revision refers to this bug:

commit 213a35ad18a045cba0b1edb22f33dfc8d91c8681
Author: <>
Date: Thu May 03 17:33:07 2018

Roll src/third_party/webrtc/ 01042067b..a1f566b28 (14 commits)

$ git log 01042067b..a1f566b28 --date=short --no-merges --format='%ad %ae %s'

Created with:
  roll-dep src/third_party/webrtc
BUG= chromium:838672 ,chromium:None,chromium:755920

The AutoRoll server is located here:

Documentation for the AutoRoller is here:

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.


Change-Id: I2bfdb1d8fa2b497d772d58cf21d7e3c1d1a67c5f
Reviewed-by: webrtc-chromium-autoroll <>
Commit-Queue: webrtc-chromium-autoroll <>
Cr-Commit-Position: refs/heads/master@{#555790}

Labels: Merge-Request-67
Project Member

Comment 9 by, May 4

Labels: -Merge-Request-67 Merge-Review-67 Hotlist-Merge-Review
This bug requires manual review: Less than 21 days to go before AppStore submit on M67
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), kbleicher@(ChromeOS), govind@(Desktop)

For more details visit - Your friendly Sheriffbot
+awhalley@ (Security TPM) for M67 merge review.
NextAction: 2018-05-07
The NextAction date has arrived: 2018-05-07
govind@ - good for 67
Labels: -Merge-Review-67 Merge-Approved-67
Approving merge to M67 branch 3396 based on comment #14. Please merge ASAP so we can pick it up for this week Beta release. Thank you.
Labels: -Merge-Approved-67 Merge-Merged
 philipel@, could you pls provide M67 merged cl link here?
Labels: -Merge-Merged merge-merged-67
Thank you  philipel@.
Labels: Release-0-M67
Labels: CVE-2018-6129 CVE_description-missing
Project Member

Comment 23 by, Aug 9

Labels: -Restrict-View-SecurityNotify allpublic
This bug has been closed for more than 14 weeks. Removing security view restrictions.

For more details visit - Your friendly Sheriffbot

Sign in to add a comment