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

Issue 1979533003: Fix an attachment broker race condition. (Closed)

Created:
4 years, 7 months ago by erikchen
Modified:
4 years, 7 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix an attachment broker race condition. Race condition: Browser process B starts two new processes: C1 and C2. C1 sends C2 an attachment brokered message, via B. But B has not yet finished establishing its connection with C2. This CL stores wire formats that cannot be immediately sent to the destination process because the connection has not been established. When the connection is established, the wire formats are sent. Note that the resource itself has already been duplicated into the destination. If, for some reason, the connection is never established, then the assumption is that the destination process died. The resource itself will be cleaned up by the OS, but the data structure HandleWireFormat will leak. This is known to be rare. If, at a later point in time, a new process is created with the same process id, the WireFormats will be passed to the new process. There is no security problem, since the resource itself is not being sent. Furthermore, it is unlikely to affect the functionality of the new process, since AttachmentBroker ids are large, unguessable nonces. BUG=609262, 493414 TBR=asvitkine@chromium.org Committed: https://crrev.com/3e0f4d3ce943d23e3862d42a273086613be46155 Cr-Commit-Position: refs/heads/master@{#393882}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -11 lines) Patch
M ipc/attachment_broker.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M ipc/attachment_broker.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M ipc/attachment_broker_privileged.h View 1 2 3 4 2 chunks +5 lines, -1 line 0 comments Download
M ipc/attachment_broker_privileged_win.h View 3 chunks +21 lines, -1 line 0 comments Download
M ipc/attachment_broker_privileged_win.cc View 1 2 3 4 4 chunks +33 lines, -9 lines 0 comments Download
M ipc/ipc_channel_win.cc View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 21 (12 generated)
erikchen
tsepez, jam: To whoever gets here first, please review. This is probably responsible for a ...
4 years, 7 months ago (2016-05-14 01:24:11 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1979533003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1979533003/80001
4 years, 7 months ago (2016-05-14 01:24:56 UTC) #9
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-14 02:42:31 UTC) #11
erikchen
On 2016/05/14 02:42:31, commit-bot: I haz the power wrote: > Dry run: This issue passed ...
4 years, 7 months ago (2016-05-14 22:58:28 UTC) #12
Alexei Svitkine (slow)
histograms xml lgtm, will let others review the logic
4 years, 7 months ago (2016-05-16 14:57:44 UTC) #13
Tom Sepez
lgtm
4 years, 7 months ago (2016-05-16 16:09:39 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1979533003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1979533003/80001
4 years, 7 months ago (2016-05-16 17:26:40 UTC) #16
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 7 months ago (2016-05-16 18:48:07 UTC) #19
commit-bot: I haz the power
4 years, 7 months ago (2016-05-16 18:50:23 UTC) #21
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/3e0f4d3ce943d23e3862d42a273086613be46155
Cr-Commit-Position: refs/heads/master@{#393882}

Powered by Google App Engine
This is Rietveld 408576698