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

Issue 1227383003: Remove memset from VideoFrame and mark buffer as unpoisoned (Closed)

Created:
5 years, 5 months ago by emircan
Modified:
5 years, 5 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove memset from VideoFrame and mark buffer as unpoisoned - I removed the memset from AllocateYUV as it looks unnecessary except for FFmpegVideoDecoder. - FFmpegVideoDecoder marks the incoming buffer from VideoFramePool as unpoisoned. BUG=508220 Committed: https://crrev.com/3188c15f1928d96621aab55b575230284709a9c6 Cr-Commit-Position: refs/heads/master@{#339304}

Patch Set 1 #

Total comments: 7

Patch Set 2 : dalecurtis@ comments #

Total comments: 8

Patch Set 3 : dalecurtis@ comments. #

Total comments: 4

Patch Set 4 : Move tests and commments. #

Patch Set 5 : Reverted av_buffer_create size change. #

Patch Set 6 : Move unpoisoned inside ffmpeg_video_decoder. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -16 lines) Patch
M media/base/video_frame.cc View 1 2 3 4 5 1 chunk +0 lines, -3 lines 0 comments Download
M media/base/video_frame_unittest.cc View 1 2 3 4 5 1 chunk +0 lines, -13 lines 0 comments Download
M media/filters/ffmpeg_video_decoder.cc View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (5 generated)
emircan
Please take a look.
5 years, 5 months ago (2015-07-09 21:20:44 UTC) #2
DaleCurtis
Note, this might also allow attackers to get at large chunks of uninitialized memory. Do ...
5 years, 5 months ago (2015-07-09 21:35:11 UTC) #4
DaleCurtis
https://codereview.chromium.org/1227383003/diff/1/media/filters/ffmpeg_video_decoder.cc File media/filters/ffmpeg_video_decoder.cc (left): https://codereview.chromium.org/1227383003/diff/1/media/filters/ffmpeg_video_decoder.cc#oldcode151 media/filters/ffmpeg_video_decoder.cc:151: VideoFrame::AllocationSize(format, coded_size), Hmm, I think we were intentionally using ...
5 years, 5 months ago (2015-07-09 21:36:22 UTC) #5
DaleCurtis
(fyi make sure you send this manually to the msan/valgrind trybots)
5 years, 5 months ago (2015-07-09 21:57:54 UTC) #6
emircan
Thanks dalecurtis@. It looks like all the users of CreateFrame() are overwriting it with new ...
5 years, 5 months ago (2015-07-09 22:12:18 UTC) #7
DaleCurtis
https://codereview.chromium.org/1227383003/diff/1/media/filters/ffmpeg_video_decoder.cc File media/filters/ffmpeg_video_decoder.cc (left): https://codereview.chromium.org/1227383003/diff/1/media/filters/ffmpeg_video_decoder.cc#oldcode151 media/filters/ffmpeg_video_decoder.cc:151: VideoFrame::AllocationSize(format, coded_size), On 2015/07/09 22:12:17, emircan wrote: > On ...
5 years, 5 months ago (2015-07-09 22:21:17 UTC) #8
emircan
https://codereview.chromium.org/1227383003/diff/1/media/filters/ffmpeg_video_decoder.cc File media/filters/ffmpeg_video_decoder.cc (left): https://codereview.chromium.org/1227383003/diff/1/media/filters/ffmpeg_video_decoder.cc#oldcode151 media/filters/ffmpeg_video_decoder.cc:151: VideoFrame::AllocationSize(format, coded_size), On 2015/07/09 22:21:16, DaleCurtis wrote: > On ...
5 years, 5 months ago (2015-07-09 23:16:27 UTC) #9
DaleCurtis
I think with the additional comment context we can get away with |zero_new_frames| since the ...
5 years, 5 months ago (2015-07-09 23:29:44 UTC) #10
miu
https://codereview.chromium.org/1227383003/diff/20001/media/base/video_frame.h File media/base/video_frame.h (right): https://codereview.chromium.org/1227383003/diff/20001/media/base/video_frame.h#newcode291 media/base/video_frame.h:291: static size_t AlignedAllocationSize(const scoped_refptr<VideoFrame>& frame); How is this any ...
5 years, 5 months ago (2015-07-09 23:31:34 UTC) #11
DaleCurtis
https://codereview.chromium.org/1227383003/diff/20001/media/filters/ffmpeg_video_decoder.cc File media/filters/ffmpeg_video_decoder.cc (right): https://codereview.chromium.org/1227383003/diff/20001/media/filters/ffmpeg_video_decoder.cc#newcode129 media/filters/ffmpeg_video_decoder.cc:129: // to do so can lead to unitialized value ...
5 years, 5 months ago (2015-07-09 23:34:43 UTC) #12
Will Harris
On 2015/07/09 23:34:43, DaleCurtis wrote: > https://codereview.chromium.org/1227383003/diff/20001/media/filters/ffmpeg_video_decoder.cc > File media/filters/ffmpeg_video_decoder.cc (right): > > https://codereview.chromium.org/1227383003/diff/20001/media/filters/ffmpeg_video_decoder.cc#newcode129 > ...
5 years, 5 months ago (2015-07-09 23:40:06 UTC) #13
DaleCurtis
On 2015/07/09 23:40:06, Will Harris wrote: > On 2015/07/09 23:34:43, DaleCurtis wrote: > > > ...
5 years, 5 months ago (2015-07-09 23:53:05 UTC) #14
emircan
CreateFrame has many users, and my motive in making a change was after realizing the ...
5 years, 5 months ago (2015-07-10 00:22:53 UTC) #15
DaleCurtis
lgtm, but defer to wfh@ if a annotation based approach can work instead.
5 years, 5 months ago (2015-07-10 00:37:03 UTC) #16
Will Harris
lots of red on the trybots, is there another PS coming?
5 years, 5 months ago (2015-07-10 17:43:24 UTC) #17
miu
I still don't understand why initialising the memory is necessary at all. What are the ...
5 years, 5 months ago (2015-07-10 17:56:41 UTC) #18
emircan
On 2015/07/10 17:43:24, Will Harris wrote: > lots of red on the trybots, is there ...
5 years, 5 months ago (2015-07-10 18:43:40 UTC) #19
DaleCurtis
On 2015/07/10 17:56:41, miu wrote: > I still don't understand why initialising the memory is ...
5 years, 5 months ago (2015-07-13 18:23:34 UTC) #20
emircan
On 2015/07/13 18:23:34, DaleCurtis wrote: > My concern is that large uninitialized blocks of memory ...
5 years, 5 months ago (2015-07-16 23:44:21 UTC) #23
DaleCurtis
lgtm, but I'd run valgrind locally and send it against the msan bot.
5 years, 5 months ago (2015-07-16 23:48:36 UTC) #24
Will Harris
can you update the CL description please?
5 years, 5 months ago (2015-07-17 01:04:05 UTC) #25
miu
lgtm
5 years, 5 months ago (2015-07-17 02:59:50 UTC) #26
emircan
Thanks. I updated the CL description. I ran Valgrind on my local machine and didn't ...
5 years, 5 months ago (2015-07-17 18:03:01 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1227383003/140001
5 years, 5 months ago (2015-07-17 18:07:54 UTC) #29
DaleCurtis
asan bots likely won't be a problem, the msan bot (and clusterfuzz itself) is the ...
5 years, 5 months ago (2015-07-17 18:20:42 UTC) #30
commit-bot: I haz the power
Committed patchset #6 (id:140001)
5 years, 5 months ago (2015-07-17 19:44:08 UTC) #31
commit-bot: I haz the power
5 years, 5 months ago (2015-07-17 19:45:06 UTC) #32
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/3188c15f1928d96621aab55b575230284709a9c6
Cr-Commit-Position: refs/heads/master@{#339304}

Powered by Google App Engine
This is Rietveld 408576698