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

Issue 550343004: Do not allow values to be migrated without MACs if the destination already has a MAC. (Closed)

Created:
6 years, 3 months ago by gab
Modified:
6 years, 3 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Do not allow values to be migrated without MACs if the destination already has a MAC. BUG=414554 TEST=Added regression test PrefHashBrowserTestUntrustedAdditionToPrefs which fails without this CL and passes with it. Committed: https://crrev.com/b004a56cd18f7519d1cceafb534a5865f93d988d Cr-Commit-Position: refs/heads/master@{#295048}

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -1 line) Patch
M chrome/browser/prefs/tracked/pref_hash_browsertest.cc View 1 chunk +64 lines, -0 lines 2 comments Download
M chrome/browser/prefs/tracked/tracked_preferences_migration.cc View 1 chunk +6 lines, -1 line 0 comments Download

Messages

Total messages: 11 (2 generated)
gab
Bernhard/Erik PTAL. A one-line logic change + a regression integration test. I want to merge ...
6 years, 3 months ago (2014-09-16 03:35:43 UTC) #2
Bernhard Bauer
lgtm https://codereview.chromium.org/550343004/diff/1/chrome/browser/prefs/tracked/pref_hash_browsertest.cc File chrome/browser/prefs/tracked/pref_hash_browsertest.cc (right): https://codereview.chromium.org/550343004/diff/1/chrome/browser/prefs/tracked/pref_hash_browsertest.cc#newcode793 chrome/browser/prefs/tracked/pref_hash_browsertest.cc:793: virtual void AttackPreferencesOnDisk( Does this need an OVERRIDE?
6 years, 3 months ago (2014-09-16 08:10:54 UTC) #3
gab
Thanks! CQing for the sake of expediency, Erik PTAL as soon as you get in. ...
6 years, 3 months ago (2014-09-16 12:14:22 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/550343004/1
6 years, 3 months ago (2014-09-16 12:14:59 UTC) #6
commit-bot: I haz the power
Committed patchset #1 (id:1) as 740abaa7b981f73306ff5ec9d8c744fa0bd871b3
6 years, 3 months ago (2014-09-16 12:46:08 UTC) #7
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/b004a56cd18f7519d1cceafb534a5865f93d988d Cr-Commit-Position: refs/heads/master@{#295048}
6 years, 3 months ago (2014-09-16 12:47:22 UTC) #8
erikwright (departed)
LGTM. Good catch. I don't understand why we wrote it the other way.
6 years, 3 months ago (2014-09-16 14:16:04 UTC) #9
gab
On 2014/09/16 14:16:04, erikwright wrote: > LGTM. Good catch. > I don't understand why we ...
6 years, 3 months ago (2014-09-16 14:22:14 UTC) #10
gab
6 years, 3 months ago (2014-09-16 14:30:14 UTC) #11
Message was sent while issue was closed.
On 2014/09/16 14:22:14, gab wrote:
> On 2014/09/16 14:16:04, erikwright wrote:
> > LGTM. Good catch. 
> 
> > I don't understand why we wrote it the other way.

This appears to have been the case throughout
https://codereview.chromium.org/324493002; we even changed it after patch set 12
to use ClearHash() instead of supporting ImportHash(NULL) when
|!desitnation_hash_missing|:
https://codereview.chromium.org/324493002/diff/250001/chrome/browser/prefs/tr...

My bad for not spotting this, I definitely remember being puzzled by this edge
case, but hadn't realized it wasn't so much of an edge case when tampering comes
into play...

> 
> Probably simply because it made intuitive sense that mac_of_migrated_value =>
> mac_in_secure_pref implies that if mac_of_migrated_value is NULL,
> mac_in_secure_pref should also become NULL... (and this would also have been
> fine had ClearHash() not been re-validating the super MAC (which it needs to
do
> to support clearing MACs of deprecated values being cleaned away)...
> 
> Can you guys think of other such use cases we should have integration tests
for?

Powered by Google App Engine
This is Rietveld 408576698