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

Issue 495593003: Avoid memory corruption in sessions sync (Closed)

Created:
6 years, 4 months ago by rlarocque
Modified:
6 years, 4 months ago
CC:
chromium-reviews, tim+watch_chromium.org, haitaol+watch_chromium.org, zea+watch_chromium.org, maniscalco+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

Avoid memory corruption in sessions sync This CL is premised on the theory that the memory corruption and related crashes are due to invalid input data being fed into the sessions sync code. See the linked bug for more details. Adds two tests that expose the scenario that is believed to be the cause of the bug. If checked in on their own, they would crash during destruction of the SyncedSessionTracker. Adds a CHECK to prevent the SyncedSessionsTracker from getting in to a bad state. The goal of this CHECK is to ensure that all crashes caused by misuse of the tracker cause a crash immediately, rather than corrupting the memory allocator's internal data structures and possibly causing crashes in unrelated code. The newly added tests would trigger this CHECK, if not for the last component of this CL. Adds a filter for incoming sync_pb::SessionHeader values. Before acting on the session, the SessionsSyncManager will now verify that the header does not contain any duplicate tab IDs. If verification fails, the header will be ignored. This part of the CL allows the new tests to pass. BUG=360822 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=291158

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+114 lines, -0 lines) Patch
M chrome/browser/sync/glue/synced_session_tracker.cc View 1 chunk +12 lines, -0 lines 0 comments Download
M chrome/browser/sync/sessions/sessions_sync_manager.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/sync/sessions/sessions_sync_manager.cc View 2 chunks +24 lines, -0 lines 0 comments Download
M chrome/browser/sync/sessions/sessions_sync_manager_unittest.cc View 1 chunk +74 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
rlarocque
Here's an attempt to handle crbug.com/360822. If you'd like, we could start by committing only ...
6 years, 4 months ago (2014-08-20 20:04:20 UTC) #1
tim (not reviewing)
LGTM
6 years, 4 months ago (2014-08-20 20:27:01 UTC) #2
rlarocque
The CQ bit was checked by rlarocque@chromium.org
6 years, 4 months ago (2014-08-20 20:30:25 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/495593003/1
6 years, 4 months ago (2014-08-20 20:31:13 UTC) #4
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_gpu on tryserver.chromium.gpu ...
6 years, 4 months ago (2014-08-20 22:58:39 UTC) #5
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-20 23:02:27 UTC) #6
commit-bot: I haz the power
Try jobs failed on following builders: linux_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu/builds/55226) android_clang_dbg on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg/builds/8001)
6 years, 4 months ago (2014-08-20 23:02:28 UTC) #7
rlarocque
The CQ bit was checked by rlarocque@chromium.org
6 years, 4 months ago (2014-08-21 17:30:24 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/495593003/1
6 years, 4 months ago (2014-08-21 17:32:46 UTC) #9
commit-bot: I haz the power
6 years, 4 months ago (2014-08-21 20:13:51 UTC) #10
Message was sent while issue was closed.
Committed patchset #1 (1) as 291158

Powered by Google App Engine
This is Rietveld 408576698