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

Issue 10093004: Double-check safe-browsing database validity on update failure. (Closed)

Created:
8 years, 8 months ago by Scott Hess - ex-Googler
Modified:
8 years, 8 months ago
Reviewers:
noelutz, mattm
CC:
chromium-reviews, cbentzel
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Double-check safe-browsing database validity on update failure. A user reported a case where their safe-browsing database was not updating. Corrupt data in the add_chunks and sub_chunks area was causing a 413 server response (even though the post was not excessively large). This change explicitly checks the checksums, causing invalid databases to be reset. This case could happen if the user's computer crashes before a previous update was entirely committed to disk. In most cases, finalizing the next update would detect the corrupt data, but in this case he error response from the server prevented the corruption from being detected. BUG=120219 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=133618

Patch Set 1 #

Patch Set 2 : Distinguish sources of checksum failure. #

Patch Set 3 : Un/signed compare, and digest from wrong file. #

Patch Set 4 : Unittest, simplify checksum-checker. #

Total comments: 3

Patch Set 5 : Check size before reading. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+173 lines, -18 lines) Patch
M chrome/browser/safe_browsing/safe_browsing_database.cc View 2 chunks +24 lines, -1 line 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_store.h View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_store_file.h View 1 2 3 2 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_store_file.cc View 1 2 3 4 2 chunks +56 lines, -1 line 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc View 1 2 3 5 chunks +74 lines, -16 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
Scott Hess - ex-Googler
Obviously this'll only fix up-to-date users - I'll drop some color on the bug.
8 years, 8 months ago (2012-04-15 06:21:47 UTC) #1
Scott Hess - ex-Googler
On 2012/04/15 06:21:47, shess wrote: > Obviously this'll only fix up-to-date users - I'll drop ...
8 years, 8 months ago (2012-04-15 06:35:09 UTC) #2
noelutz
lgtm
8 years, 8 months ago (2012-04-16 17:31:15 UTC) #3
Scott Hess - ex-Googler
On 2012/04/16 17:31:15, noelutz wrote: > lgtm Before I push the commit button ... the ...
8 years, 8 months ago (2012-04-16 17:36:15 UTC) #4
Scott Hess - ex-Googler
On 2012/04/16 17:36:15, shess wrote: > On 2012/04/16 17:31:15, noelutz wrote: > > lgtm > ...
8 years, 8 months ago (2012-04-17 04:26:58 UTC) #5
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
8 years, 8 months ago (2012-04-17 04:27:08 UTC) #6
Scott Hess - ex-Googler
I do not quite know what's going on, here. Looping in another OWNER just to ...
8 years, 8 months ago (2012-04-17 06:49:34 UTC) #7
noelutz
Am I not a full committer? Maybe my rights were stripped at some point? To ...
8 years, 8 months ago (2012-04-17 16:00:47 UTC) #8
mattm
lgtm
8 years, 8 months ago (2012-04-18 00:26:01 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/shess@chromium.org/10093004/4001
8 years, 8 months ago (2012-04-18 00:30:43 UTC) #10
commit-bot: I haz the power
Try job failure for 10093004-4001 (retry) on linux_chromeos for step "compile" (clobber build). It's a ...
8 years, 8 months ago (2012-04-18 01:03:33 UTC) #11
Scott Hess - ex-Googler
Sigh. I apologize, but ... First time up, signed/unsigned compare warning, which didn't show up ...
8 years, 8 months ago (2012-04-23 22:29:28 UTC) #12
mattm
one issue with the unsigned arithmetic you might want to fix, otherwise lgtm. Thanks for ...
8 years, 8 months ago (2012-04-23 23:47:48 UTC) #13
Scott Hess - ex-Googler
https://chromiumcodereview.appspot.com/10093004/diff/25001/chrome/browser/safe_browsing/safe_browsing_store_file.cc File chrome/browser/safe_browsing/safe_browsing_store_file.cc (right): https://chromiumcodereview.appspot.com/10093004/diff/25001/chrome/browser/safe_browsing/safe_browsing_store_file.cc#newcode266 chrome/browser/safe_browsing/safe_browsing_store_file.cc:266: bytes_left -= sizeof(base::MD5Digest); On 2012/04/23 23:47:48, mattm wrote: > ...
8 years, 8 months ago (2012-04-24 01:37:21 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/shess@chromium.org/10093004/36001
8 years, 8 months ago (2012-04-24 01:37:41 UTC) #15
commit-bot: I haz the power
8 years, 8 months ago (2012-04-24 03:04:02 UTC) #16
Change committed as 133618

Powered by Google App Engine
This is Rietveld 408576698