SafeBrowsing fails to update persistent PrefixSet on Windows

RESOLVED FIXED in Firefox 17

Status

()

Toolkit
Safe Browsing
--
critical
RESOLVED FIXED
6 years ago
3 years ago

People

(Reporter: gcp, Assigned: gcp)

Tracking

13 Branch
Firefox 17
x86_64
Windows Vista
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

6 years ago
What seems to be happening is that upon the first update, all files are created normally. Upon the second update, saving the sbtore files succeeds but saving the pset files doesn't. The data in memory *is* updated, though.

When the user restarts the browser, our corruption detection will see that the sbstore data is not in sync with the pset data, and blow away the database.

Bugs are:
a) prefixSet->WriteFile(); in Classifier.cpp doesn't have its return value checked
b) Windows doesn't allow us to rename into the file (SafeOutputStream) while we have an open read handle to it. This is a known problem that was fixed in HashStore.cpp but missed in LookupCache.cpp
c) I think its possible to make a testcase for this, so we should probably do that.
(Assignee)

Updated

6 years ago
Assignee: nobody → gpascutto
(Assignee)

Comment 1

6 years ago
Created attachment 595825 [details] [diff] [review]
Patch. Fix WriteFile on Windows

https://tbpl.mozilla.org/?tree=Try&rev=0ad1f7d95261

Adding a test for this specific failure seems tricky. I'd need to shut down the entire classifier system, afaik. Not sure how to achieve that.
Attachment #595825 - Flags: review?(dcamp)

Updated

6 years ago
Attachment #595825 - Flags: review?(dcamp) → review+
(Assignee)

Comment 2

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/e9291f227d63

Comment 3

6 years ago
https://hg.mozilla.org/mozilla-central/rev/e9291f227d63
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 13
(Assignee)

Comment 4

5 years ago
Created attachment 616610 [details] [diff] [review]
Patch. Backout

[Approval Request Comment]
Backout due to bug 744993:

a01cf079ee0b Bug 730247
1a6d008acb4f Bug 729928
f8bf3795b851 Bug 729640
35bf0d62cc30 Bug 726002
a010dcf1a973 Bug 726002
e9291f227d63 Bug 725597
db52b4916cde Bug 673470
173f90d397a8 Bug 673470
Attachment #616610 - Flags: approval-mozilla-central?
Attachment #616610 - Flags: approval-mozilla-aurora?
Attachment #616610 - Flags: approval-mozilla-central? → approval-mozilla-central+
(Assignee)

Comment 5

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/46e19522aa98
https://hg.mozilla.org/mozilla-central/rev/46e19522aa98
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Updated

5 years ago
Attachment #616610 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora-

Comment 7

5 years ago
Comment on attachment 616610 [details] [diff] [review]
Patch. Backout

Sorry - thought this bug was reopened because the backout was backed out. My mistake. Approved for Aurora 13 (or Beta 13 if the merge occurs before we land).
Attachment #616610 - Flags: approval-mozilla-aurora- → approval-mozilla-aurora+
(Assignee)

Comment 8

5 years ago
https://hg.mozilla.org/releases/mozilla-beta/rev/eab0fd65945b
(Assignee)

Comment 9

5 years ago
Relanding after fixes in bug 673470 to fix bug 744993.
https://hg.mozilla.org/integration/mozilla-inbound/rev/e63466828f6b
https://hg.mozilla.org/mozilla-central/rev/e63466828f6b
Status: REOPENED → RESOLVED
Last Resolved: 6 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: Firefox 13 → Firefox 17
Component: Phishing Protection → Phishing Protection
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.