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

Issue 2301353007: Fix race in AudioRendererHost around render frame ID validation. (Closed)

Created:
4 years, 3 months ago by miu
Modified:
4 years, 3 months ago
Reviewers:
DaleCurtis, o1ka
CC:
chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, Max Morin, miu+watch_chromium.org, posciak+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix race in AudioRendererHost around render frame ID validation. A bug was identified where IPC messages controlling audio stream state were being ignored/dropped: This was due to the fact that, in builds where DCHECKs were turned on, the additional render frame ID validation was delaying stream creation to a point after the control IPC messages were being processed. This change allows stream creation to proceed, with the render frame ID validation happening in the background. If the validation fails, it will error-out and force-close the stream later. The benefit of this change is that it can also harmlessly be turned on for all builds (i.e., not just when DCHECKs are turned on), for a more-robust security check on the AudioHostMsg_CreateStream IPC message. BUG=633936 Committed: https://crrev.com/2dcff8d1a58297367bc577f4f3554bfffd2c9bd1 Cr-Commit-Position: refs/heads/master@{#417642}

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -64 lines) Patch
M content/browser/renderer_host/media/audio_renderer_host.h View 3 chunks +6 lines, -14 lines 0 comments Download
M content/browser/renderer_host/media/audio_renderer_host.cc View 5 chunks +26 lines, -34 lines 2 comments Download
M content/browser/renderer_host/media/audio_renderer_host_unittest.cc View 5 chunks +12 lines, -16 lines 0 comments Download

Messages

Total messages: 31 (11 generated)
miu
olka and dalecurtis: PTAL. This resolves the race condition noted in the crbug. Note that ...
4 years, 3 months ago (2016-09-03 21:14:42 UTC) #4
o1ka
cc maxmorin@: FYI
4 years, 3 months ago (2016-09-05 10:21:14 UTC) #8
o1ka
https://codereview.chromium.org/2301353007/diff/1/content/browser/renderer_host/media/audio_renderer_host.cc File content/browser/renderer_host/media/audio_renderer_host.cc (right): https://codereview.chromium.org/2301353007/diff/1/content/browser/renderer_host/media/audio_renderer_host.cc#newcode360 content/browser/renderer_host/media/audio_renderer_host.cc:360: ReportErrorAndClose(stream_id); My concern is that (as far as I ...
4 years, 3 months ago (2016-09-05 11:58:38 UTC) #9
o1ka
On 2016/09/03 21:14:42, miu wrote: > olka and dalecurtis: PTAL. This resolves the race condition ...
4 years, 3 months ago (2016-09-05 12:00:51 UTC) #10
o1ka
I think I'm missing something. Why validating frame id during device authorization is not enough? ...
4 years, 3 months ago (2016-09-05 12:13:33 UTC) #11
DaleCurtis
lgtm https://codereview.chromium.org/2301353007/diff/1/content/browser/renderer_host/media/audio_renderer_host.cc File content/browser/renderer_host/media/audio_renderer_host.cc (right): https://codereview.chromium.org/2301353007/diff/1/content/browser/renderer_host/media/audio_renderer_host.cc#newcode360 content/browser/renderer_host/media/audio_renderer_host.cc:360: ReportErrorAndClose(stream_id); On 2016/09/05 at 11:58:38, o1ka wrote: > ...
4 years, 3 months ago (2016-09-06 19:24:40 UTC) #12
miu
On 2016/09/05 12:13:33, o1ka wrote: > I think I'm missing something. Why validating frame id ...
4 years, 3 months ago (2016-09-06 20:08:02 UTC) #13
miu
o1ka: Did Dale's comment (and my response to your other comment) sound good to you?
4 years, 3 months ago (2016-09-06 20:09:11 UTC) #14
o1ka
On 2016/09/06 20:08:02, miu wrote: > On 2016/09/05 12:13:33, o1ka wrote: > > I think ...
4 years, 3 months ago (2016-09-07 12:10:47 UTC) #15
o1ka
> On 2016/09/05 at 11:58:38, o1ka wrote: > > My concern is that (as far ...
4 years, 3 months ago (2016-09-07 12:12:20 UTC) #16
o1ka
On 2016/09/06 20:09:11, miu wrote: > o1ka: Did Dale's comment (and my response to your ...
4 years, 3 months ago (2016-09-07 12:16:38 UTC) #17
miu
On 2016/09/07 12:10:47, o1ka wrote: > So, we won't authorize a non-default device if invalid ...
4 years, 3 months ago (2016-09-08 01:39:21 UTC) #18
o1ka
On 2016/09/08 01:39:21, miu wrote: > On 2016/09/07 12:10:47, o1ka wrote: > > So, we ...
4 years, 3 months ago (2016-09-08 10:25:08 UTC) #19
miu
On 2016/09/08 10:25:08, o1ka wrote: > No-no-no :) we cannot do frame verification for the ...
4 years, 3 months ago (2016-09-08 23:27:14 UTC) #20
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/2301353007/1
4 years, 3 months ago (2016-09-08 23:28:11 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_chromium_compile_only_ng/builds/197294) chromeos_x86-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
4 years, 3 months ago (2016-09-08 23:37:13 UTC) #24
o1ka
> Feel free to loop me in on any > efforts/discussion around helping to clean ...
4 years, 3 months ago (2016-09-09 14:17:59 UTC) #25
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/2301353007/1
4 years, 3 months ago (2016-09-09 18:06:07 UTC) #27
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 3 months ago (2016-09-09 18:33:24 UTC) #29
commit-bot: I haz the power
4 years, 3 months ago (2016-09-09 18:34:43 UTC) #31
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/2dcff8d1a58297367bc577f4f3554bfffd2c9bd1
Cr-Commit-Position: refs/heads/master@{#417642}

Powered by Google App Engine
This is Rietveld 408576698