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

Issue 1537593002: Fix UAF in new Mojo EDK. (Closed)

Created:
5 years ago by jam
Modified:
5 years ago
Reviewers:
Fady Samuel
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, jam, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, 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 UAF in new Mojo EDK. The problem was that MessagePipeDispatcher was calling Broker::CloseMessagePipe asynchronously, and in between the time that the posted task was run the MPD could be deleted and called back by the channel for another error. Since all these methods are now called on the IO thread only, fix this by allowing reentrancy for CloseMessagePipe. BUG=561803 TEST= linux_chromeos browser_tests pass with new EDK Committed: https://crrev.com/7f48f0a4073d7ec74eea40aa85a9ebfa506236ce Cr-Commit-Position: refs/heads/master@{#365782}

Patch Set 1 #

Total comments: 3

Patch Set 2 : without enabling new Mojo EDK #

Patch Set 3 : improve comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -28 lines) Patch
M mojo/edk/system/broker.h View 1 chunk +2 lines, -0 lines 0 comments Download
M mojo/edk/system/broker_state.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M mojo/edk/system/child_broker.cc View 1 chunk +3 lines, -1 line 0 comments Download
M mojo/edk/system/message_pipe_dispatcher.cc View 2 chunks +2 lines, -12 lines 0 comments Download
M mojo/edk/system/routed_raw_channel.cc View 1 2 2 chunks +13 lines, -13 lines 0 comments Download

Messages

Total messages: 14 (6 generated)
jam
5 years ago (2015-12-17 05:32:49 UTC) #3
Fady Samuel
https://codereview.chromium.org/1537593002/diff/1/mojo/edk/system/routed_raw_channel.cc File mojo/edk/system/routed_raw_channel.cc (right): https://codereview.chromium.org/1537593002/diff/1/mojo/edk/system/routed_raw_channel.cc#newcode140 mojo/edk/system/routed_raw_channel.cc:140: for (auto it = routes_.begin(); it != routes_.end();) { ...
5 years ago (2015-12-17 05:35:02 UTC) #4
Fady Samuel
https://codereview.chromium.org/1537593002/diff/1/mojo/edk/system/routed_raw_channel.cc File mojo/edk/system/routed_raw_channel.cc (right): https://codereview.chromium.org/1537593002/diff/1/mojo/edk/system/routed_raw_channel.cc#newcode140 mojo/edk/system/routed_raw_channel.cc:140: for (auto it = routes_.begin(); it != routes_.end();) { ...
5 years ago (2015-12-17 05:38:33 UTC) #5
Fady Samuel
On 2015/12/17 05:38:33, Fady Samuel wrote: > https://codereview.chromium.org/1537593002/diff/1/mojo/edk/system/routed_raw_channel.cc > File mojo/edk/system/routed_raw_channel.cc (right): > > https://codereview.chromium.org/1537593002/diff/1/mojo/edk/system/routed_raw_channel.cc#newcode140 ...
5 years ago (2015-12-17 05:44:55 UTC) #6
jam
https://codereview.chromium.org/1537593002/diff/1/mojo/edk/system/routed_raw_channel.cc File mojo/edk/system/routed_raw_channel.cc (right): https://codereview.chromium.org/1537593002/diff/1/mojo/edk/system/routed_raw_channel.cc#newcode140 mojo/edk/system/routed_raw_channel.cc:140: for (auto it = routes_.begin(); it != routes_.end();) { ...
5 years ago (2015-12-17 05:45:16 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1537593002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1537593002/40001
5 years ago (2015-12-17 05:45:33 UTC) #10
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years ago (2015-12-17 08:18:42 UTC) #12
commit-bot: I haz the power
5 years ago (2015-12-17 08:19:29 UTC) #14
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/7f48f0a4073d7ec74eea40aa85a9ebfa506236ce
Cr-Commit-Position: refs/heads/master@{#365782}

Powered by Google App Engine
This is Rietveld 408576698