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

Issue 2811413002: Add check for renderer client id. (Closed)

Created:
3 years, 8 months ago by kylechar
Modified:
3 years, 8 months ago
CC:
xlai (Olivia), Justin Novosad, Fady Samuel
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Check renderer client id for offscreen canvas. Add a check before creating an OffscreenCanvasSurfaceImpl or MojoCompositorFrameSink for offscreen canvas. The renderer should only be using FrameSinkIds within it's own namespace. Without this check, a malicious renderer could learn about SurfaceIds from other clients by guessing the FrameSinkId. After creating an OffscreenCanvasSurfaceImpl any new SurfaceIds for the FrameSinkId get forwarded back to the renderer. BUG=664547 TBR=piman@chromium.org Review-Url: https://codereview.chromium.org/2811413002 Cr-Commit-Position: refs/heads/master@{#465300} Committed: https://chromium.googlesource.com/chromium/src/+/8c09280da3c8a6c4c7e064ddbf7851498abb577d

Patch Set 1 #

Patch Set 2 : Rebase. #

Total comments: 6

Patch Set 3 : Don't CHECK, return early. #

Patch Set 4 : Fix comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -3 lines) Patch
M content/browser/renderer_host/offscreen_canvas_provider_impl.h View 1 2 3 2 chunks +4 lines, -1 line 0 comments Download
M content/browser/renderer_host/offscreen_canvas_provider_impl.cc View 1 2 3 chunks +19 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 28 (20 generated)
kylechar
piman/tsepez: This seems like a potential security problem (at least would be if offscreen canvas ...
3 years, 8 months ago (2017-04-12 22:48:50 UTC) #5
piman
https://codereview.chromium.org/2811413002/diff/20001/content/browser/renderer_host/offscreen_canvas_provider_impl.cc File content/browser/renderer_host/offscreen_canvas_provider_impl.cc (right): https://codereview.chromium.org/2811413002/diff/20001/content/browser/renderer_host/offscreen_canvas_provider_impl.cc#newcode31 content/browser/renderer_host/offscreen_canvas_provider_impl.cc:31: CHECK_EQ(frame_sink_id.client_id(), renderer_client_id_); Can we just return early / do ...
3 years, 8 months ago (2017-04-12 22:53:37 UTC) #6
Fady Samuel
FrameSinkIds aren't really meant to be private. A client still can't embed an arbitrary surface ...
3 years, 8 months ago (2017-04-12 22:55:01 UTC) #8
kylechar
https://codereview.chromium.org/2811413002/diff/20001/content/browser/renderer_host/offscreen_canvas_provider_impl.cc File content/browser/renderer_host/offscreen_canvas_provider_impl.cc (right): https://codereview.chromium.org/2811413002/diff/20001/content/browser/renderer_host/offscreen_canvas_provider_impl.cc#newcode31 content/browser/renderer_host/offscreen_canvas_provider_impl.cc:31: CHECK_EQ(frame_sink_id.client_id(), renderer_client_id_); On 2017/04/12 22:53:37, piman - OOO back ...
3 years, 8 months ago (2017-04-13 17:09:18 UTC) #10
Tom Sepez
LGTM per the unguessable IDs.
3 years, 8 months ago (2017-04-13 17:10:47 UTC) #11
kylechar
TBRing piman since he's OOO for a while.
3 years, 8 months ago (2017-04-18 18:17:08 UTC) #22
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/2811413002/80001
3 years, 8 months ago (2017-04-18 18:17:51 UTC) #25
commit-bot: I haz the power
3 years, 8 months ago (2017-04-18 18:47:57 UTC) #28
Message was sent while issue was closed.
Committed patchset #4 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/8c09280da3c8a6c4c7e064ddbf78...

Powered by Google App Engine
This is Rietveld 408576698