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

Issue 2478113002: Fix UAF in closures posted from InProcessWorkerObjectProxy (Closed)

Created:
4 years, 1 month ago by alex clarke (OOO till 29th)
Modified:
4 years, 1 month ago
Reviewers:
kinuko, Sami, nhiroki
CC:
chromium-reviews, shimazu+worker_chromium.org, kinuko+worker_chromium.org, blink-reviews, horo+watch_chromium.org, falken+watch_chromium.org, blink-worker-reviews_chromium.org, dcheng
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix UAF in closures posted from InProcessWorkerObjectProxy Tasks posted by InProcessWorkerObjectProxy can be arbitrarily delayed so it's not safe to post a closure with an crossThreadUnretained pointer to the messaging proxy because we can't guarantee it's still there when the closure eventually gets run. We fix this with a WeakPtr. BUG=660427 Committed: https://crrev.com/31ed1877bdb9c27eae9d9da2a3954c16d5758a9b Cr-Commit-Position: refs/heads/master@{#430251}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -17 lines) Patch
M third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.h View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp View 1 chunk +5 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.h View 3 chunks +7 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.cpp View 9 chunks +14 lines, -13 lines 0 comments Download

Messages

Total messages: 22 (14 generated)
alex clarke (OOO till 29th)
4 years, 1 month ago (2016-11-04 11:34:15 UTC) #5
alex clarke (OOO till 29th)
+kinuko for review. I'm not terribly familiar with this code, hopefully the fix is OK!
4 years, 1 month ago (2016-11-04 11:40:07 UTC) #10
Sami
Non-owner lgtm.
4 years, 1 month ago (2016-11-04 11:58:21 UTC) #11
kinuko
I think this lgtm. (Looks like we have a few bugs related to this u-a-f ...
4 years, 1 month ago (2016-11-04 16:33:05 UTC) #15
nhiroki
LGTM. Thank you for working on this!
4 years, 1 month ago (2016-11-07 08:43:36 UTC) #16
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/2478113002/1
4 years, 1 month ago (2016-11-07 10:09:06 UTC) #18
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 1 month ago (2016-11-07 11:22:53 UTC) #20
commit-bot: I haz the power
4 years, 1 month ago (2016-11-07 11:24:56 UTC) #22
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/31ed1877bdb9c27eae9d9da2a3954c16d5758a9b
Cr-Commit-Position: refs/heads/master@{#430251}

Powered by Google App Engine
This is Rietveld 408576698