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

Issue 1539573002: Fix shutdown UAF in MessagePipeDispatcher in new Mojo EDK. (Closed)

Created:
5 years ago by jam
Modified:
5 years ago
Reviewers:
msw
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix shutdown UAF in MessagePipeDispatcher in new Mojo EDK. The problem was that the PostTask to the IO thread might not run if the IO thread has shutdown. In that case the MessagePipeDispatcher would get destructed, and RawChannel (called by IO thread destruction) can call its OnError method. Fix this by manually refcounting so that in this situation we just leak the MessagePipeDispatcher instead. BUG=561803 Committed: https://crrev.com/d0a0ab7efa8f9e7eb2124468070e79c2786113a8 Cr-Commit-Position: refs/heads/master@{#365881}

Patch Set 1 #

Patch Set 2 : enable new EDK for try run #

Patch Set 3 : undo new EDK by default #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -0 lines) Patch
M mojo/edk/system/message_pipe_dispatcher.cc View 2 chunks +7 lines, -0 lines 4 comments Download

Messages

Total messages: 9 (3 generated)
jam
5 years ago (2015-12-17 18:38:14 UTC) #2
msw
lgtm with a nit and a q https://codereview.chromium.org/1539573002/diff/40001/mojo/edk/system/message_pipe_dispatcher.cc File mojo/edk/system/message_pipe_dispatcher.cc (right): https://codereview.chromium.org/1539573002/diff/40001/mojo/edk/system/message_pipe_dispatcher.cc#newcode440 mojo/edk/system/message_pipe_dispatcher.cc:440: // a ...
5 years ago (2015-12-17 18:49:59 UTC) #3
jam
https://codereview.chromium.org/1539573002/diff/40001/mojo/edk/system/message_pipe_dispatcher.cc File mojo/edk/system/message_pipe_dispatcher.cc (right): https://codereview.chromium.org/1539573002/diff/40001/mojo/edk/system/message_pipe_dispatcher.cc#newcode440 mojo/edk/system/message_pipe_dispatcher.cc:440: // a chance to execute. If that happens, the ...
5 years ago (2015-12-17 18:54:36 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1539573002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1539573002/40001
5 years ago (2015-12-17 19:17:07 UTC) #6
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years ago (2015-12-17 20:55:22 UTC) #7
commit-bot: I haz the power
5 years ago (2015-12-17 20:57:21 UTC) #9
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/d0a0ab7efa8f9e7eb2124468070e79c2786113a8
Cr-Commit-Position: refs/heads/master@{#365881}

Powered by Google App Engine
This is Rietveld 408576698