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

Issue 2643123002: MSE: Fix moar 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/heads/master
Project:
chromium
Visibility:
Public.

Description

MSE: Fix moar mp4 parsing security bugs. 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 TEST=Verified POCs no longer crash. New unit tests. Review-Url: https://codereview.chromium.org/2643123002 Cr-Commit-Position: refs/heads/master@{#444935} Committed: https://chromium.googlesource.com/chromium/src/+/d5e2e152b550e4fbfff9b08e7bdf7c9d4c937438

Patch Set 1 #

Total comments: 11

Patch Set 2 : Feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+164 lines, -81 lines) Patch
M media/formats/mp4/box_definitions.cc View 1 6 chunks +43 lines, -11 lines 0 comments Download
M media/formats/mp4/box_reader_unittest.cc View 1 3 chunks +121 lines, -70 lines 0 comments Download

Messages

Total messages: 12 (7 generated)
chcunningham
Hey Dale, fixed the last batch. Refactored the unit tests. https://codereview.chromium.org/2643123002/diff/1/media/formats/mp4/box_reader_unittest.cc File media/formats/mp4/box_reader_unittest.cc (left): https://codereview.chromium.org/2643123002/diff/1/media/formats/mp4/box_reader_unittest.cc#oldcode279 ...
3 years, 11 months ago (2017-01-19 22:49:59 UTC) #2
DaleCurtis
lgtm, nice tests! https://codereview.chromium.org/2643123002/diff/1/media/formats/mp4/box_definitions.cc File media/formats/mp4/box_definitions.cc (right): https://codereview.chromium.org/2643123002/diff/1/media/formats/mp4/box_definitions.cc#newcode486 media/formats/mp4/box_definitions.cc:486: int bytes_per_edit = reader->version() == 1 ...
3 years, 11 months ago (2017-01-19 22:59:30 UTC) #5
chcunningham
Thanks! https://codereview.chromium.org/2643123002/diff/1/media/formats/mp4/box_definitions.cc File media/formats/mp4/box_definitions.cc (right): https://codereview.chromium.org/2643123002/diff/1/media/formats/mp4/box_definitions.cc#newcode486 media/formats/mp4/box_definitions.cc:486: int bytes_per_edit = reader->version() == 1 ? 20 ...
3 years, 11 months ago (2017-01-19 23:55:31 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2643123002/20001
3 years, 11 months ago (2017-01-19 23:56:28 UTC) #9
commit-bot: I haz the power
3 years, 11 months ago (2017-01-20 01:49:03 UTC) #12
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/d5e2e152b550e4fbfff9b08e7bdf...

Powered by Google App Engine
This is Rietveld 408576698