Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Issue 2654913002: [TO 56] Fix mp4 parsing security bugs. (Closed)

Created:
3 years, 11 months ago by chcunningham
Modified:
3 years, 11 months ago
Reviewers:
DaleCurtis
CC:
chromium-reviews, feature-media-reviews_chromium.org
Target Ref:
refs/pending/branch-heads/2924
Project:
chromium
Visibility:
Public.

Description

[TO 56] Fix mp4 parsing security bugs. -- Cherry-pick notes -- This CL is a merge of the following cherry-picked commits: d5e2e15 MSE: Fix moar mp4 parsing security bugs. 5041e28 MSE: Fix Mp4 SAIO parsing overflow 24f5635 MSE: Fix Mp4 TRUN parsing overflow These each had conflicts due to dependency on safe_math.h functions that are not present in this branch (base::CheckMul). -- CL description -- Boxes with various sub-entries read the entry count from the user provided mp4. Do not trust the counts. Check for size_t and vector resize() overflow to avoid OOB writes in vector allocation. Additionally, verify we have enough bytes to continue parsing before allocating vectors to store parsed data. Also evaluated other box_definition.cc vector resize() calls. Added one additional check for SampleEncryptionEntry (probably overkill). BUG=679645, 679646, 679647, 679653, 679640, 679641 TESTS=new unit tests, manual verification of PoCs TBR=dalecurtis@chromium.org Review-Url: https://codereview.chromium.org/2654913002 . Cr-Commit-Position: refs/branch-heads/2924@{#857} Cr-Branched-From: 3a87aecc31cd1ffe751dd72c04e5a96a1fc8108a-refs/heads/master@{#433059} Committed: https://chromium.googlesource.com/chromium/src/+/bcae749c7aaec4bc26e22a3acb6183dabdce2c96

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+215 lines, -48 lines) Patch
M media/formats/mp4/box_definitions.cc View 8 chunks +71 lines, -15 lines 0 comments Download
M media/formats/mp4/box_reader_unittest.cc View 4 chunks +144 lines, -33 lines 0 comments Download

Messages

Total messages: 4 (3 generated)
chcunningham
3 years, 11 months ago (2017-01-24 22:01:47 UTC) #4
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
bcae749c7aaec4bc26e22a3acb6183dabdce2c96 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698